CMS 3D CMS Logo

OpticalObjectMgr.h
Go to the documentation of this file.
1 #ifndef OpticalObjectMgr_h
2 #define OpticalObjectMgr_h
3 /*---------------------------------------------------------------------------
4 ClassName: OpticalObjectMgr
5 Author: P. Arce
6 Changes: 02/05/01: creation
7 ---------------------------------------------------------------------------*/
8 // Description:
9 // Manages the set of optical objects
10 
11 
13 #include <map>
15 
16 typedef std::map<ALIstring, OpticalObject*, std::less<ALIstring> > msopto;
17 
18 class OpticalObject;
19 
21 {
22  public:
23 
26 
28  static OpticalObjectMgr* getInstance();
29 
30  // register an OpticalObject
31  void registerMe( OpticalObject* opto ){
32  theOptODict[opto->longName()] = opto;
33  }
34  // find an OpticalObject by long name (its name + name of its ancestors)
35  OpticalObject* findOptO( const ALIstring& longName, bool exists = 0 ) const;
36  // find a list of OpticalObject's by name
37  std::vector<OpticalObject*> findOptOs( const ALIstring& name, bool exists = 0 ) const;
38 
39  void dumpOptOs( std::ostream& out= std::cout ) const;
40 
42 
43  private:
47 };
48 
49 #endif
OpticalObject * findOptO(const ALIstring &longName, bool exists=0) const
static OpticalObjectMgr * theInstance
std::vector< OpticalObject * > findOptOs(const ALIstring &name, bool exists=0) const
static OpticalObjectMgr * getInstance()
Get the only instance.
void registerMe(OpticalObject *opto)
std::map< ALIstring, OpticalObject *, std::less< ALIstring > > msopto
const ALIstring longName() const
void dumpOptOs(std::ostream &out=std::cout) const
std::string ALIstring
Definition: CocoaGlobals.h:9
unsigned int ALIuint
Definition: CocoaGlobals.h:17