/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/geo/include/RAT/DetectorFactory.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/geo/include/RAT/DetectorFactory.hh Source File
Ratpac-two
DetectorFactory.hh
1 
22 #ifndef __RAT_DetectorFactory__
23 #define __RAT_DetectorFactory__
24 
25 #include <RAT/DB.hh>
26 #include <map>
27 #include <string>
28 
29 namespace RAT {
30 
32  public:
33  DetectorFactory() {}
34 
35  virtual ~DetectorFactory() {}
36 
38  static void DefineWithFactory(const std::string name, DBLinkPtr detector);
39 
41  static void Register(const std::string name, DetectorFactory *factory);
42 
43  protected:
45  static std::map<const std::string, DetectorFactory *> fFactoryMap;
46 
50  virtual void DefineDetector(DBLinkPtr detector) = 0;
51 };
52 
53 } // namespace RAT
54 
55 #endif
Pure virtual class for defining parameterized geometries.
Definition: DetectorFactory.hh:31
static std::map< const std::string, DetectorFactory * > fFactoryMap
Map of registered DetectorFactories.
Definition: DetectorFactory.hh:45
static void DefineWithFactory(const std::string name, DBLinkPtr detector)
Invokes DefineDetector on the DetectorFactory registered to name.
Definition: DetectorFactory.cc:8
virtual void DefineDetector(DBLinkPtr detector)=0
static void Register(const std::string name, DetectorFactory *factory)
Registers a DetectorFactory under a name.
Definition: DetectorFactory.cc:16
Definition: CCCrossSecMessenger.hh:29