CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/L1TriggerConfig/DTTPGConfig/interface/DTConfigManager.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00014 //
00015 //--------------------------------------------------
00016 #ifndef DT_CONFIG_MANAGER_H
00017 #define DT_CONFIG_MANAGER_H
00018 
00019 //---------------
00020 // C++ Headers --
00021 //---------------
00022 #include <map>
00023 
00024 //----------------------
00025 // Base Class Headers --
00026 //----------------------
00027 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigBti.h"
00028 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigTraco.h"
00029 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigTSTheta.h"
00030 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigTSPhi.h"
00031 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigTrigUnit.h" 
00032 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigSectColl.h"
00033 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigLUTs.h"
00034 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
00035 #include "DataFormats/MuonDetId/interface/DTBtiId.h"
00036 #include "DataFormats/MuonDetId/interface/DTTracoId.h"
00037 #include "DataFormats/MuonDetId/interface/DTSectCollId.h"
00038 
00039 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigPedestals.h"
00040 
00041 //------------------------------------
00042 // Collaborating Class Declarations --
00043 //------------------------------------
00044 
00045 //              ---------------------
00046 //              -- Class Interface --
00047 //              ---------------------
00048 
00049 
00050 class DTConfigManager {
00051 
00052  public:
00053   
00054   typedef std::map<DTBtiId,DTConfigBti> innerBtiMap;
00055   typedef std::map<DTTracoId,DTConfigTraco> innerTracoMap;
00056   typedef std::map<DTChamberId,innerBtiMap> BtiMap;
00057   typedef std::map<DTChamberId,innerTracoMap> TracoMap;
00058   typedef std::map<DTChamberId,DTConfigTSTheta> TSThetaMap;
00059   typedef std::map<DTChamberId,DTConfigTSPhi> TSPhiMap;
00060   typedef std::map<DTChamberId,DTConfigTrigUnit> TrigUnitMap;
00061   typedef std::map<DTChamberId,DTConfigLUTs> LUTMap;
00062   typedef std::map<DTSectCollId,DTConfigSectColl> SectCollMap;
00063 
00064  public:
00065   
00067   DTConfigManager();
00068   
00070   ~DTConfigManager();
00071 
00073   DTConfigBti* getDTConfigBti(DTBtiId) const;
00074 
00076   const std::map<DTBtiId,DTConfigBti>& getDTConfigBtiMap(DTChamberId) const;
00077   
00079   DTConfigTraco* getDTConfigTraco(DTTracoId) const;
00080 
00082   const std::map<DTTracoId,DTConfigTraco>& getDTConfigTracoMap(DTChamberId) const;
00083 
00085   DTConfigTSTheta* getDTConfigTSTheta(DTChamberId) const;
00086 
00088   DTConfigTSPhi* getDTConfigTSPhi(DTChamberId) const;
00089 
00091   DTConfigTrigUnit* getDTConfigTrigUnit(DTChamberId) const;
00092   
00094   DTConfigLUTs* getDTConfigLUTs(DTChamberId) const;
00095 
00097   DTConfigSectColl* getDTConfigSectColl(DTSectCollId) const;
00098 
00100   DTConfigPedestals* getDTConfigPedestals() const;
00101  
00103   inline bool getDTTPGDebug() const { return my_dttpgdebug; };
00104 
00106   int getBXOffset() const;
00107 
00109   inline bool lutFromDB() const { return my_lutfromdb; }
00110 
00112   inline bool useAcceptParam() const { return my_acceptparam; }
00113 
00115   inline bool CCBConfigValidity() const { return my_CCBvalid; }
00116  
00117 
00119   void setDTConfigBti(DTBtiId,DTConfigBti);
00120 
00122   void setDTConfigTraco(DTTracoId,DTConfigTraco);
00123 
00125   inline void setDTConfigTSTheta(DTChamberId chambid ,DTConfigTSTheta conf) { my_tsthetamap[chambid] = conf; };
00126 
00128   inline void setDTConfigTSPhi(DTChamberId chambid,DTConfigTSPhi conf) { my_tsphimap[chambid] = conf; };
00129 
00131   void setDTConfigTrigUnit(DTChamberId chambid,DTConfigTrigUnit conf) { my_trigunitmap[chambid] = conf; };
00132 
00134   void setDTConfigLUTs(DTChamberId chambid,DTConfigLUTs conf) { my_lutmap[chambid] = conf; };
00135 
00137   void setDTConfigSectColl(DTSectCollId sectcollid ,DTConfigSectColl conf){ my_sectcollmap[sectcollid] = conf; };
00138 
00140   void setDTConfigPedestals(DTConfigPedestals pedestals) { my_pedestals = pedestals; };
00141 
00143   inline void setDTTPGDebug(bool debug) { my_dttpgdebug = debug; }
00144    
00146   inline void setLutFromDB(bool lutFromDB) { my_lutfromdb = lutFromDB; }
00147 
00149   inline void setUseAcceptParam(bool acceptparam) { my_acceptparam = acceptparam; }
00150 
00152   inline void setCCBConfigValidity(bool CCBValid) { my_CCBvalid = CCBValid; }
00153 
00155   void dumpLUTParam(DTChamberId &chambid) const; /* SV 091111 */ 
00156 
00157 
00158  private:
00159 
00160   // maps for the whole config structure
00161   BtiMap       my_btimap;
00162   TracoMap     my_tracomap;
00163   TSThetaMap   my_tsthetamap;
00164   TSPhiMap     my_tsphimap;
00165   TrigUnitMap  my_trigunitmap; 
00166   LUTMap       my_lutmap;
00167   SectCollMap  my_sectcollmap;
00168   DTConfigPedestals my_pedestals;
00169   
00170   bool my_dttpgdebug;
00171 
00172   bool my_lutfromdb;
00173   bool my_acceptparam;
00174   bool my_CCBvalid;
00175 };
00176 
00177 #endif