#include <SimDaqTrigMaker.h>
Inheritance diagram for SimDaqTrigMaker:

Static Public Member Functions | |
| SimDaqTrigger * | Create (std::string className) |
| Bool_t | HasRegisteredClass (std::string className) |
Protected Types | |
| typedef std::map< std::string, SimDaqTrigMaker * > | MakerMap_t |
Protected Member Functions | |
| SimDaqTrigMaker (const char *className) | |
| virtual SimDaqTrigger * | Create () const =0 |
| SimDaqTrigMaker () | |
| virtual | ~SimDaqTrigMaker () |
| ClassDef (SimDaqTrigMaker, 0) | |
Static Protected Member Functions | |
| MakerMap_t & | GetMakerMap () |
|
|
Definition at line 27 of file SimDaqTrigMaker.h. Referenced by GetMakerMap(). |
|
|
Definition at line 39 of file SimDaqTrigMaker.cxx. References GetMakerMap(). 00040 {
00041 std::string tmp(className);
00042 //std::cout << "Adding Maker: " << tmp << std::endl;
00043 GetMakerMap().insert(std::pair<std::string,SimDaqTrigMaker*>(tmp,this));
00044 }
|
|
|
Definition at line 29 of file SimDaqTrigMaker.h. 00029 { }
|
|
|
Definition at line 30 of file SimDaqTrigMaker.h. 00030 { }
|
|
||||||||||||
|
|
|
|
Implemented in SimDaqTrigMakerProxy< T >. Referenced by SimDetector::Config(). |
|
|
Definition at line 6 of file SimDaqTrigMaker.cxx. 00007 {
00008 // Find the concrete factory:
00009 MakerMap_t::iterator it = GetMakerMap().find(className);
00010
00011
00012 if(it == GetMakerMap().end()) {
00013 // If it doesn't exist, return null.
00014 return 0;
00015 } else {
00016 // Otherwise, get the concrete factory to make one.
00017 SimDaqTrigger* elec = it->second->Create();
00018 return elec;
00019 }
00020
00021 // Make compiler happy:
00022 return 0;
00023 }
|
|
|
Definition at line 47 of file SimDaqTrigMaker.cxx. References MakerMap_t. Referenced by HasRegisteredClass(), and SimDaqTrigMaker(). 00048 {
00049 // The whole point to this little function is to hide the
00050 // static map from the compiler, to avoid
00051 // the "static initialization order fiasco"
00052 // ref: http://www.parashift.com/c++-faq-lite/ctors.html section 10.12
00053
00054 // This object gets created on the first call,
00055 // thus ensuring it exists whenever it's needed. (i.e. before main())
00056 static MakerMap_t theMap;
00057 return theMap;
00058 }
|
|
|
Definition at line 25 of file SimDaqTrigMaker.cxx. References GetMakerMap(). 00026 {
00027 // Find the concrete factory:
00028 MakerMap_t::iterator it = GetMakerMap().find(className);
00029
00030 if(it == GetMakerMap().end()) {
00031 // If it doesn't exist, return null.
00032 return false;
00033 };
00034 return true;
00035 }
|
1.3.9.1