31 bool eventAccepted =
true;
40 for (std::set<DDUIdType>::const_iterator ddu_itr = DDUs.begin(); ddu_itr != DDUs.end(); ++ddu_itr)
43 int dduID = (*ddu_itr)&0xFF;
49 LOG_WARN <<
"DDU source ID (" << (*ddu_itr) <<
") is out of valid range. Remapping to DDU ID 1.";
55 for (
int i = 0;
i < 29;
i++)
57 if ((errs >>
i) & 0
x1 )
59 mo->
Fill(dduID,
i + 1);
73 unsigned long dccBinCheckMask = 0x06080016;
75 if ((binErrorStatus & dccBinCheckMask) > 0)
77 eventAccepted =
false;
80 if (binErrorStatus != 0)
93 int crateID = (chamberID >> 4) & 0xFF;
94 int dmbSlot = chamberID & 0xF;
100 if ((crateID > 60) || (dmbSlot > 10) || (crateID <= 0) || (dmbSlot <= 0) )
108 if (!
config->fnGetCSCDetId(crateID, dmbSlot, cid))
116 long DMBEvents =
config->getChamberCounterValue(
DMB_EVENTS, crateID, dmbSlot);
122 mo->
Fill(crateID, dmbSlot);
125 unsigned int cscType = 0;
126 unsigned int cscPosition = 0;
127 if (!
getCSCFromMap(crateID, dmbSlot, cscType, cscPosition))
continue;
131 mo->
Fill(cscPosition, cscType);
136 int cfeb_dav = (payload >> 7) & 0x7F;
137 int cfeb_active = payload & 0x1F;
138 cfeb_active |= ((payload >> 14) &0x03) << 5;
139 int alct_dav = (payload >> 5) & 0
x1;
140 int tmb_dav = (payload >> 6) & 0
x1;
141 int cfeb_dav_num = 0;
147 mo->
Fill(cscPosition, cscType);
151 mo->
Fill(crateID, dmbSlot);
159 mo->
Fill(cscPosition, cscType);
163 mo->
Fill(crateID, dmbSlot);
171 mo->
Fill(cscPosition, cscType);
175 mo->
Fill(crateID, dmbSlot);
180 for (
int i=0; i<7; i++)
196 MonitorObject *mof =
nullptr, *mo1 =
nullptr, *mo2 =
nullptr;
203 for (
int i=1; i<=7; i++)
206 double unpacked_dav_num = mo2->GetBinContent(i);
209 mo1->SetBinContent(i,1, 100.*(1-unpacked_dav_num/actual_dav_num));
211 mo1->SetEntries((
int)DMBEvents);
214 for (
int i=0; i<7; i++)
216 int cfeb_present = (cfeb_dav>>
i) & 0
x1;
217 cfeb_dav_num += cfeb_present;
223 mof->
SetBinContent(i+1, ((
float)cfeb_entries/(
float)(DMBEvents)*100.0));
231 for (
unsigned short i = 1; i < 7; i++)
234 mof->
SetBinContent(i, ((
float)cfeb_entries / (
float)(DMBEvents) * 100.0));
241 for (
unsigned short i = 1; i < 9; i++)
244 float unpacked_dav_num = mo2->GetBinContent(i);
247 mo1->SetBinContent(i, 1, 100. * (1-unpacked_dav_num/actual_dav_num));
249 mo1->SetEntries((
int)DMBEvents);
252 mo->
Fill(cfeb_dav_num);
262 for (
int i = 1; i < 4; i++)
265 mo1->SetBinContent(i, ((
float)dav_num / (
float)(DMBEvents) * 100.0));
267 mo1->SetEntries((
int)DMBEvents);
272 for (
int i = 1; i < 4; i++)
275 float unpacked_dav_num = mo2->GetBinContent(i);
278 mof->
SetBinContent(i,1, 100. * (1 - unpacked_dav_num / actual_dav_num));
301 float feb_combination_dav = -1.0;
305 if (alct_dav == 0 && tmb_dav == 0 && cfeb_dav == 0) feb_combination_dav = 0.0;
306 if (alct_dav > 0 && tmb_dav == 0 && cfeb_dav == 0) feb_combination_dav = 1.0;
307 if (alct_dav == 0 && tmb_dav > 0 && cfeb_dav == 0) feb_combination_dav = 2.0;
308 if (alct_dav == 0 && tmb_dav == 0 && cfeb_dav > 0) feb_combination_dav = 3.0;
309 if (alct_dav == 0 && tmb_dav > 0 && cfeb_dav > 0) feb_combination_dav = 4.0;
310 if (alct_dav > 0 && tmb_dav > 0 && cfeb_dav == 0) feb_combination_dav = 5.0;
311 if (alct_dav > 0 && tmb_dav == 0 && cfeb_dav > 0) feb_combination_dav = 6.0;
312 if (alct_dav > 0 && tmb_dav > 0 && cfeb_dav > 0) feb_combination_dav = 7.0;
317 for (
int i = 1; i < 9; i++)
320 mo1->SetBinContent(i, ((
float)feb_combination_dav_number / (
float)(DMBEvents) * 100.0));
322 mo1->SetEntries(DMBEvents);
327 for (
int i = 1; i < 9; i++)
330 float unpacked_dav_num = mo2->GetBinContent(i);
333 mof->
SetBinContent(i, 1, 100. * (1 - unpacked_dav_num / actual_dav_num));
341 mo->
Fill(feb_combination_dav);
355 unsigned int crateID = (chamberID >> 4) & 0xFF;
356 unsigned int dmbSlot = chamberID & 0xF;
363 if ((crateID > 60) || (dmbSlot > 10) || (crateID <= 0) || (dmbSlot <= 0) )
371 if (!
config->fnGetCSCDetId(crateID, dmbSlot, cid))
377 unsigned int cscType = 0;
378 unsigned int cscPosition = 0;
379 if (!
getCSCFromMap(crateID, dmbSlot, cscType, cscPosition))
continue;
383 for (
int bit = 0; bit < binChecker.
nSTATUSES; bit++)
385 if (chStatus & (1<<bit) )
394 int anyInputFull = chStatus & 0x3F;
399 mo->
Fill(cscPosition, cscType);
403 mo->
Fill(crateID, dmbSlot);
407 int anyInputTO = (chStatus >> 7) & 0x3FFF;
412 mo->
Fill(cscPosition, cscType);
416 mo->
Fill(crateID, dmbSlot);
424 mo->
Fill(crateID, dmbSlot);
429 mo->
Fill(cscPosition, cscType);
445 const unsigned int crateID = (chamberID >> 4) & 0xFF;
446 const unsigned int dmbSlot = chamberID & 0xF;
449 if ((crateID ==255) || (chErr & 0x80))
453 if ((crateID > 60) || (dmbSlot > 10) || (crateID <= 0) || (dmbSlot <= 0) )
462 if (!
config->fnGetCSCDetId(crateID, dmbSlot, cid))
468 if ((chErr &
config->getBINCHECK_MASK()) != 0)
473 bool isCSCError =
false;
476 for (
int bit = 5; bit < 24; bit++)
479 if (chErr & (1 << bit) )
484 mo->
Fill(0., bit - 5);
504 mo->
Fill(crateID, dmbSlot);
509 mo->
Fill(crateID, dmbSlot);
512 unsigned int cscType = 0;
513 unsigned int cscPosition = 0;
514 if (!
getCSCFromMap(crateID, dmbSlot, cscType, cscPosition))
continue;
518 mo->
Fill(cscPosition, cscType);
523 mo->
Fill(cscPosition, cscType);
530 return eventAccepted;
const bool getCSCFromMap(const unsigned int &crateId, const unsigned int &dmbId, unsigned int &cscType, unsigned int &cscPosition) const
Get CSC type and position from crate and dmb identifiers.
uint32_t cntCFEBs
Total Number of DMBs per event from DDU Header DAV.
virtual void SetEntries(const double value)=0
virtual void Fill(float x)=0
Monitoring Object interface used to cover Root object and provide common interface to EventProcessor ...
static int getRUIfromDDUId(unsigned ddu_id)
Get RUI Number from DDU source ID for post LS1 configuration.
const bool getCSCHisto(const HistoId &histo, const HwId &crateID, const HwId &dmbSlot, MonitorObject *&me)
Get CSC (Chamber) Level Monitoring Object.
uint32_t cntTMBs
Total Number of ALCTs per event from DMB DAV.
uint32_t cntALCTs
Total Number of CFEBs per event from DMB DAV.
virtual void SetBinContent(const int binX, const double value)=0
CSCDetId chamberID(const CSCDetId &cscDetId)
takes layer ID, converts to chamber ID, switching ME1A to ME11
bool processExaminer(const CSCDCCExaminer &binChecker)
virtual double GetBinContent(const int binX)=0
virtual void SetMaximum(const double d)=0
const bool getEMUHisto(const HistoId &histo, MonitorObject *&me)
Get EMU (Top Level) Monitoring Object.