File indexing completed on 2024-04-06 12:22:15
0001 #include "L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTester.h"
0002
0003 #include "FWCore/Framework/interface/ESHandle.h"
0004 #include "FWCore/Framework/interface/EventSetup.h"
0005
0006 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManager.h"
0007 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManagerRcd.h"
0008
0009 #include "DataFormats/MuonDetId/interface/DTBtiId.h"
0010 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0011 #include "DataFormats/MuonDetId/interface/DTSectCollId.h"
0012 #include "DataFormats/MuonDetId/interface/DTTracoId.h"
0013
0014 using std::cout;
0015 using std::endl;
0016
0017 DTConfigTester::DTConfigTester(const edm::ParameterSet &ps) {
0018 cout << "DTConfigTester::DTConfigTester()" << endl;
0019
0020 my_wh = ps.getUntrackedParameter<int>("wheel");
0021 my_sec = ps.getUntrackedParameter<int>("sector");
0022 my_st = ps.getUntrackedParameter<int>("station");
0023 my_traco = ps.getUntrackedParameter<int>("traco");
0024 my_bti = ps.getUntrackedParameter<int>("bti");
0025 my_sl = ps.getUntrackedParameter<int>("sl");
0026 my_configToken = esConsumes();
0027 }
0028
0029 void DTConfigTester::analyze(const edm::Event &e, const edm::EventSetup &es) {
0030 cout << "DTConfigTester::analyze()" << endl;
0031 cout << "\tRun number :" << e.id().run() << endl;
0032 cout << "\tEvent number :" << e.id().event() << endl;
0033
0034 using namespace edm;
0035
0036 ESHandle<DTConfigManager> dtConfig = es.getHandle(my_configToken);
0037
0038 cout << "\tPrint configuration :" << endl;
0039
0040 DTBtiId btiid(my_wh, my_st, my_sec, my_sl, my_bti);
0041 DTTracoId tracoid(my_wh, my_st, my_sec, my_traco);
0042 DTChamberId chid(my_wh, my_st, my_sec);
0043 DTSectCollId scid(my_wh, my_sec);
0044
0045 dtConfig->getDTConfigBti(btiid)->print();
0046 dtConfig->getDTConfigTraco(tracoid)->print();
0047 dtConfig->getDTConfigTSTheta(chid)->print();
0048 dtConfig->getDTConfigTSPhi(chid)->print();
0049 dtConfig->getDTConfigTrigUnit(chid)->print();
0050
0051 if (dtConfig->lutFromDB())
0052 dtConfig->getDTConfigLUTs(chid)->print();
0053 else {
0054 cout << "******************************************************************"
0055 "*************"
0056 << endl;
0057 cout << "* DTTrigger configuration : LUT parameters from "
0058 "GEOMETRY *"
0059 << endl;
0060 cout << "******************************************************************"
0061 "*************"
0062 << endl;
0063 }
0064
0065 dtConfig->getDTConfigSectColl(scid)->print();
0066 dtConfig->getDTConfigPedestals()->print();
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174 return;
0175 }