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 
12 #include <map>
14 
15 typedef std::map<ALIstring, OpticalObject*, std::less<ALIstring> > msopto;
16 
17 class OpticalObject;
18 
20 public:
23 
25  static OpticalObjectMgr* getInstance();
26 
27  // register an OpticalObject
28  void registerMe(OpticalObject* opto) { theOptODict[opto->longName()] = opto; }
29  // find an OpticalObject by long name (its name + name of its ancestors)
30  OpticalObject* findOptO(const ALIstring& longName, bool exists = false) const;
31  // find a list of OpticalObject's by name
32  std::vector<OpticalObject*> findOptOs(const ALIstring& name, bool exists = false) const;
33 
34  void dumpOptOs(std::ostream& out = std::cout) const;
35 
37 
38 private:
42 };
43 
44 #endif
OpticalObject.h
OpticalObjectMgr::buildCmsSwID
ALIuint buildCmsSwID()
Definition: OpticalObjectMgr.cc:75
OpticalObject::longName
const ALIstring longName() const
Definition: OpticalObject.h:196
gather_cfg.cout
cout
Definition: gather_cfg.py:144
ALIstring
std::string ALIstring
Definition: CocoaGlobals.h:9
OpticalObject
Definition: OpticalObject.h:35
OpticalObjectMgr::registerMe
void registerMe(OpticalObject *opto)
Definition: OpticalObjectMgr.h:28
OpticalObjectMgr::theOptODict
msopto theOptODict
Definition: OpticalObjectMgr.h:40
OpticalObjectMgr
Definition: OpticalObjectMgr.h:19
OpticalObjectMgr::OpticalObjectMgr
OpticalObjectMgr()
Definition: OpticalObjectMgr.h:21
OpticalObjectMgr::~OpticalObjectMgr
~OpticalObjectMgr()
Definition: OpticalObjectMgr.h:22
OpticalObjectMgr::getInstance
static OpticalObjectMgr * getInstance()
Get the only instance.
Definition: OpticalObjectMgr.cc:9
OpticalObjectMgr::theInstance
static OpticalObjectMgr * theInstance
Definition: OpticalObjectMgr.h:39
ALIuint
unsigned int ALIuint
Definition: CocoaGlobals.h:17
msopto
std::map< ALIstring, OpticalObject *, std::less< ALIstring > > msopto
Definition: OpticalObjectMgr.h:15
OpticalObjectMgr::findOptOs
std::vector< OpticalObject * > findOptOs(const ALIstring &name, bool exists=false) const
Definition: OpticalObjectMgr.cc:37
OpticalObjectMgr::dumpOptOs
void dumpOptOs(std::ostream &out=std::cout) const
Definition: OpticalObjectMgr.cc:63
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
OpticalObjectMgr::findOptO
OpticalObject * findOptO(const ALIstring &longName, bool exists=false) const
Definition: OpticalObjectMgr.cc:19
CocoaGlobals.h
OpticalObjectMgr::theLastCmsSwID
ALIuint theLastCmsSwID
Definition: OpticalObjectMgr.h:41