File indexing completed on 2024-09-07 04:34:26
0001 #ifndef OpticalObjectMgr_h
0002 #define OpticalObjectMgr_h
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
0012 #include <map>
0013 #include "Alignment/CocoaModel/interface/OpticalObject.h"
0014
0015 typedef std::map<ALIstring, OpticalObject*, std::less<ALIstring> > msopto;
0016
0017 class OpticalObject;
0018
0019 class OpticalObjectMgr {
0020 public:
0021 OpticalObjectMgr() {}
0022 ~OpticalObjectMgr() {}
0023
0024
0025 static OpticalObjectMgr* getInstance();
0026
0027
0028 void registerMe(OpticalObject* opto) { theOptODict[opto->longName()] = opto; }
0029
0030 OpticalObject* findOptO(const ALIstring& longName, bool exists = false) const;
0031
0032 std::vector<OpticalObject*> findOptOs(const ALIstring& name, bool exists = false) const;
0033
0034 void dumpOptOs(std::ostream& out = std::cout) const;
0035
0036 ALIuint buildCmsSwID();
0037
0038 private:
0039 static OpticalObjectMgr* theInstance;
0040 msopto theOptODict;
0041 ALIuint theLastCmsSwID;
0042 };
0043
0044 #endif