31 FEDRawDataCollection_ = consumes<FEDRawDataCollection>(ps.
getParameter<
InputTag>(
"FEDRawDataCollection"));
47 sprintf(
histo,
"ES L1A DCC errors");
50 meL1ADCCErrors_->setAxisTitle(
"Num of Events", 2);
52 sprintf(
histo,
"ES BX DCC errors");
55 meBXDCCErrors_->setAxisTitle(
"Num of Events", 2);
57 sprintf(
histo,
"ES Orbit Number DCC errors");
60 meOrbitNumberDCCErrors_->setAxisTitle(
"Num of Events", 2);
62 sprintf(
histo,
"Difference between ES and GT L1A");
65 meL1ADiff_->setAxisTitle(
"Num of Events", 2);
67 sprintf(
histo,
"Difference between ES and GT BX");
70 meBXDiff_->setAxisTitle(
"Num of Events", 2);
72 sprintf(
histo,
"Difference between ES and GT Orbit Number");
74 meOrbitNumberDiff_->
setAxisTitle(
"ES - GT orbit number", 1);
75 meOrbitNumberDiff_->setAxisTitle(
"Num of Events", 2);
80 runNum_ =
e.id().run();
82 int gt_L1A = 0, gt_OrbitNumber = 0, gt_BX = 0;
83 int esDCC_L1A_MostFreqCounts = 0;
84 int esDCC_BX_MostFreqCounts = 0;
85 int esDCC_OrbitNumber_MostFreqCounts = 0;
90 int gtFedDataSize = 0;
92 if (
e.getByToken(FEDRawDataCollection_, allFedRawData)) {
98 if (gtFedDataSize > 0) {
102 gt_OrbitNumber =
e.orbitNumber();
103 gt_BX =
e.bunchCrossing();
105 map<int, int> esDCC_L1A_FreqMap;
106 map<int, int> esDCC_BX_FreqMap;
107 map<int, int> esDCC_OrbitNumber_FreqMap;
109 if (
e.getByToken(dccCollections_, dccs)) {
113 esDCC_L1A_FreqMap[esdcc.
getLV1()]++;
114 esDCC_BX_FreqMap[esdcc.
getBX()]++;
117 if (esDCC_L1A_FreqMap[esdcc.
getLV1()] > esDCC_L1A_MostFreqCounts) {
118 esDCC_L1A_MostFreqCounts = esDCC_L1A_FreqMap[esdcc.
getLV1()];
122 if (esDCC_BX_FreqMap[esdcc.
getBX()] > esDCC_BX_MostFreqCounts) {
123 esDCC_BX_MostFreqCounts = esDCC_BX_FreqMap[esdcc.
getBX()];
124 gt_BX = esdcc.
getBX();
127 if (esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()] > esDCC_OrbitNumber_MostFreqCounts) {
128 esDCC_OrbitNumber_MostFreqCounts = esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()];
133 LogWarning(
"ESRawDataTask") <<
"dccCollections not available";
137 LogWarning(
"ESRawDataTask") <<
"FEDRawDataCollection not available";
141 vector<int> fiberStatus;
142 if (
e.getByToken(dccCollections_, dccs)) {
151 if (dcc.
getLV1() != gt_L1A) {
152 meL1ADCCErrors_->Fill(dcc.
fedId());
154 Float_t l1a_diff = dcc.
getLV1() - gt_L1A;
157 else if (l1a_diff < -100)
159 meL1ADiff_->Fill(l1a_diff);
162 if (dcc.
getBX() != gt_BX) {
163 meBXDCCErrors_->Fill(dcc.
fedId());
165 Float_t bx_diff = dcc.
getBX() - gt_BX;
168 else if (bx_diff < -100)
170 meBXDiff_->Fill(bx_diff);
173 meOrbitNumberDCCErrors_->Fill(dcc.
fedId());
176 if (orbitnumber_diff > 100)
177 orbitnumber_diff = 100;
178 else if (orbitnumber_diff < -100)
179 orbitnumber_diff = -100;
180 meOrbitNumberDiff_->Fill(orbitnumber_diff);