File indexing completed on 2023-10-25 09:56:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef DT_CONFIG_MANAGER_H
0017 #define DT_CONFIG_MANAGER_H
0018
0019
0020
0021
0022 #include <map>
0023
0024
0025
0026
0027 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigBti.h"
0028 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigTraco.h"
0029 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigTSTheta.h"
0030 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigTSPhi.h"
0031 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigTrigUnit.h"
0032 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigSectColl.h"
0033 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigLUTs.h"
0034 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0035 #include "DataFormats/MuonDetId/interface/DTBtiId.h"
0036 #include "DataFormats/MuonDetId/interface/DTTracoId.h"
0037 #include "DataFormats/MuonDetId/interface/DTSectCollId.h"
0038
0039 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigPedestals.h"
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049 class DTConfigManager {
0050 public:
0051 typedef std::map<DTBtiId, DTConfigBti> innerBtiMap;
0052 typedef std::map<DTTracoId, DTConfigTraco> innerTracoMap;
0053 typedef std::map<DTChamberId, innerBtiMap> BtiMap;
0054 typedef std::map<DTChamberId, innerTracoMap> TracoMap;
0055 typedef std::map<DTChamberId, DTConfigTSTheta> TSThetaMap;
0056 typedef std::map<DTChamberId, DTConfigTSPhi> TSPhiMap;
0057 typedef std::map<DTChamberId, DTConfigTrigUnit> TrigUnitMap;
0058 typedef std::map<DTChamberId, DTConfigLUTs> LUTMap;
0059 typedef std::map<DTSectCollId, DTConfigSectColl> SectCollMap;
0060
0061 public:
0062
0063 DTConfigManager();
0064
0065
0066 ~DTConfigManager();
0067
0068
0069 const DTConfigBti* getDTConfigBti(DTBtiId) const;
0070
0071
0072 const std::map<DTBtiId, DTConfigBti>& getDTConfigBtiMap(DTChamberId) const;
0073
0074
0075 const DTConfigTraco* getDTConfigTraco(DTTracoId) const;
0076
0077
0078 const std::map<DTTracoId, DTConfigTraco>& getDTConfigTracoMap(DTChamberId) const;
0079
0080
0081 const DTConfigTSTheta* getDTConfigTSTheta(DTChamberId) const;
0082
0083
0084 const DTConfigTSPhi* getDTConfigTSPhi(DTChamberId) const;
0085
0086
0087 const DTConfigTrigUnit* getDTConfigTrigUnit(DTChamberId) const;
0088
0089
0090 const DTConfigLUTs* getDTConfigLUTs(DTChamberId) const;
0091
0092
0093 const DTConfigSectColl* getDTConfigSectColl(DTSectCollId) const;
0094
0095
0096 const DTConfigPedestals* getDTConfigPedestals() const;
0097
0098
0099 inline bool getDTTPGDebug() const { return my_dttpgdebug; };
0100
0101
0102 int getBXOffset() const;
0103
0104
0105 inline bool lutFromDB() const { return my_lutfromdb; }
0106
0107
0108 inline bool useAcceptParam() const { return my_acceptparam; }
0109
0110
0111 inline bool CCBConfigValidity() const { return my_CCBvalid; }
0112
0113
0114 void setDTConfigBti(DTBtiId, DTConfigBti);
0115
0116
0117 void setDTConfigTraco(DTTracoId, DTConfigTraco);
0118
0119
0120 inline void setDTConfigTSTheta(DTChamberId chambid, DTConfigTSTheta conf) { my_tsthetamap[chambid] = conf; };
0121
0122
0123 inline void setDTConfigTSPhi(DTChamberId chambid, DTConfigTSPhi conf) { my_tsphimap[chambid] = conf; };
0124
0125
0126 void setDTConfigTrigUnit(DTChamberId chambid, DTConfigTrigUnit conf) { my_trigunitmap[chambid] = conf; };
0127
0128
0129 void setDTConfigLUTs(DTChamberId chambid, DTConfigLUTs conf) { my_lutmap[chambid] = conf; };
0130
0131
0132 void setDTConfigSectColl(DTSectCollId sectcollid, DTConfigSectColl conf) { my_sectcollmap[sectcollid] = conf; };
0133
0134
0135 void setDTConfigPedestals(DTConfigPedestals pedestals) { my_pedestals = pedestals; };
0136
0137
0138 inline void setDTTPGDebug(bool debug) { my_dttpgdebug = debug; }
0139
0140
0141 inline void setLutFromDB(bool lutFromDB) { my_lutfromdb = lutFromDB; }
0142
0143
0144 inline void setUseAcceptParam(bool acceptparam) { my_acceptparam = acceptparam; }
0145
0146
0147 inline void setCCBConfigValidity(bool CCBValid) { my_CCBvalid = CCBValid; }
0148
0149
0150 void dumpLUTParam(DTChamberId& chambid) const;
0151
0152 private:
0153
0154 BtiMap my_btimap;
0155 TracoMap my_tracomap;
0156 TSThetaMap my_tsthetamap;
0157 TSPhiMap my_tsphimap;
0158 TrigUnitMap my_trigunitmap;
0159 LUTMap my_lutmap;
0160 SectCollMap my_sectcollmap;
0161 DTConfigPedestals my_pedestals;
0162
0163 bool my_dttpgdebug;
0164
0165 bool my_lutfromdb;
0166 bool my_acceptparam;
0167 bool my_CCBvalid;
0168 };
0169
0170 #endif