33 FEDRawDataCollection_ = consumes<FEDRawDataCollection>(ps.
getParameter<
InputTag>(
"FEDRawDataCollection"));
50 sprintf(histo,
"ES L1A DCC errors");
51 meL1ADCCErrors_ = iBooker.
book1D(histo, histo, 56, 519.5, 575.5);
53 meL1ADCCErrors_->setAxisTitle(
"Num of Events", 2);
55 sprintf(histo,
"ES BX DCC errors");
56 meBXDCCErrors_ = iBooker.
book1D(histo, histo, 56, 519.5, 575.5);
58 meBXDCCErrors_->setAxisTitle(
"Num of Events", 2);
60 sprintf(histo,
"ES Orbit Number DCC errors");
61 meOrbitNumberDCCErrors_ = iBooker.
book1D(histo, histo, 56, 519.5, 575.5);
63 meOrbitNumberDCCErrors_->setAxisTitle(
"Num of Events", 2);
65 sprintf(histo,
"Difference between ES and GT L1A");
66 meL1ADiff_ = iBooker.
book1D(histo, histo, 201, -100.5, 100.5);
68 meL1ADiff_->setAxisTitle(
"Num of Events", 2);
70 sprintf(histo,
"Difference between ES and GT BX");
71 meBXDiff_ = iBooker.
book1D(histo, histo, 201, -100.5, 100.5);
73 meBXDiff_->setAxisTitle(
"Num of Events", 2);
75 sprintf(histo,
"Difference between ES and GT Orbit Number");
76 meOrbitNumberDiff_ = iBooker.
book1D(histo, histo, 201, -100.5, 100.5);
77 meOrbitNumberDiff_->
setAxisTitle(
"ES - GT orbit number", 1);
78 meOrbitNumberDiff_->setAxisTitle(
"Num of Events", 2);
83 LogInfo(
"ESRawDataTask") <<
"analyzed " << ievt_ <<
" events";
90 runNum_ = e.
id().
run();
92 int gt_L1A = 0, gt_OrbitNumber = 0, gt_BX = 0;
93 int esDCC_L1A_MostFreqCounts = 0;
94 int esDCC_BX_MostFreqCounts = 0;
95 int esDCC_OrbitNumber_MostFreqCounts = 0;
100 int gtFedDataSize = 0;
102 if ( e.
getByToken(FEDRawDataCollection_, allFedRawData) ) {
109 if ( gtFedDataSize > 0 ) {
118 map<int, int> esDCC_L1A_FreqMap;
119 map<int, int> esDCC_BX_FreqMap;
120 map<int, int> esDCC_OrbitNumber_FreqMap;
126 esDCC_L1A_FreqMap[esdcc.
getLV1()]++;
127 esDCC_BX_FreqMap[esdcc.
getBX()]++;
130 if (esDCC_L1A_FreqMap[esdcc.
getLV1()] > esDCC_L1A_MostFreqCounts) {
131 esDCC_L1A_MostFreqCounts = esDCC_L1A_FreqMap[esdcc.
getLV1()];
135 if (esDCC_BX_FreqMap[esdcc.
getBX()] > esDCC_BX_MostFreqCounts) {
136 esDCC_BX_MostFreqCounts = esDCC_BX_FreqMap[esdcc.
getBX()];
137 gt_BX = esdcc.
getBX();
140 if (esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()] > esDCC_OrbitNumber_MostFreqCounts) {
141 esDCC_OrbitNumber_MostFreqCounts = esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()];
147 LogWarning(
"ESRawDataTask") <<
"dccCollections not available";
152 LogWarning(
"ESRawDataTask") <<
"FEDRawDataCollection not available";
156 vector<int> fiberStatus;
167 if (dcc.
getLV1() != gt_L1A) {
168 meL1ADCCErrors_->Fill(dcc.
fedId());
170 Float_t l1a_diff = dcc.
getLV1() - gt_L1A;
171 if (l1a_diff > 100) l1a_diff = 100;
172 else if (l1a_diff < -100) l1a_diff = -100;
173 meL1ADiff_->Fill(l1a_diff);
176 if (dcc.
getBX() != gt_BX) {
177 meBXDCCErrors_->Fill(dcc.
fedId());
179 Float_t bx_diff = dcc.
getBX() - gt_BX;
180 if (bx_diff > 100) bx_diff = 100;
181 else if (bx_diff < -100) bx_diff = -100;
182 meBXDiff_->Fill(bx_diff);
185 meOrbitNumberDCCErrors_->Fill(dcc.
fedId());
188 if (orbitnumber_diff > 100) orbitnumber_diff = 100;
189 else if (orbitnumber_diff < -100) orbitnumber_diff = -100;
190 meOrbitNumberDiff_->Fill(orbitnumber_diff);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< ESDCCHeaderBlock >::const_iterator const_iterator
int bunchCrossing() const
ESRawDataTask(const edm::ParameterSet &ps)
size_t size() const
Lenght of the data buffer in bytes.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Setup.
void endJob(void) override
EndJob.
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void setCurrentFolder(std::string const &fullpath)
MonitorElement * book1D(Args &&...args)
Namespace of DDCMS conversion namespace.
const_iterator end() const
unsigned long long uint64_t
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
const_iterator begin() const