CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/Alignment/CocoaModel/interface/EntryMgr.h

Go to the documentation of this file.
00001 //   COCOA class header file
00002 //Id:  EntryMgr.h
00003 //CAT: Model
00004 //
00005 //   Manages the parameters of the input file (variables that are given a value to be reused in the file)
00006 // 
00007 //   History: v1.0  11/11/01   Pedro Arce
00008 #ifndef EntryMgr_h
00009 #define EntryMgr_h
00010 
00011 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h" 
00012 #include <vector>
00013 class EntryData;
00014 
00015 class EntryMgr {
00016 
00017  private:
00018   EntryMgr(){};
00019 
00020  public:
00021   static EntryMgr* getInstance();
00022   ALIbool readEntryFromReportOut( const std::vector<ALIstring>& wl );
00023 
00024   ALIdouble getDimOutLengthVal() const{
00025     return dimOutLengthVal; }
00026   ALIdouble getDimOutLengthSig() const{
00027     return dimOutLengthSig; }
00028   ALIdouble getDimOutAngleVal() const{
00029     return dimOutAngleVal; }
00030   ALIdouble getDimOutAngleSig() const{
00031     return dimOutAngleSig; }
00032 
00033   EntryData* findEntryByShortName( const ALIstring& optoName, const ALIstring& entryName = ""  );
00034   EntryData* findEntryByLongName( const ALIstring& optoName, const ALIstring& entryName = ""  );
00035   EntryData* findEntryByName( const ALIstring& optoName, const ALIstring& entryName = ""  ){
00036     return findEntryByLongName( optoName, entryName ); 
00037   }
00038 
00039   ALIstring extractShortName( const ALIstring& name );
00040 
00041   ALIint numberOfEntries() {
00042     return theEntryData.size();
00043   }
00044   std::vector<EntryData*> getEntryData() const {
00045     return theEntryData; }
00046 
00047   void clearEntryData() { theEntryData.clear(); }
00048 
00049 private:
00050   EntryData* findEntry( const std::vector<ALIstring>& wl );
00051 
00052  private:
00053   static EntryMgr* theInstance;
00054 
00055   ALIdouble dimOutLengthVal, dimOutLengthSig, dimOutAngleVal, dimOutAngleSig;
00056   std::vector<EntryData*> theEntryData;
00057 };
00058 
00059 #endif