CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
cscdqm::EventProcessor Class Reference

Object used to process Events and compute statistics. More...

#include <CSCDQM_EventProcessor.h>

Public Member Functions

 EventProcessor (Configuration *const p_config)
 Constructor. More...
 
void init ()
 Initialize EventProcessor: reading out config information. More...
 
unsigned int maskHWElements (std::vector< std::string > &tokens)
 Mask HW elements from the efficiency calculations. Can be applied on runtime! More...
 
void standbyEfficiencyHistos (HWStandbyType &standby)
 apply standby flags/parameters More...
 
void updateEfficiencyHistos ()
 Update Efficiency MOs. More...
 
void updateFractionHistos ()
 Update Fractional MOs. More...
 
void writeShifterHistograms ()
 
 ~EventProcessor ()
 Destructor. More...
 

Private Member Functions

void calcEMUFractionHisto (const HistoId &result, const HistoId &set, const HistoId &subset)
 Calculate fractional histogram. More...
 
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. More...
 
const bool getCSCHisto (const HistoId &histo, const HwId &crateID, const HwId &dmbSlot, MonitorObject *&me)
 Get CSC (Chamber) Level Monitoring Object. More...
 
const bool getCSCHisto (const HistoId &histo, const HwId &crateID, const HwId &dmbSlot, const HwId &adId, MonitorObject *&me)
 Get CSC (Chamber) Level Monitoring Object with additional identifier. More...
 
const bool getDDUHisto (const HistoId &histo, const HwId &dduID, MonitorObject *&me)
 Get DDU Level Monitoring Object. More...
 
const bool getEMUHisto (const HistoId &histo, MonitorObject *&me)
 Get EMU (Top Level) Monitoring Object. More...
 
const bool getFEDHisto (const HistoId &histo, const HwId &fedID, MonitorObject *&me)
 Get FED Level Monitoring Object. More...
 
const bool getParHisto (const HistoId &histo, MonitorObject *&me)
 Get Parameter Monitoring Object. More...
 
void preProcessEvent ()
 Common Local and Global DQM function to be called before processing Event. More...
 
void processCSC (const CSCEventData &data, const int dduID, const CSCDCCExaminer &binChecker)
 Process Chamber Data and fill MOs. More...
 
void processDDU (const CSCDDUEventData &data, const CSCDCCExaminer &binChecker)
 Process DDU output and fill MOs. More...
 
bool processExaminer (const CSCDCCExaminer &binChecker)
 
bool processExaminer (const CSCDCCExaminer &binChecker, const CSCDCCFormatStatusDigi &digi)
 Fill monitor elements with CSCDCCFormatStatusDigi information. More...
 
void resetEmuEventDisplays ()
 Reset Emu level EventDisplay histograms once per event. More...
 
void setEmuEventDisplayBit (MonitorObject *&mo, const unsigned int x, const unsigned int y, const unsigned int bit)
 Set a single bit in the 3D Histogram (aka EMU level event display). Checks if mo and x != null. More...
 

Private Attributes

uint32_t BXN
 
uint32_t cntALCTs
 Total Number of CFEBs per event from DMB DAV. More...
 
uint32_t cntCFEBs
 Total Number of DMBs per event from DDU Header DAV. More...
 
uint32_t cntDMBs
 
uint32_t cntTMBs
 Total Number of ALCTs per event from DMB DAV. More...
 
Configurationconfig
 
bool EmuEventDisplayWasReset
 
bool fCloseL1As
 Data Format version (2005, 2013) More...
 
std::map< uint32_t, bool > fNotFirstEvent
 
edm::EDGetTokenT< FEDRawDataCollectionfrdtoken
 
uint32_t L1ANumber
 
std::map< uint32_t, uint32_t > L1ANumbers
 
Summary summary
 
uint16_t theFormatVersion
 Total Number of TMBs per event from DMB DAV. More...
 

Detailed Description

Object used to process Events and compute statistics.

Definition at line 113 of file CSCDQM_EventProcessor.h.

Constructor & Destructor Documentation

cscdqm::EventProcessor::EventProcessor ( Configuration *const  p_config)

Constructor.

Parameters
p_configPointer to Global Configuration.

Definition at line 27 of file CSCDQM_EventProcessor.cc.

References edm::ConsumesCollector::consumes(), fCloseL1As, and frdtoken.

27  {
28 
29  config = p_config;
30  // fFirstEvent = true;
31  fCloseL1As = true;
32 
33  }
Definition: config.py:1
bool fCloseL1As
Data Format version (2005, 2013)
cscdqm::EventProcessor::~EventProcessor ( )
inline

Destructor.

Definition at line 132 of file CSCDQM_EventProcessor.h.

References data, trackerHits::histo, init, and mps_fire::result.

132 { }

Member Function Documentation

void cscdqm::EventProcessor::calcEMUFractionHisto ( const HistoId result,
const HistoId set,
const HistoId subset 
)
private

Calculate fractional histogram.

Parameters
resultHistogram to write results to
setHistogram of the set
subsetHistogram of the subset

Definition at line 90 of file CSCDQM_EventProcessor_updateFracHistos.cc.

References getEMUHisto(), cscdqm::MonitorObject::getTH1Lock(), CommonMethods::lock(), cscdqm::Lock::mutex, and cscdqm::MonitorObject::SetMaximum().

Referenced by updateFractionHistos().

90  {
91 
92  MonitorObject *mo = nullptr, *mo1 = nullptr, *mo2 = nullptr;
93 
94  if (getEMUHisto(result, mo) && getEMUHisto(set, mo2) && getEMUHisto(subset, mo1)) {
95  LockType lock(mo->mutex);
96  TH1* th = mo->getTH1Lock();
97  th->Reset();
98  th->Divide(mo1->getTH1(), mo2->getTH1());
99  mo->SetMaximum(1.);
100  }
101 
102  }
const bool getEMUHisto(const HistoId &histo, MonitorObject *&me)
Get EMU (Top Level) Monitoring Object.
const bool cscdqm::EventProcessor::getCSCFromMap ( const unsigned int &  crateId,
const unsigned int &  dmbId,
unsigned int &  cscType,
unsigned int &  cscPosition 
) const
private

Get CSC type and position from crate and dmb identifiers.

Parameters
crateIdCSC crate identifier
dmbIdCSC DMB identifier
cscTypeCSC Type identifier to return
cscPositionCSC Position identifier to return
Returns
true if parameters where found and filled, false - otherwise

Definition at line 159 of file CSCDQM_EventProcessor.cc.

References CSCDetId::chamber(), CSCDetId::endcap(), cscdqm::Utility::getCSCTypeBin(), cscdqm::Utility::getCSCTypeLabel(), mps_fire::result, CSCDetId::ring(), CSCDetId::station(), AlCaHLTBitMon_QueryRunRegistry::string, and compare::tlabel.

Referenced by processCSC(), and processExaminer().

159  {
160  bool result = false;
161 
162  CSCDetId cid;
163  if (config->fnGetCSCDetId(crateId, dmbId, cid)) {
164  cscPosition = cid.chamber();
165  int iring = cid.ring();
166  int istation = cid.station();
167  int iendcap = cid.endcap();
168  std::string tlabel = cscdqm::Utility::getCSCTypeLabel(iendcap, istation, iring);
169  cscType = cscdqm::Utility::getCSCTypeBin(tlabel);
170  result = true;
171  }
172 
173  /*
174  if (!result) {
175  LOG_ERROR << "Event #" << config->getNEvents() << ": Invalid CSC=" << CSCHistoDef::getPath(crateId, dmbId);
176  }
177  */
178 
179  return result;
180 
181  }
int chamber() const
Definition: CSCDetId.h:68
Definition: config.py:1
int endcap() const
Definition: CSCDetId.h:93
static std::string getCSCTypeLabel(int endcap, int station, int ring)
Get CSC label from CSC parameters.
tlabel
Definition: compare.py:24
static int getCSCTypeBin(const std::string &cstr)
Get CSC y-axis position from chamber string.
int ring() const
Definition: CSCDetId.h:75
int station() const
Definition: CSCDetId.h:86
const bool cscdqm::EventProcessor::getCSCHisto ( const HistoId histo,
const HwId crateID,
const HwId dmbSlot,
MonitorObject *&  me 
)
private

Get CSC (Chamber) Level Monitoring Object.

Parameters
histoMO identification
crateIDChamber Crate identifier
dmbSlotChamber DMB identifier
meMO to return
Returns
true if MO was found, false - otherwise

Definition at line 114 of file CSCDQM_EventProcessor.cc.

Referenced by processCSC(), processExaminer(), and updateFractionHistos().

114  {
115  if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, 0, me)) return (me != nullptr);
116  CSCHistoDef histoD(histo, crateID, dmbSlot);
117  if (config->fnGetHisto(histoD, me)) return (me != nullptr);
118  return false;
119  }
Definition: config.py:1
const bool cscdqm::EventProcessor::getCSCHisto ( const HistoId histo,
const HwId crateID,
const HwId dmbSlot,
const HwId adId,
MonitorObject *&  me 
)
private

Get CSC (Chamber) Level Monitoring Object with additional identifier.

Parameters
histoMO identification
crateIDChamber Crate identifier
dmbSlotChamber DMB identifier
adIdAdditional identifier, i.e. Layer number, CLCT number, etc.
meMO to return
Returns
true if MO was found, false - otherwise

Definition at line 131 of file CSCDQM_EventProcessor.cc.

131  {
132  if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, adId, me)) return (me != nullptr);
133  CSCHistoDef histoD(histo, crateID, dmbSlot, adId);
134  if (config->fnGetHisto(histoD, me)) return (me != nullptr);
135  return false;
136  }
Definition: config.py:1
const bool cscdqm::EventProcessor::getDDUHisto ( const HistoId histo,
const HwId dduID,
MonitorObject *&  me 
)
private

Get DDU Level Monitoring Object.

Parameters
histoMO identification
dduIDDDU identifier
meMO to return
Returns
true if MO was found, false - otherwise

Definition at line 99 of file CSCDQM_EventProcessor.cc.

Referenced by processDDU().

99  {
100  if (config->fnGetCacheDDUHisto(histo, dduID, me)) return (me != nullptr);
101  DDUHistoDef histoD(histo, dduID);
102  if (config->fnGetHisto(histoD, me)) return (me != nullptr);
103  return false;
104  }
Definition: config.py:1
const bool cscdqm::EventProcessor::getEMUHisto ( const HistoId histo,
MonitorObject *&  me 
)
private

Get EMU (Top Level) Monitoring Object.

Parameters
histoMO identification
meMO to return
Returns
true if MO was found, false - otherwise

Definition at line 71 of file CSCDQM_EventProcessor.cc.

Referenced by calcEMUFractionHisto(), preProcessEvent(), processCSC(), processDDU(), processExaminer(), resetEmuEventDisplays(), standbyEfficiencyHistos(), updateEfficiencyHistos(), and writeShifterHistograms().

71  {
72  if (config->fnGetCacheEMUHisto(histo, me)) return (me != nullptr);
73  EMUHistoDef histoD(histo);
74  if (config->fnGetHisto(histoD, me)) return (me != nullptr);
75  return false;
76  }
Definition: config.py:1
const bool cscdqm::EventProcessor::getFEDHisto ( const HistoId histo,
const HwId fedID,
MonitorObject *&  me 
)
private

Get FED Level Monitoring Object.

Parameters
histoMO identification
fedIDFED identifier
meMO to return
Returns
true if MO was found, false - otherwise

Definition at line 85 of file CSCDQM_EventProcessor.cc.

Referenced by preProcessEvent().

85  {
86  if (config->fnGetCacheFEDHisto(histo, fedID, me)) return (me != nullptr);
87  FEDHistoDef histoD(histo, fedID);
88  if (config->fnGetHisto(histoD, me)) return (me != nullptr);
89  return false;
90  }
Definition: config.py:1
const bool cscdqm::EventProcessor::getParHisto ( const HistoId histo,
MonitorObject *&  me 
)
private

Get Parameter Monitoring Object.

Parameters
histoMO identification
meMO to return
Returns
true if MO was found, false - otherwise

Definition at line 144 of file CSCDQM_EventProcessor.cc.

Referenced by updateEfficiencyHistos().

144  {
145  if (config->fnGetCacheParHisto(histo, me)) return (me != nullptr);
146  ParHistoDef histoD(histo);
147  if (config->fnGetHisto(histoD, me)) return (me != nullptr);
148  return false;
149  }
Definition: config.py:1
void cscdqm::EventProcessor::init ( void  )

Initialize EventProcessor: reading out config information.

Definition at line 61 of file CSCDQM_EventProcessor.cc.

Referenced by cscdqm::Dispatcher::book().

61  {
62 
63  }
unsigned int cscdqm::EventProcessor::maskHWElements ( std::vector< std::string > &  tokens)

Mask HW elements from the efficiency calculations. Can be applied on runtime!

Parameters
tokensString tokens of the HW elements
Returns
elements masked

Definition at line 189 of file CSCDQM_EventProcessor.cc.

References LOG_INFO, cscdqm::Summary::setMaskedHWElements(), and summary.

Referenced by cscdqm::EventProcessorMutex::maskHWElements().

189  {
190  unsigned int masked = summary.setMaskedHWElements(tokens);
191  LOG_INFO << masked << " HW Elements masked";
192  return masked;
193  }
const unsigned int setMaskedHWElements(std::vector< std::string > &tokens)
Read HW element masks (strings), create Address and apply to detector map.
#define LOG_INFO
Definition: CSCDQM_Logger.h:43
void cscdqm::EventProcessor::preProcessEvent ( )
private

Common Local and Global DQM function to be called before processing Event.

Definition at line 27 of file CSCDQM_EventProcessor_processEvent.cc.

References CSCDCCExaminer::check(), cntALCTs, cntCFEBs, cntDMBs, cntTMBs, CSCDCCExaminer::crcALCT(), CSCDCCExaminer::crcCFEB(), CSCDCCExaminer::crcTMB(), FEDRawData::data(), data, CSCDCCEventData::dccHeader(), CSCDCCEventData::dduData(), MillePedeFileConverter_cfg::e, cscdqm::h::EMU_ALL_READOUT_ERRORS, cscdqm::h::EMU_FED_BUFFER_SIZE, cscdqm::h::EMU_FED_DDU_L1A_MISMATCH, cscdqm::h::EMU_FED_DDU_L1A_MISMATCH_CNT, cscdqm::h::EMU_FED_DDU_L1A_MISMATCH_WITH_CSC_DATA, cscdqm::h::EMU_FED_DDU_L1A_MISMATCH_WITH_CSC_DATA_CNT, cscdqm::h::EMU_FED_ENTRIES, cscdqm::h::EMU_FED_EVENT_SIZE, cscdqm::h::EMU_FED_FATAL, cscdqm::h::EMU_FED_FORMAT_ERRORS, cscdqm::h::EMU_FED_FORMAT_FATAL, cscdqm::h::EMU_FED_NONFATAL, cscdqm::h::EMU_FED_STATS, cscdqm::h::EMU_FED_TOTAL_ALCT_NUMBER, cscdqm::h::EMU_FED_TOTAL_CFEB_NUMBER, cscdqm::h::EMU_FED_TOTAL_CSC_NUMBER, cscdqm::h::EMU_FED_TOTAL_TMB_NUMBER, EmuEventDisplayWasReset, CSCDCCExaminer::errors(), CSCDCCExaminer::errorsDetailed(), CSCDCCExaminer::errorsDetailedDDU(), cscdqm::h::FED_BUFFER_SIZE, FEDRawDataCollection::FEDData(), cscdqm::MonitorObject::Fill(), frdtoken, edm::Event::getByToken(), CSCDCCHeader::getCDFEventNumber(), getEMUHisto(), getFEDHisto(), CSCDCCExaminer::getMask(), RecoTauValidation_cfi::header, mps_fire::i, triggerObjects_cff::id, HiClusterCompatibility_cfi::inputTag, createfilelist::int, LOG_WARN, FEDNumbering::MAXCSCDDUFEDID, FEDNumbering::MAXCSCFEDID, FEDNumbering::MINCSCDDUFEDID, FEDNumbering::MINCSCFEDID, CSCDCCExaminer::modeDDU(), CSCDCCExaminer::payloadDetailed(), processDDU(), processEvent(), processExaminer(), matplotRender::rawdata, CSCDCCExaminer::setMask(), FEDRawData::size(), CSCDCCExaminer::statusDetailed(), tmp, CSCDCCExaminer::warnings(), and globals_cff::x1.

28 {
29 
30  config->incNEvents();
32 
33 }
Definition: config.py:1
void cscdqm::EventProcessor::processCSC ( const CSCEventData data,
const int  dduID,
const CSCDCCExaminer binChecker 
)
private

Process Chamber Data and fill MOs.

Parameters
dataChamber data to process
dduIDDDU identifier

DMB Found

Unpacking of DMB Header and trailer

Unpacking of Chamber Identification number

Efficiency of the chamber

Unpacking L1A number from DMB header

DMB L1A: 8bits (256)

DDU L1A: 24bits

Calculate difference between L1A numbers from DDU and DMB

LOG_DEBUG << dmbHeaderL1A << " : DMB L1A - DDU L1A = " << dmb_ddu_l1a_diff;

Unpacking BXN number from DMB header

== DMB BXN: 12bits (4096) call bxn12(), bxn() return 7bits value

== DDU BXN: 12bits (4096)

== Use 6-bit BXN

Calculation difference between BXN numbers from DDU and DMB

dmb_ddu_bxn_diff = (int)(dmbHeaderBXN-(int)(BXN&0x7F)); // For older DMB

LOG_DEBUG << dmbHeaderBXN << " : DMB BXN - DDU BXN = " << dmb_ddu_bxn_diff;

if (getCSCHisto(h::CSC_DMB_BXN_VS_DDU_BXN, crateID, dmbID, mo)) mo->Fill((int)(BXN), (int)dmbHeaderBXN);

Unpacking CFEB information from DMB header

mo->SetEntries(config->getNEvents());

if (getCSCHisto(h::CSC_DMB_CFEB_ACTIVE, crateID, dmbID, mo) mo->Fill((dmbTrailer->header_1a>>5)&0x1F); //KK

if (getCSCHisto(h::CSC_DMB_CFEB_ACTIVE_VS_DAV, crateID, dmbID, mo)) mo->Fill(dmbHeader->cfebAvailable(),(int)((dmbTrailer->header_1a>>5)&0x1F)); //KK

if (getCSCHisto(h::CSC_DMB_CFEB_ACTIVE_VS_DAV, crateID, dmbID, mo)) mo->Fill(dmbHeader->cfebAvailable(),dmbHeader->cfebActive()); //KK

DMB input (7 in total) FIFO stuff goes here

DMB input timeout (total 15 bits) goes here

Get FEBs Data Available Info

Fill Hisogram for FEB DAV Efficiency

Fill Hisogram for Different Combinations of FEB DAV Efficiency

ALCT Found

Set number of ALCT-events to third bin

KK

h[hname]->SetBinContent(3, ((float)ALCTEvent/(float)(config->getNEvents()) * 100.0));

KKend

== ALCT2007 L1A: 12bits (4096)

== ALCT2006 L1A: 4bits (16)

== Use 6-bit L1A

int alct_dmb_l1a_diff = (int)((dmbHeader->l1a()&0xF)-alctHeader->L1Acc());

if (getCSCHisto(h::CSC_DMB_L1A_VS_ALCT_L1A, crateID, dmbID, mo)) mo->Fill(alctHeader->L1Acc(),dmbHeader->l1a());

=== ALCT BXN: 12bits (4096)

=== Use 6-bit BXN

if (getCSCHisto(h::CSC_ALCT_BXN_VS_DMB_BXN, crateID, dmbID, mo)) mo->Fill((int)((alctHeader->BXNCount())), (int)(dmbHeader->bxn()));

LOG_DEBUG << "ALCT Trailer Word Count = " << dec << (int)alctTrailer->wordCount();

TODO: Add support for more than 2 ALCTs

int tbin = wireDigisItr->getBeamCrossingTag();

ALCT not found

ALCT and CLCT coinsidence

if (getCSCHisto(h::CSC_TMB_BXN_VS_ALCT_BXN, crateID, dmbID, mo)) mo->Fill((int)((alctHeader->BXNCount())),(int)(tmbHeader->BXNCount()));

CLCT Found

LOG_WARN << "TMB CRC calc: 0x" << std::hex << data.tmbData().TMBCRCcalc() << " trailer: 0x" << std::hex << data.tmbData().tmbTrailer().crc22();

Set number of CLCT-events to forth bin

Use 6-bit L1A

if (getCSCHisto(h::CSC_DMB_L1A_VS_CLCT_L1A, crateID, dmbID, mo)) mo->Fill(tmbHeader->L1ANumber(),dmbHeader->l1a());

if (getCSCHisto(h::CSC_CLCT_BXN_VS_DMB_BXN, crateID, dmbID, mo)) mo->Fill(tmbHeader->BXNCount(),dmbHeader->bxn());

LOG_DEBUG << "TMB Trailer Word Count = " << dec << (int)tmbTrailer->wordCount();

LOG_DEBUG << "CLCT BX = " << clctsDatas[lct].getBX() << " TMB BX = " << tmbHeader->BXNCount() << " 03 = " << (int)(tmbHeader->BXNCount()&0x3);

LOG_DEBUG << "diff = " << clctsDatas[lct].getBX()-(tmbHeader->BXNCount()&0x3);

int pattern_clct = (int)((clctsDatas[lct].getPattern()>>1)&0x3);

pattern_clct = Number of patterns in CLCT

Last (left) bit is bend. Positive bend = 1, negative bend = 0

pattern_clct = Number of patterns in CLCT

Last (left) bit is bend. Positive bend = 1, negative bend = 0

=VB= Fix to get right hafstrip

if (norm < 1.0) norm=1;

CLCT not found

CFEB found

bool DebugCFEB = false;

–————B

int NmbCell, SCA_Nmb_FC;

–————E

–————B

int TrigTimeData[N_CFEBs*16][N_Samples][N_Layers];

memset(TrigTimeData, 0, sizeof(TrigTimeData));

–————E

CFEB Found

-————B

-————E

LOG_DEBUG << "NEvents = " << config->getNEvents();

LOG_DEBUG << "Chamber ID = "<< cscTag << " Crate ID = "<< crateID << " DMB ID = " << dmbID << "nCFEB =" << nCFEB;

=VB= Optimizations for faster histogram object access

LOG_DEBUG << " nSample = " << nSample;

=VB= Optimizations for faster histogram object access

if (mo_CFEB_DMB_L1A_diff)

LOG_DEBUG << " nSample = " << nSample;

for(int nLayer = 1; nLayer <= N_Layers; ++nLayer)

–————B

L1_Pipe_Count = (timeSlice[nCFEB][nSample])->get_L1A_number();

LOG_DEBUG << "SCA BLOCK: Chamber=" << chamberID << " CFEB=" << nCFEB + 1

<<" TRIGTIME="<<TrigTime<<" TimeSlice="<<nSample+1<<" Layer="<<nLayer<<" SCA_BLK="<<SCA_BLK;

if(res<=1) TrigTimeData[nCFEB*16+nStrip][nSample][nLayer-1] = TrigTime;

LOG_DEBUG << "*********"<<" TRIGTIME="<<TrigTime<<" BIT COUNT="<<bit_count;

SCA Block Occupancy Histograms

if (getCSCHisto(h::CSC_CFEBXX_SCA_BLOCK_OCCUPANCY, crateID, dmbID, nCFEB + 1, mo)) mo->Fill(SCA_BLK);

Free SCA Cells

if (getCSCHisto(h::CSC_CFEBXX_FREE_SCA_CELLS, crateID, dmbID, nCFEB + 1, mo))

Number of SCA Blocks Locked by LCTs

if (getCSCHisto(h::CSC_CFEBXX_SCA_BLOCKS_LOCKED_BY_LCTS, crateID, dmbID, nCFEB + 1, mo))

Number of SCA Blocks Locked by LCTxL1

if (getCSCHisto(h::CSC_CFEBXX_SCA_BLOCKS_LOCKED_BY_LCTXL1, crateID, dmbID, nCFEB + 1, mo))

–————E

LOG_DEBUG << "nCFEB " << nCFEB << " nSample " << nSample << " nLayer " << nLayer << " TrigTime " << TrigTime;

LOG_DEBUG << "L1APhase " << L1APhase << " UnpackedTrigTime " << UnpackedTrigTime;

LOG_DEBUG << " nStrip="<< dec << nStrip << " ADC=" << std::hex << ADC;

LOG_DEBUG << " nStrip="<< dec << nStrip << " Pedestal=" << std::hex << Pedestal[nCFEB][nLayer-1][nStrip-1];

if (getCSCHisto(h::CSC_CFEB_OUT_OFF_RANGE_STRIPS_LYXX, crateID, dmbID, nLayer, mo))

if (getCSCHisto(h::CSC_CFEB_ACTIVE_SAMPLES_VS_STRIP_LYXX, crateID, dmbID, nLayer, mo))

if (getCSCHisto(h::CSC_CFEB_ACTIVE_SAMPLES_VS_STRIP_LYXX_PROFILE, crateID, dmbID, nLayer, mo))

if (getCSCHisto(h::CSC_CFEB_ACTIVESTRIPS_LYXX, crateID, dmbID, nLayer, mo))

–————B

LOG_DEBUG << "Layer="<<nLayer<<" Strip="<<nCFEB*16+nStrip<<" Time="<<nSample << " ADC-PEDEST = "<<ADC - Pedestal[nCFEB][nLayer-1][nStrip-1];

–————E

continue;

–————B

if (getCSCHisto(h::CSC_CFEB_PEDESTAL__WITHEMV__SAMPLE_01_LYXX, crateID, dmbID, nLayer, mo))

if (getCSCHisto(h::CSC_CFEB_PEDESTAL__WITHRMS__SAMPLE_01_LYXX, crateID, dmbID, nLayer, mo))

if (getCSCHisto(h::CSC_CFEB_PEDESTALRMS_SAMPLE_01_LYXX, crateID, dmbID, nLayer, mo))

–————E

–————B

Refactored for performance (VR)

StripClusterFinder *ClusterFinder = new StripClusterFinder(N_Layers, N_Samples, N_CFEBs, N_Strips);

LOG_DEBUG << "*** CATHODE PART DEBUG: Layer=" << nLayer <<" Number of Clusters=" << Clus.size() << " ***";

Number of Clusters Histograms

LOG_DEBUG << "Strip: " << Clus[u].ClusterPulseMapHeight[k].channel_+1;

Clusters Charge Histograms

Width of Clusters Histograms

Cluster Duration Histograms

delete ClusterFinder;

--------——E

Fill Hisogram for Different Combinations of FEBs Unpacked vs DAV

Definition at line 83 of file CSCDQM_EventProcessor_processCSC.cc.

References a, funct::abs(), CSCCFEBDataWord::adcCounts, CSCCFEBDataWord::adcOverflow, CSCDMBTrailer::alct_empty(), CSCDMBTrailer::alct_endtimeout(), CSCDMBTrailer::alct_full(), CSCDMBTrailer::alct_half(), CSCDMBTrailer::alct_starttimeout(), cscdqm::ALCT_TRIGGERS, CSCEventData::alctData(), CSCALCTHeader::ALCTDigis(), CSCALCTHeader::alctFirmwareVersion(), CSCEventData::alctHeader(), CSCTMBHeader::ALCTMatchTime(), CSCTMBHeader::ALCTOnly(), CSCEventData::alctTrailer(), b, BXN, CSCTMBHeader::Bxn0Diff(), CSCDMBHeader::bxn12(), CSCTMBHeader::Bxn1Diff(), CSCTMBHeader::BXNCount(), CSCALCTHeader::BXNCount(), CSCDMBTrailer::cfeb_empty(), CSCDMBTrailer::cfeb_endtimeout(), CSCDMBTrailer::cfeb_full(), CSCDMBTrailer::cfeb_half(), CSCDMBTrailer::cfeb_starttimeout(), cscdqm::CFEB_TRIGGERS, CSCDMBHeader::cfebActive(), CSCDMBHeader::cfebAvailable(), CSCEventData::cfebData(), CSCDMBHeader::cfebMovlp(), cscd2r::chamberID(), CSCCFEBData::check(), CSCCLCTData::check(), cscdqm::CLCT_TRIGGERS, CSCEventData::clctData(), CSCTMBHeader::CLCTDigis(), CSCTMBHeader::CLCTOnly(), CSCCLCTData::comparatorDigis(), CSCDMBHeader::crateID(), cscdqm::h::CSC_ALCT1_VS_ALCT0_KEYWG, cscdqm::h::CSC_ALCT_BXN, cscdqm::h::CSC_ALCT_BXN_VS_DMB_BXN, cscdqm::h::CSC_ALCT_DMB_BXN_DIFF, cscdqm::h::CSC_ALCT_DMB_L1A_DIFF, cscdqm::h::CSC_ALCT_L1A, cscdqm::h::CSC_ALCT_LYXX_EFFICIENCY, cscdqm::h::CSC_ALCT_LYXX_RATE, cscdqm::h::CSC_ALCT_MATCH_TIME, cscdqm::h::CSC_ALCT_NUMBER_EFFICIENCY, cscdqm::h::CSC_ALCT_NUMBER_OF_LAYERS_WITH_HITS, cscdqm::h::CSC_ALCT_NUMBER_OF_WIREGROUPS_WITH_HITS, cscdqm::h::CSC_ALCT_NUMBER_RATE, cscdqm::h::CSC_ALCT_WORD_COUNT, cscdqm::h::CSC_ALCTTIME_LYXX, cscdqm::h::CSC_ALCTTIME_LYXX_PROFILE, cscdqm::h::CSC_ALCTXX_BXN, cscdqm::h::CSC_ALCTXX_DTIME, cscdqm::h::CSC_ALCTXX_DTIME_PROFILE, cscdqm::h::CSC_ALCTXX_DTIME_VS_KEYWG, cscdqm::h::CSC_ALCTXX_KEYWG, cscdqm::h::CSC_ALCTXX_PATTERN, cscdqm::h::CSC_ALCTXX_PATTERN_DISTR, cscdqm::h::CSC_ALCTXX_QUALITY, cscdqm::h::CSC_ALCTXX_QUALITY_DISTR, cscdqm::h::CSC_ALCTXX_QUALITY_PROFILE, cscdqm::h::CSC_CFEB_ACTIVE_SAMPLES_VS_STRIP_LYXX, cscdqm::h::CSC_CFEB_ACTIVE_SAMPLES_VS_STRIP_LYXX_PROFILE, cscdqm::h::CSC_CFEB_ACTIVESTRIPS_LYXX, cscdqm::h::CSC_CFEB_AFEB_RAWHITS_TIMEBINS, cscdqm::h::CSC_CFEB_CLUSTER_DURATION_LY_XX, cscdqm::h::CSC_CFEB_CLUSTERS_CHARGE_LY_XX, cscdqm::h::CSC_CFEB_COMPARATORS_TIMESAMPLES, cscdqm::h::CSC_CFEB_NUMBER_OF_CLUSTERS_LY_XX, cscdqm::h::CSC_CFEB_OUT_OFF_RANGE_STRIPS_LYXX, cscdqm::h::CSC_CFEB_PEDESTAL_WITHEMV_SAMPLE_01_LYXX, cscdqm::h::CSC_CFEB_PEDESTAL_WITHRMS_SAMPLE_01_LYXX, cscdqm::h::CSC_CFEB_PEDESTALRMS_SAMPLE_01_LYXX, cscdqm::h::CSC_CFEB_SCA_CELL_PEAK_LY_XX, cscdqm::h::CSC_CFEB_SCA_CELLPEAK_TIME, cscdqm::h::CSC_CFEB_WIDTH_OF_CLUSTERS_LY_XX, cscdqm::h::CSC_CFEBXX_DMB_L1A_DIFF, cscdqm::h::CSC_CFEBXX_FREE_SCA_CELLS, cscdqm::h::CSC_CFEBXX_L1A_SYNC_TIME, cscdqm::h::CSC_CFEBXX_L1A_SYNC_TIME_DMB_DIFF, cscdqm::h::CSC_CFEBXX_L1A_SYNC_TIME_VS_DMB, cscdqm::h::CSC_CFEBXX_LCT_PHASE_VS_L1A_PHASE, cscdqm::h::CSC_CFEBXX_SCA_BLOCK_OCCUPANCY, cscdqm::h::CSC_CFEBXX_SCA_BLOCKS_LOCKED_BY_LCTS, cscdqm::h::CSC_CFEBXX_SCA_BLOCKS_LOCKED_BY_LCTXL1, cscdqm::h::CSC_CLCT0_CLCT1_CLSSIFICATION, cscdqm::h::CSC_CLCT0_CLSSIFICATION, cscdqm::h::CSC_CLCT0_KEYDISTRIP_VS_ALCT0_KEYWIREGROUP, cscdqm::h::CSC_CLCT1_VS_CLCT0_KEY_STRIP, cscdqm::h::CSC_CLCT_BXN, cscdqm::h::CSC_CLCT_BXN_VS_DMB_BXN, cscdqm::h::CSC_CLCT_DMB_BXN_DIFF, cscdqm::h::CSC_CLCT_DMB_L1A_DIFF, cscdqm::h::CSC_CLCT_HALF_STRIP_PATTERN_DISTR, cscdqm::h::CSC_CLCT_L1A, cscdqm::h::CSC_CLCT_LYXX_EFFICIENCY, cscdqm::h::CSC_CLCT_LYXX_RATE, cscdqm::h::CSC_CLCT_NUMBER, cscdqm::h::CSC_CLCT_NUMBER_OF_HALFSTRIPS_WITH_HITS, cscdqm::h::CSC_CLCT_NUMBER_OF_LAYERS_WITH_HITS, cscdqm::h::CSC_CLCT_NUMBER_RATE, cscdqm::h::CSC_CLCTTIME_LYXX, cscdqm::h::CSC_CLCTTIME_LYXX_PROFILE, cscdqm::h::CSC_CLCTXX_BXN, cscdqm::h::CSC_CLCTXX_DISTRIP_PATTERN, cscdqm::h::CSC_CLCTXX_DISTRIP_QUALITY, cscdqm::h::CSC_CLCTXX_DISTRIP_QUALITY_PROFILE, cscdqm::h::CSC_CLCTXX_DTIME, cscdqm::h::CSC_CLCTXX_DTIME_PROFILE, cscdqm::h::CSC_CLCTXX_DTIME_VS_DISTRIP, cscdqm::h::CSC_CLCTXX_DTIME_VS_HALF_STRIP, cscdqm::h::CSC_CLCTXX_HALF_STRIP_PATTERN, cscdqm::h::CSC_CLCTXX_HALF_STRIP_QUALITY, cscdqm::h::CSC_CLCTXX_HALF_STRIP_QUALITY_DISTR, cscdqm::h::CSC_CLCTXX_HALF_STRIP_QUALITY_PROFILE, cscdqm::h::CSC_CLCTXX_KEYDISTRIP, cscdqm::h::CSC_CLCTXX_KEYHALFSTRIP, cscdqm::h::CSC_CSC_EFFICIENCY, cscdqm::h::CSC_CSC_RATE, cscdqm::h::CSC_DMB_BXN_DISTRIB, cscdqm::h::CSC_DMB_BXN_VS_DDU_BXN, cscdqm::h::CSC_DMB_CFEB_ACTIVE, cscdqm::h::CSC_DMB_CFEB_DAV, cscdqm::h::CSC_DMB_CFEB_DAV_MULTIPLICITY, cscdqm::h::CSC_DMB_CFEB_MOVLP, cscdqm::h::CSC_DMB_CFEB_SYNC, cscdqm::h::CSC_DMB_DDU_BXN_DIFF, cscdqm::h::CSC_DMB_DDU_L1A_DIFF, cscdqm::h::CSC_DMB_FEB_COMBINATIONS_DAV_EFFICIENCY, cscdqm::h::CSC_DMB_FEB_COMBINATIONS_DAV_RATE, cscdqm::h::CSC_DMB_FEB_COMBINATIONS_UNPACKED_VS_DAV, cscdqm::h::CSC_DMB_FEB_DAV_EFFICIENCY, cscdqm::h::CSC_DMB_FEB_DAV_RATE, cscdqm::h::CSC_DMB_FEB_TIMEOUTS, cscdqm::h::CSC_DMB_FEB_UNPACKED_VS_DAV, cscdqm::h::CSC_DMB_FIFO_STATS, cscdqm::h::CSC_DMB_L1_PIPE, cscdqm::h::CSC_DMB_L1A_DISTRIB, cscdqm::h::CSC_DMB_L1A_VS_ALCT_L1A, cscdqm::h::CSC_DMB_L1A_VS_CLCT_L1A, cscdqm::h::CSC_DMB_L1A_VS_DDU_L1A, cscdqm::h::CSC_EVENT_DISPLAY_NOXX, cscdqm::h::CSC_LCT0_MATCH_BXN_DIFFERENCE, cscdqm::h::CSC_LCT1_MATCH_BXN_DIFFERENCE, cscdqm::h::CSC_LCT_MATCH_STATUS, cscdqm::h::CSC_TMB_ALCT_BXN_DIFF, cscdqm::h::CSC_TMB_ALCT_L1A_DIFF, cscdqm::h::CSC_TMB_BXN_VS_ALCT_BXN, cscdqm::h::CSC_TMB_L1A_VS_ALCT_L1A, cscdqm::h::CSC_TMB_WORD_COUNT, cscdqm::DMB_EVENTS, CSCDMBTrailer::dmb_l1pipe(), cscdqm::DMB_TRIGGERS, CSCDMBHeader::dmbCfebSync(), CSCEventData::dmbHeader(), CSCDMBHeader::dmbID(), CSCEventData::dmbTrailer(), cscdqm::StripClusterFinder::DoAction(), cscdqm::h::EMU_CSC_AFEB_ENDCAP_MINUS_RAWHITS_TIME, cscdqm::h::EMU_CSC_AFEB_ENDCAP_PLUS_RAWHITS_TIME, cscdqm::h::EMU_CSC_AFEB_RAWHITS_TIME_MEAN, cscdqm::h::EMU_CSC_AFEB_RAWHITS_TIME_RMS, cscdqm::h::EMU_CSC_ALCT0_BXN_MEAN, cscdqm::h::EMU_CSC_ALCT0_BXN_RMS, cscdqm::h::EMU_CSC_ALCT0_ENDCAP_MINUS_DTIME, cscdqm::h::EMU_CSC_ALCT0_ENDCAP_PLUS_DTIME, cscdqm::h::EMU_CSC_ALCT0_QUALITY, cscdqm::h::EMU_CSC_ALCT_CLCT_MATCH_MEAN, cscdqm::h::EMU_CSC_ALCT_CLCT_MATCH_RMS, cscdqm::h::EMU_CSC_ALCT_PLANES_WITH_HITS, cscdqm::h::EMU_CSC_CFEB_COMPARATORS_TIME_MEAN, cscdqm::h::EMU_CSC_CFEB_COMPARATORS_TIME_RMS, cscdqm::h::EMU_CSC_CFEB_SCA_CELLPEAK_TIME_MEAN, cscdqm::h::EMU_CSC_CFEB_SCA_CELLPEAK_TIME_RMS, cscdqm::h::EMU_CSC_CLCT0_BXN_MEAN, cscdqm::h::EMU_CSC_CLCT0_BXN_RMS, cscdqm::h::EMU_CSC_CLCT0_QUALITY, cscdqm::h::EMU_CSC_CLCT_PLANES_WITH_HITS, cscdqm::h::EMU_CSC_ENDCAP_MINUS_ALCT_CLCT_MATCH_TIME, cscdqm::h::EMU_CSC_ENDCAP_MINUS_CFEB_COMPARATORS_TIME, cscdqm::h::EMU_CSC_ENDCAP_MINUS_CLCT0_DTIME, cscdqm::h::EMU_CSC_ENDCAP_PLUS_ALCT_CLCT_MATCH_TIME, cscdqm::h::EMU_CSC_ENDCAP_PLUS_CFEB_COMPARATORS_TIME, cscdqm::h::EMU_CSC_ENDCAP_PLUS_CLCT0_DTIME, cscdqm::h::EMU_CSC_L1A_OUT_OF_SYNC, cscdqm::h::EMU_CSC_MINUS_ENDCAP_CFEB_SCA_CELLPEAK_TIME, cscdqm::h::EMU_CSC_PLUS_ENDCAP_CFEB_SCA_CELLPEAK_TIME, cscdqm::h::EMU_CSC_UNPACKED, cscdqm::h::EMU_DMB_L1A_OUT_OF_SYNC, cscdqm::h::EMU_DMB_UNPACKED, cscdqm::h::EMU_EVENT_DISPLAY_ANODE, cscdqm::h::EMU_EVENT_DISPLAY_CATHODE, cscdqm::h::EMU_EVENT_DISPLAY_XY, CSCDetId::endcap(), CSCDCCExaminer::errorsForChamber(), cscdqm::EVENT_DISPLAY_PLOT, fCloseL1As, cscdqm::MonitorObject::Fill(), lumiContext::fill, plotBeamSpotDB::first, objects.autophobj::float, hgcalDigitizer_cfi::fwVersion, CSCCFEBTimeSlice::get_buffer_count(), CSCCFEBTimeSlice::get_l1pipe_empty(), CSCCFEBTimeSlice::get_l1pipe_full(), CSCCFEBTimeSlice::get_lctpipe_count(), CSCCFEBTimeSlice::get_lctpipe_empty(), CSCCFEBTimeSlice::get_lctpipe_full(), CSCCFEBTimeSlice::get_n_free_sca_blocks(), cscdqm::MonitorObject::GetBinContent(), cscdqm::MonitorObject::GetBinError(), cscdqm::StripClusterFinder::getClusters(), getCSCFromMap(), getCSCHisto(), cscdqm::Summary::getDetector(), getEMUHisto(), cscdqm::MonitorObject::GetEntries(), CSCEventData::getFormatVersion(), cscdqm::MonitorObject::GetMaximumBin(), cscdqm::CSCHistoDef::getPath(), cscdqm::MonitorObject::getTH1(), cscdqm::MonitorObject::getTH1Lock(), cscdqm::Detector::GlobalChamberIndex(), mps_fire::i, createfilelist::int, cscdqm::Summary::isChamberStandby(), gen::k, CSCDMBHeader::l1a24(), CSCCFEBSCAControllerWord::l1a_phase, CSCALCTHeader::L1Acc(), CSCTMBHeader::L1ANumber(), L1ANumber, LOG_ERROR, LOG_INFO, LOG_WARN, gen::n, CSCDMBHeader::nalct(), CSCEventData::nalct(), CSCTMBHeader::NCFEBs(), CSCDMBHeader::nclct(), CSCEventData::nclct(), listBenchmarks::pattern, muonCSCDigis_cfi::pedestal, DetId::rawId(), CSCDetId::ring(), CSCCFEBSCAControllerWord::sca_blk, CSCCFEBTimeSlice::scaControllerWord(), edm::second(), cscdqm::MonitorObject::SetAxisRange(), cscdqm::MonitorObject::SetBinContent(), cscdqm::MonitorObject::SetBinError(), setEmuEventDisplayBit(), cscdqm::MonitorObject::SetEntries(), cscdqm::MonitorObject::SetNormFactor(), CSCDetId::station(), AlCaHLTBitMon_QueryRunRegistry::string, summary, theFormatVersion, jetExtractorBlock_cff::Threshold, cscdqm::timeSample(), cscdqm::timeSlice(), CSCDMBTrailer::tmb_empty(), CSCDMBTrailer::tmb_endtimeout(), CSCDMBTrailer::tmb_full(), CSCDMBTrailer::tmb_half(), CSCDMBTrailer::tmb_starttimeout(), CSCEventData::tmbData(), CSCTMBData::tmbHeader(), CSCTMBHeader::TMBMatch(), CSCTMBData::tmbTrailer(), CSCCFEBSCAControllerWord::trig_time, CSCAnodeData::wireDigis(), CSCTMBTrailer::wordCount(), CSCALCTTrailer::wordCount(), and globals_cff::x1.

Referenced by processDDU().

83  {
84 
85  config->incNUnpackedCSC();
86 
87  int FEBunpacked = 0;
88  int alct_unpacked = 0;
89  int tmb_unpacked = 0;
90  int cfeb_unpacked = 0;
91 
92  int alct_keywg = -1;
93  int clct_kewdistrip = -1;
94 
95  bool L1A_out_of_sync = false;
96 
97  int nCFEBs = 5;
98 
99  MonitorObject* mo = nullptr;
100 
103  const CSCDMBHeader* dmbHeader = data.dmbHeader();
104  const CSCDMBTrailer* dmbTrailer = data.dmbTrailer();
105  if (!dmbHeader && !dmbTrailer) {
106  LOG_ERROR << "Can not unpack DMB Header or/and Trailer";
107  return;
108  }
109 
111 
112 
114  unsigned int crateID = 0xFF;
115  unsigned int dmbID = 0xF;
116  unsigned int chamberID = 0xFFF;
117 
118  crateID = dmbHeader->crateID();
119  dmbID = dmbHeader->dmbID();
120  chamberID = (((crateID) << 4) + dmbID) & 0xFFF;
121 
122  const std::string cscTag = CSCHistoDef::getPath(crateID, dmbID);
123 
124 
125  unsigned long errors = binChecker.errorsForChamber(chamberID);
126  if ((errors & config->getBINCHECK_MASK()) > 0 ) {
127  LOG_WARN << "Format Errors " << cscTag << ": 0x" << std::hex << errors << " Skipped CSC Unpacking";
128  return;
129  }
130 
131  unsigned int cscType = 0;
132  unsigned int cscPosition = 0;
133  if (!getCSCFromMap(crateID, dmbID, cscType, cscPosition )) return;
134 
135 
136  CSCDetId cid;
137  if (!config->fnGetCSCDetId(crateID, dmbID, cid)) {
138  return;
139  }
140 
141  // Check if ME11 with PostLS1 readout (7 DCFEBs)
142  if ((cscType == 8 || cscType == 9) && theFormatVersion == 2013) nCFEBs = 7;
143 
144  // Check if in standby!
145  if (summary.isChamberStandby(cid)) {
146  return;
147  }
148 
149  double DMBEvents = 0.0;
150  DMBEvents = config->getChamberCounterValue(DMB_EVENTS, crateID, dmbID);
151 
152  // Get Event display plot number and next plot object
153  uint32_t evDisplNo = config->getChamberCounterValue(EVENT_DISPLAY_PLOT, crateID, dmbID);
154  evDisplNo += 1;
155  if (evDisplNo >= 5) {
156  config->setChamberCounterValue(EVENT_DISPLAY_PLOT, crateID, dmbID, 0);
157  } else {
158  config->setChamberCounterValue(EVENT_DISPLAY_PLOT, crateID, dmbID, evDisplNo);
159  }
160  MonitorObject* mo_EventDisplay = nullptr;
161  if (getCSCHisto(h::CSC_EVENT_DISPLAY_NOXX, crateID, dmbID, evDisplNo, mo_EventDisplay)) {
162  mo_EventDisplay->getTH1Lock()->Reset("");
163  }
164 
165  // Receiving EMU Event displays
166  MonitorObject *mo_Emu_EventDisplay_Anode = nullptr, *mo_Emu_EventDisplay_Cathode = nullptr, *mo_Emu_EventDisplay_XY = nullptr;
167  getEMUHisto(h::EMU_EVENT_DISPLAY_ANODE, mo_Emu_EventDisplay_Anode);
168  getEMUHisto(h::EMU_EVENT_DISPLAY_CATHODE, mo_Emu_EventDisplay_Cathode);
169  getEMUHisto(h::EMU_EVENT_DISPLAY_XY, mo_Emu_EventDisplay_XY);
170 
171  // Global chamber index
172  uint32_t glChamberIndex = 0;
173 
174  if (mo_EventDisplay) {
175  mo_EventDisplay->SetBinContent(1, 1, cid.endcap());
176  mo_EventDisplay->SetBinContent(1, 2, cid.station());
177  mo_EventDisplay->SetBinContent(1, 3, cid.ring());
178  mo_EventDisplay->SetBinContent(1, 4, cscPosition);
179  mo_EventDisplay->SetBinContent(1, 5, crateID);
180  mo_EventDisplay->SetBinContent(1, 6, dmbID);
181  mo_EventDisplay->SetBinContent(1, 7, dmbHeader->l1a24());
182  if (mo_Emu_EventDisplay_Anode || mo_Emu_EventDisplay_Cathode || mo_Emu_EventDisplay_XY) {
183  glChamberIndex = summary.getDetector().GlobalChamberIndex(cid.endcap(), cid.station(), cid.ring(), cscPosition);
184  }
185  }
186 
187  config->copyChamberCounterValue(DMB_EVENTS, DMB_TRIGGERS, crateID, dmbID);
188 
189  if (cscPosition && getEMUHisto(h::EMU_CSC_UNPACKED, mo)){
190  mo->Fill(cscPosition, cscType);
191  }
192 
194  float DMBEff = float(DMBEvents) / float(config->getNEvents());
195  if(DMBEff > 1.0) {
196  LOG_ERROR << cscTag << " has efficiency " << DMBEff << " which is greater than 1";
197  }
198 
202  int dmbHeaderL1A = dmbHeader->l1a24()%64;
204  int dmb_ddu_l1a_diff = (int)(dmbHeaderL1A-(int)(L1ANumber%64));
205  if (dmb_ddu_l1a_diff != 0) L1A_out_of_sync = true;
206 
209  if (getCSCHisto(h::CSC_DMB_L1A_DISTRIB, crateID, dmbID, mo)) mo->Fill(dmbHeaderL1A);
210 
211  if (getCSCHisto(h::CSC_DMB_DDU_L1A_DIFF, crateID, dmbID, mo)) {
212  if(dmb_ddu_l1a_diff < -32) {
213  mo->Fill(dmb_ddu_l1a_diff + 64);
214  } else {
215  if(dmb_ddu_l1a_diff >= 32) mo->Fill(dmb_ddu_l1a_diff - 64);
216  else mo->Fill(dmb_ddu_l1a_diff);
217  }
218  mo->SetAxisRange(0.1, 1.1 * (1.0 + mo->GetBinContent(mo->GetMaximumBin())), "Y");
219  }
220 
221  if (getCSCHisto(h::CSC_DMB_L1A_VS_DDU_L1A, crateID, dmbID, mo)) mo->Fill((int)(L1ANumber & 0xFF), (int)dmbHeaderL1A);
222 
224  int dmbHeaderBXN = 0;
225  int dmb_ddu_bxn_diff = 0;
226 
231  dmbHeaderBXN = dmbHeader->bxn12();
235  dmb_ddu_bxn_diff = dmbHeaderBXN%64-BXN%64;
237  if (getCSCHisto(h::CSC_DMB_BXN_DISTRIB, crateID, dmbID, mo)) mo->Fill((int)(dmbHeader->bxn12()));
238 
239  if (getCSCHisto(h::CSC_DMB_DDU_BXN_DIFF, crateID, dmbID, mo)) {
240  if(dmb_ddu_bxn_diff < -32) mo->Fill(dmb_ddu_bxn_diff + 64);
241  else {
242  if(dmb_ddu_bxn_diff >= 32) mo->Fill(dmb_ddu_bxn_diff - 64);
243  else mo->Fill(dmb_ddu_bxn_diff);
244  }
245  mo->SetAxisRange(0.1, 1.1 * (1.0 + mo->GetBinContent(mo->GetMaximumBin())), "Y");
246  }
247 
249  if (getCSCHisto(h::CSC_DMB_BXN_VS_DDU_BXN, crateID, dmbID, mo)) mo->Fill(((int)(BXN)) % 256, ((int)dmbHeaderBXN) % 256);
250 
252  int cfeb_dav = 0;
253  int cfeb_dav_num = 0;
254  int cfeb_movlp = 0;
255  int dmb_cfeb_sync = 0;
256 
257  cfeb_dav = (int)dmbHeader->cfebAvailable();
258  for (int i = 0; i < nCFEBs; i++) cfeb_dav_num += (cfeb_dav >> i) & 0x1;
259  cfeb_movlp = (int)dmbHeader->cfebMovlp();
260  dmb_cfeb_sync = (int)dmbHeader->dmbCfebSync();
261 
262  if (getCSCHisto(h::CSC_DMB_CFEB_DAV, crateID, dmbID, mo)) {
263  for (int i = 0; i < nCFEBs; i++) {
264  int cfeb_present = (cfeb_dav >> i) & 0x1;
265  if (cfeb_present) {
266  mo->Fill(i);
267  }
268  }
269  }
270 
271  if (getCSCHisto(h::CSC_DMB_CFEB_DAV_MULTIPLICITY, crateID, dmbID, mo)) mo->Fill(cfeb_dav_num);
272  if (getCSCHisto(h::CSC_DMB_CFEB_MOVLP, crateID, dmbID, mo)) mo->Fill(cfeb_movlp);
273  if (getCSCHisto(h::CSC_DMB_CFEB_SYNC, crateID, dmbID, mo)) mo->Fill(dmb_cfeb_sync);
274 
275  if (getEMUHisto(h::EMU_DMB_UNPACKED, mo)) {
276  mo->Fill(crateID, dmbID);
278  }
279 
281  if (getCSCHisto(h::CSC_DMB_CFEB_ACTIVE, crateID, dmbID, mo)) mo->Fill(dmbHeader->cfebActive()); //KK
282 
286  if (getCSCHisto(h::CSC_DMB_L1_PIPE, crateID, dmbID, mo)) mo->Fill(dmbTrailer->dmb_l1pipe());
287 
289  if (getCSCHisto(h::CSC_DMB_FIFO_STATS, crateID, dmbID, mo)) {
290  if (dmbTrailer->tmb_empty() == 1) mo->Fill(1.0, 0.0); //KK
291  if (dmbTrailer->tmb_half() == 0) mo->Fill(1.0, 1.0);
292  if (dmbTrailer->tmb_full() == 1) mo->Fill(1.0, 2.0); //KK
293  if (dmbTrailer->alct_empty() == 1) mo->Fill(0.0, 0.0);
294  if (dmbTrailer->alct_half() == 0) mo->Fill(0.0, 1.0);
295  if (dmbTrailer->alct_full() == 1) mo->Fill(0.0, 2.0); //KK 0->1
296  for (int i = 0; i < nCFEBs; i++) {
297  if ((int)((dmbTrailer->cfeb_empty()>>i)&0x1) == 1) mo->Fill(i + 2, 0.0);
298  if ((int)((dmbTrailer->cfeb_half()>>i)&0x1) == 0) mo->Fill(i + 2, 1);
299  if ((int)((dmbTrailer->cfeb_full()>>i)&0x1) == 1) {
300  mo->Fill(i + 2, 2);
301  }
302  }
303  mo->SetEntries((int)DMBEvents);
304  }
305 
307  if (getCSCHisto(h::CSC_DMB_FEB_TIMEOUTS, crateID, dmbID, mo)) {
308  if ((dmbTrailer->tmb_starttimeout() == 0) && (dmbTrailer->alct_starttimeout() == 0) && (dmbTrailer->cfeb_starttimeout() == 0) && (dmbTrailer->cfeb_endtimeout() == 0)) {
309  mo->Fill(0.0);
310  }else{
311  if (dmbTrailer->alct_starttimeout()) mo->Fill(1);
312  if (dmbTrailer->tmb_starttimeout()) mo->Fill(2);
313  if (dmbTrailer->alct_endtimeout()) mo->Fill(8); // KK
314  if (dmbTrailer->tmb_endtimeout()) mo->Fill(9); // KK
315  }
316  for (int i = 0; i < nCFEBs; i++) {
317  if ((dmbTrailer->cfeb_starttimeout() >> i) & 0x1) {
318  mo->Fill(i + 3);
319  }
320  if ((dmbTrailer->cfeb_endtimeout() >> i) & 0x1) {
321  mo->Fill(i + 10); // KK 8->10
322  }
323  }
324  mo->SetEntries((int)DMBEvents);
325  }
326 
328  int alct_dav = dmbHeader->nalct();
329  int tmb_dav = dmbHeader->nclct();
330  int cfeb_dav2 = 0;
331  for (int i = 0; i < nCFEBs; i++) cfeb_dav2 = cfeb_dav2 + (int)((dmbHeader->cfebAvailable() >> i) & 0x1);
332 
335  if ((alct_dav > 0) && (getCSCHisto(h::CSC_DMB_FEB_DAV_RATE, crateID, dmbID, mo))) {
336  mo->Fill(0.0);
337  float alct_dav_number = mo->GetBinContent(1);
338  if (getCSCHisto(h::CSC_DMB_FEB_DAV_EFFICIENCY, crateID, dmbID, mo)) {
339  mo->SetBinContent(1, ((float)alct_dav_number / (float)(DMBEvents) * 100.0));
340  mo->SetEntries((int)DMBEvents);
341  }
342  }
343 
344  if ((tmb_dav > 0) && (getCSCHisto(h::CSC_DMB_FEB_DAV_RATE, crateID, dmbID, mo))) {
345  mo->Fill(1.0);
346  float tmb_dav_number = mo->GetBinContent(2);
347  if (getCSCHisto(h::CSC_DMB_FEB_DAV_EFFICIENCY, crateID, dmbID, mo)) {
348  mo->SetBinContent(2, ((float)tmb_dav_number / (float)(DMBEvents) * 100.0));
349  mo->SetEntries((int)DMBEvents);
350  }
351  }
352 
353  if ((cfeb_dav2 > 0) && (getCSCHisto(h::CSC_DMB_FEB_DAV_RATE, crateID, dmbID, mo))) {
354  mo->Fill(2.0);
355  float cfeb_dav2_number = mo->GetBinContent(3);
356  if (getCSCHisto(h::CSC_DMB_FEB_DAV_EFFICIENCY, crateID, dmbID, mo)) {
357  mo->SetBinContent(3, ((float)cfeb_dav2_number / (float)(DMBEvents) * 100.0));
358  mo->SetEntries((int)DMBEvents);
359  }
360  }
361 
362  float feb_combination_dav = -1.0;
364  if (getCSCHisto(h::CSC_DMB_FEB_COMBINATIONS_DAV_RATE, crateID, dmbID, mo)) {
365  if(alct_dav == 0 && tmb_dav == 0 && cfeb_dav2 == 0) feb_combination_dav = 0.0; // Nothing
366  if(alct_dav > 0 && tmb_dav == 0 && cfeb_dav2 == 0) feb_combination_dav = 1.0; // ALCT Only
367  if(alct_dav == 0 && tmb_dav > 0 && cfeb_dav2 == 0) feb_combination_dav = 2.0; // TMB Only
368  if(alct_dav == 0 && tmb_dav == 0 && cfeb_dav2 > 0) feb_combination_dav = 3.0; // CFEB Only
369  if(alct_dav == 0 && tmb_dav > 0 && cfeb_dav2 > 0) feb_combination_dav = 4.0; // TMB+CFEB
370  if(alct_dav > 0 && tmb_dav > 0 && cfeb_dav2 == 0) feb_combination_dav = 5.0; // ALCT+TMB
371  if(alct_dav > 0 && tmb_dav == 0 && cfeb_dav2 > 0) feb_combination_dav = 6.0; // ALCT+CFEB
372  if(alct_dav > 0 && tmb_dav > 0 && cfeb_dav2 > 0) feb_combination_dav = 7.0; // ALCT+TMB+CFEB
373  mo->Fill(feb_combination_dav);
374  float feb_combination_dav_number = mo->GetBinContent((int)(feb_combination_dav + 1.0));
375  if (getCSCHisto(h::CSC_DMB_FEB_COMBINATIONS_DAV_EFFICIENCY, crateID, dmbID, mo)) {
376  mo->SetBinContent((int)(feb_combination_dav + 1.0), ((float)feb_combination_dav_number / (float)(DMBEvents) * 100.0));
377  mo->SetEntries((int)DMBEvents);
378  }
379  }
380 
382  if (data.nalct()) {
383 
384 
385  const CSCALCTHeader* alctHeader = data.alctHeader();
386  int fwVersion = alctHeader->alctFirmwareVersion();
387  const CSCALCTTrailer* alctTrailer = data.alctTrailer();
388  const CSCAnodeData* alctData = data.alctData();
389 
390  if (alctHeader && alctTrailer) {
391 
392  std::vector<CSCALCTDigi> alctsDatasTmp = alctHeader->ALCTDigis();
393  std::vector<CSCALCTDigi> alctsDatas;
394 
395  for (uint32_t lct = 0; lct < alctsDatasTmp.size(); lct++) {
396  if (alctsDatasTmp[lct].isValid()) alctsDatas.push_back(alctsDatasTmp[lct]);
397  }
398 
399  FEBunpacked = FEBunpacked + 1;
400  alct_unpacked = 1;
401 
403  if (getCSCHisto(h::CSC_CSC_RATE, crateID, dmbID, mo)) {
404  mo->Fill(2);
405  uint32_t ALCTEvent = (uint32_t)mo->GetBinContent(3);
406  config->setChamberCounterValue(ALCT_TRIGGERS, crateID, dmbID, ALCTEvent);
407  if (getCSCHisto(h::CSC_CSC_EFFICIENCY, crateID, dmbID, mo)){
408  if(config->getNEvents() > 0) {
411  mo->SetBinContent(1, ((float)ALCTEvent / (float)(DMBEvents) * 100.0));
413  mo->SetEntries((int)DMBEvents);
414  }
415  }
416  }
417 
418  if ((alct_dav >0) && (getCSCHisto(h::CSC_DMB_FEB_UNPACKED_VS_DAV, crateID, dmbID, mo))) {
419  mo->Fill(0.0, 0.0);
420  }
421 
424  if (getCSCHisto(h::CSC_ALCT_L1A, crateID, dmbID, mo)) mo->Fill((int)(alctHeader->L1Acc()));
425 
427  if (getCSCHisto(h::CSC_ALCT_DMB_L1A_DIFF, crateID, dmbID, mo)) {
429  int alct_dmb_l1a_diff = (int)(alctHeader->L1Acc() % 64 - dmbHeader->l1a24() % 64);
430  if (alct_dmb_l1a_diff != 0) L1A_out_of_sync = true;
431  if(alct_dmb_l1a_diff < -32) mo->Fill(alct_dmb_l1a_diff + 64);
432  else {
433  if(alct_dmb_l1a_diff >= 32) mo->Fill(alct_dmb_l1a_diff - 64);
434  else mo->Fill(alct_dmb_l1a_diff);
435  }
436  mo->SetAxisRange(0.1, 1.1 * (1.0 + mo->GetBinContent(mo->GetMaximumBin())), "Y");
437  }
438 
440  if (getCSCHisto(h::CSC_DMB_L1A_VS_ALCT_L1A, crateID, dmbID, mo)) mo->Fill(alctHeader->L1Acc() % 256, dmbHeader->l1a24()%256);
441 
444  if (getCSCHisto(h::CSC_ALCT_DMB_BXN_DIFF, crateID, dmbID, mo)) {
445  int alct_dmb_bxn_diff = (int)(alctHeader->BXNCount()-dmbHeader->bxn12());
446  if (alct_dmb_bxn_diff > 0) alct_dmb_bxn_diff -= 3564;
447  alct_dmb_bxn_diff %= 32;
448  mo->Fill(alct_dmb_bxn_diff);
449  mo->SetAxisRange(0.1, 1.1 * (1.0 + mo->GetBinContent(mo->GetMaximumBin())), "Y");
450  }
451 
452  if (getCSCHisto(h::CSC_ALCT_BXN, crateID, dmbID, mo)) mo->Fill(alctHeader->BXNCount());
453 
455  if (getCSCHisto(h::CSC_ALCT_BXN_VS_DMB_BXN, crateID, dmbID, mo)) mo->Fill((int)((alctHeader->BXNCount()) % 256), (int)(dmbHeader->bxn12()) % 256);
456 
457  if (getCSCHisto(h::CSC_ALCT_NUMBER_RATE, crateID, dmbID, mo)) {
458  mo->Fill(alctsDatas.size());
459  int nALCT = (int)mo->GetBinContent((int)(alctsDatas.size() + 1));
460  if (getCSCHisto(h::CSC_ALCT_NUMBER_EFFICIENCY, crateID, dmbID, mo))
461  mo->SetBinContent((int)(alctsDatas.size() + 1), (float)(nALCT) / (float)(DMBEvents) * 100.0);
462  }
463 
464  if (getCSCHisto(h::CSC_ALCT_WORD_COUNT, crateID, dmbID, mo)) mo->Fill((int)(alctTrailer->wordCount()));
465 
468  if (alctsDatas.size() == 2) {
469  if (getCSCHisto(h::CSC_ALCT1_VS_ALCT0_KEYWG, crateID, dmbID, mo))
470  mo->Fill(alctsDatas[0].getKeyWG(),alctsDatas[1].getKeyWG());
471  }
472 
473  MonitorObject* mo_CSC_ALCT0_BXN_mean = nullptr;
474  getEMUHisto(h::EMU_CSC_ALCT0_BXN_MEAN, mo_CSC_ALCT0_BXN_mean);
475 
476  MonitorObject* mo_CSC_ALCT0_BXN_rms = nullptr;
477  getEMUHisto(h::EMU_CSC_ALCT0_BXN_RMS, mo_CSC_ALCT0_BXN_rms);
478 
479  MonitorObject* mo_CSC_Plus_endcap_ALCT0_dTime = nullptr;
480  getEMUHisto(h::EMU_CSC_ALCT0_ENDCAP_PLUS_DTIME, mo_CSC_Plus_endcap_ALCT0_dTime);
481 
482  MonitorObject* mo_CSC_Minus_endcap_ALCT0_dTime = nullptr;
483  getEMUHisto(h::EMU_CSC_ALCT0_ENDCAP_MINUS_DTIME, mo_CSC_Minus_endcap_ALCT0_dTime);
484 
485  for (uint32_t lct = 0; lct < alctsDatas.size(); lct++) {
486 
488  if (lct >= 2) continue;
489 
490  if (getCSCHisto(h::CSC_ALCTXX_KEYWG, crateID, dmbID, lct, mo)) {
491  mo->Fill(alctsDatas[lct].getKeyWG());
492  }
493 
494  if(lct == 0) alct_keywg = alctsDatas[lct].getKeyWG();
495 
496  int alct_dtime = 0;
497  if (fwVersion == 2007) {
498  alct_dtime = alctsDatas[lct].getBX();
499  } else {
500  // Older 2006 Format
501  alct_dtime = (int) (alctsDatas[lct].getBX() - (alctHeader->BXNCount()&0x1F));
502  }
503 
504  // == Those two summary histos need to be outside of per-chamber CSC_ALCTXX_DTIME histo check.
505  // Otherwise will be empty in Offline DQM
506  if (lct == 0) {
507  if (cid.endcap() == 1) {
508  if (mo_CSC_Plus_endcap_ALCT0_dTime) mo_CSC_Plus_endcap_ALCT0_dTime->Fill(alct_dtime);
509  }
510  if (cid.endcap() == 2) {
511  if (mo_CSC_Minus_endcap_ALCT0_dTime) mo_CSC_Minus_endcap_ALCT0_dTime->Fill(alct_dtime);
512  }
513  }
514 
515  if (getCSCHisto(h::CSC_ALCTXX_DTIME, crateID, dmbID, lct, mo)) {
516 
517  if(alct_dtime < -16) {
518  mo->Fill(alct_dtime + 32);
519  } else {
520  if(alct_dtime >= 16) mo->Fill(alct_dtime - 32);
521  else mo->Fill(alct_dtime);
522  }
523 
524  mo->SetAxisRange(0.1, 1.1 * (1.0 + mo->GetBinContent(mo->GetMaximumBin())), "Y");
525 
526  double dTime_mean = mo->getTH1()->GetMean();
527  double dTime_rms = mo->getTH1()->GetRMS();
528 
529  // == For ALCT0 Fill Summary dTime Histograms
530  if (lct == 0) {
531  /* -- Moved outside of CSC histo check
532  if (cid.endcap() == 1) {
533  if (mo_CSC_Plus_endcap_ALCT0_dTime) mo_CSC_Plus_endcap_ALCT0_dTime->Fill(alct_dtime);
534  }
535  if (cid.endcap() == 2) {
536  if (mo_CSC_Minus_endcap_ALCT0_dTime) mo_CSC_Minus_endcap_ALCT0_dTime->Fill(alct_dtime);
537  }
538  */
539  if (cscPosition && mo_CSC_ALCT0_BXN_mean) {
540  mo_CSC_ALCT0_BXN_mean->SetBinContent(cscPosition, cscType + 1, dTime_mean);
541  }
542  if (cscPosition && mo_CSC_ALCT0_BXN_rms) {
543  mo_CSC_ALCT0_BXN_rms->SetBinContent(cscPosition, cscType + 1, dTime_rms);
544  }
545  }
546  }
547 
548 
549  if (getCSCHisto(h::CSC_ALCTXX_DTIME_VS_KEYWG, crateID, dmbID, lct, mo)) {
550  if(alct_dtime < -16) {
551  mo->Fill(alctsDatas[lct].getKeyWG(), alct_dtime + 32);
552  } else {
553  if(alct_dtime >= 16) mo->Fill(alctsDatas[lct].getKeyWG(), alct_dtime - 32);
554  else mo->Fill(alctsDatas[lct].getKeyWG(), alct_dtime);
555  }
556  }
557 
558  if (getCSCHisto(h::CSC_ALCTXX_DTIME_PROFILE, crateID, dmbID, lct, mo)) {
559  if(alct_dtime < -16) {
560  mo->Fill(alctsDatas[lct].getKeyWG(), alct_dtime + 32);
561  } else {
562  if (alct_dtime >= 16) mo->Fill(alctsDatas[lct].getKeyWG(), alct_dtime - 32);
563  else mo->Fill(alctsDatas[lct].getKeyWG(), alct_dtime);
564  }
565  }
566 
567  int alct_bxn = alctsDatas[lct].getBX();
568  if (fwVersion == 2007) {
569  alct_bxn = (alct_bxn + alctHeader->BXNCount())&0x1F;
570  }
571 
572  if (getCSCHisto(h::CSC_ALCTXX_BXN, crateID, dmbID, lct, mo)) mo->Fill(alct_bxn);
573 
574  if (getCSCHisto(h::CSC_ALCTXX_QUALITY, crateID, dmbID, lct, mo)) mo->Fill(alctsDatas[lct].getKeyWG(), alctsDatas[lct].getQuality());
575 
576  if (mo_EventDisplay) {
577  mo_EventDisplay->SetBinContent(2, alctsDatas[lct].getKeyWG(), alct_bxn + 1 );
578  mo_EventDisplay->SetBinContent(3, alctsDatas[lct].getKeyWG(), alctsDatas[lct].getQuality());
579  }
580 
581  if (getCSCHisto(h::CSC_ALCTXX_QUALITY_DISTR, crateID, dmbID, lct, mo)) {
582  mo->Fill(alctsDatas[lct].getQuality());
583  if (lct == 0) {
584  MonitorObject* mo1 = nullptr;
585  if (cscPosition && getEMUHisto(h::EMU_CSC_ALCT0_QUALITY, mo1)) {
586  mo1->SetBinContent(cscPosition, cscType + 1, mo->getTH1()->GetMean());
587  }
588  }
589  }
590 
591  if (getCSCHisto(h::CSC_ALCTXX_QUALITY_PROFILE, crateID, dmbID, lct, mo)) mo->Fill(alctsDatas[lct].getKeyWG(), alctsDatas[lct].getQuality());
592 
593  if (getCSCHisto(h::CSC_ALCTXX_PATTERN, crateID, dmbID, lct, mo)) {
594  int pattern = (alctsDatas[lct].getAccelerator() << 1) + alctsDatas[lct].getCollisionB();
595  int keywg = alctsDatas[lct].getKeyWG();
596  mo->Fill(keywg, pattern );
597  }
598 
599  if (getCSCHisto(h::CSC_ALCTXX_PATTERN_DISTR, crateID, dmbID, lct, mo)) {
600  int pattern = (alctsDatas[lct].getAccelerator()<<1) + alctsDatas[lct].getCollisionB();
601  mo->Fill(pattern);
602  }
603 
604  }
605 
606  int NumberOfLayersWithHitsInALCT = 0;
607  int NumberOfWireGroupsWithHitsInALCT = 0;
608 
609  if (alctData) {
610 
611  MonitorObject* mo_AFEB_RawHits_TimeBins = nullptr;
612  getCSCHisto(h::CSC_CFEB_AFEB_RAWHITS_TIMEBINS, crateID, dmbID, mo_AFEB_RawHits_TimeBins);
613 
614  MonitorObject* mo_CSC_Plus_endcap_AFEB_RawHits_Time = nullptr;
615  getEMUHisto(h::EMU_CSC_AFEB_ENDCAP_PLUS_RAWHITS_TIME, mo_CSC_Plus_endcap_AFEB_RawHits_Time);
616 
617  MonitorObject* mo_CSC_Minus_endcap_AFEB_RawHits_Time = nullptr;
618  getEMUHisto(h::EMU_CSC_AFEB_ENDCAP_MINUS_RAWHITS_TIME, mo_CSC_Minus_endcap_AFEB_RawHits_Time);
619 
620  MonitorObject* mo_CSC_AFEB_RawHits_Time_mean = nullptr;
621  getEMUHisto(h::EMU_CSC_AFEB_RAWHITS_TIME_MEAN, mo_CSC_AFEB_RawHits_Time_mean);
622 
623  MonitorObject* mo_CSC_AFEB_RawHits_Time_rms = nullptr;
624  getEMUHisto(h::EMU_CSC_AFEB_RAWHITS_TIME_RMS, mo_CSC_AFEB_RawHits_Time_rms);
625 
626  for (int nLayer = 1; nLayer <= 6; nLayer++) {
627 
628  int wg_previous = -1;
629  int tbin_previous = -1;
630  bool CheckLayerALCT = true;
631 
632  std::vector<CSCWireDigi> wireDigis = alctData->wireDigis(nLayer);
633  for (std::vector<CSCWireDigi>::iterator wireDigisItr = wireDigis.begin(); wireDigisItr != wireDigis.end(); ++wireDigisItr) {
634 
635  int wg = wireDigisItr->getWireGroup();
637  std::vector<int> tbins = wireDigisItr->getTimeBinsOn();
638  int tbin = wireDigisItr->getTimeBin();
639 
640  if (mo_EventDisplay) {
641  mo_EventDisplay->SetBinContent(nLayer + 3, wg - 1, tbin + 1);
642  setEmuEventDisplayBit(mo_Emu_EventDisplay_Anode, glChamberIndex, wg - 1, nLayer - 1);
643  setEmuEventDisplayBit(mo_Emu_EventDisplay_XY, glChamberIndex, wg - 1, nLayer - 1);
644  }
645 
646  if (CheckLayerALCT) {
647  NumberOfLayersWithHitsInALCT = NumberOfLayersWithHitsInALCT + 1;
648  CheckLayerALCT = false;
649  }
650 
651  for (uint32_t n = 0; n < tbins.size(); n++) {
652 
653  tbin = tbins[n];
654  if(wg != wg_previous || (tbin != tbin_previous + 1 && tbin != tbin_previous - 1) ) {
655 
656  if (getCSCHisto(h::CSC_ALCTTIME_LYXX, crateID, dmbID, nLayer, mo)) mo->Fill(wg - 1, tbin);
657 
658  if (getCSCHisto(h::CSC_ALCTTIME_LYXX_PROFILE, crateID, dmbID, nLayer, mo)) mo->Fill(wg - 1, tbin);
659 
660  if (mo_AFEB_RawHits_TimeBins) mo_AFEB_RawHits_TimeBins->Fill(tbin);
661 
662  if (cid.endcap() == 1) {
663  if (mo_CSC_Plus_endcap_AFEB_RawHits_Time) mo_CSC_Plus_endcap_AFEB_RawHits_Time->Fill(tbin);
664  }
665  if (cid.endcap() == 2) {
666  if (mo_CSC_Minus_endcap_AFEB_RawHits_Time) mo_CSC_Minus_endcap_AFEB_RawHits_Time->Fill(tbin);
667  }
668 
669  if (getCSCHisto(h::CSC_ALCT_LYXX_RATE, crateID, dmbID, nLayer, mo)) {
670  mo->Fill(wg - 1);
671  int number_wg = (int)(mo->GetBinContent(wg));
672  Double_t Number_of_entries_ALCT = mo->GetEntries();
673  if (getCSCHisto(h::CSC_ALCT_LYXX_EFFICIENCY, crateID, dmbID, nLayer, mo)) {
674  mo->SetBinContent(wg, ((float) number_wg));
675  if((Double_t)(DMBEvents) > 0.0) {
676  mo->SetNormFactor(100.0*Number_of_entries_ALCT/(Double_t)(DMBEvents));
677  } else {
678  mo->SetNormFactor(100.0);
679  }
680  mo->SetEntries((int)DMBEvents);
681  }
682  }
683  }
684  if(wg != wg_previous) {
685  NumberOfWireGroupsWithHitsInALCT = NumberOfWireGroupsWithHitsInALCT + 1;
686  }
687 
688  wg_previous = wg;
689  tbin_previous = tbin;
690  }
691  }
692 
693  // Fill Summary Anode Raw Hits Timing Plots
694  if (mo_AFEB_RawHits_TimeBins) {
695 
696  double rawhits_time_mean = mo_AFEB_RawHits_TimeBins->getTH1()->GetMean();
697  double rawhits_time_rms = mo_AFEB_RawHits_TimeBins->getTH1()->GetRMS();
698 
699  if ( cscPosition && mo_CSC_AFEB_RawHits_Time_mean) {
700  mo_CSC_AFEB_RawHits_Time_mean->SetBinContent(cscPosition, cscType + 1, rawhits_time_mean);
701  }
702 
703  if ( cscPosition && mo_CSC_AFEB_RawHits_Time_rms) {
704  mo_CSC_AFEB_RawHits_Time_rms->SetBinContent(cscPosition, cscType + 1, rawhits_time_rms);
705  }
706 
707  }
708 
709  }
710 
711  } else {
712  LOG_ERROR << cscTag << " Can not unpack Anode Data";
713  }
714 
715  if (getCSCHisto(h::CSC_ALCT_NUMBER_OF_LAYERS_WITH_HITS, crateID, dmbID, mo)) {
716  mo->Fill(NumberOfLayersWithHitsInALCT);
717  MonitorObject* mo1 = nullptr;
718  if ( cscPosition && getEMUHisto(h::EMU_CSC_ALCT_PLANES_WITH_HITS, mo1)) {
719  mo1->SetBinContent(cscPosition, cscType + 1, mo->getTH1()->GetMean());
720  }
721  }
722 
723  if (getCSCHisto(h::CSC_ALCT_NUMBER_OF_WIREGROUPS_WITH_HITS, crateID, dmbID, mo)) mo->Fill(NumberOfWireGroupsWithHitsInALCT);
724 
725  } else {
726  LOG_ERROR << cscTag << " Can not unpack ALCT Header or/and Trailer";
727  }
728  } else {
731  if (getCSCHisto(h::CSC_ALCT_NUMBER_RATE, crateID, dmbID, mo)) {
732  mo->Fill(0);
733  int nALCT = (int)mo->GetBinContent(1);
734  if (getCSCHisto(h::CSC_ALCT_NUMBER_EFFICIENCY, crateID, dmbID, mo))
735  mo->SetBinContent(1, (float)(nALCT) / (float)(DMBEvents) * 100.0);
736  }
737 
738  if ((alct_dav > 0) && (getCSCHisto(h::CSC_DMB_FEB_UNPACKED_VS_DAV, crateID, dmbID, mo))) {
739  mo->Fill(0.0, 1.0);
740  }
741  }
742 
744  if(data.nclct() && data.nalct()) {
745 
746  CSCALCTHeader* alctHeader = data.alctHeader();
747 
748  if (alctHeader) {
749  std::vector<CSCALCTDigi> alctsDatasTmp = alctHeader->ALCTDigis();
750  std::vector<CSCALCTDigi> alctsDatas;
751 
752  for (uint32_t lct = 0; lct < alctsDatasTmp.size(); lct++) {
753  if (alctsDatasTmp[lct].isValid())
754  alctsDatas.push_back(alctsDatasTmp[lct]);
755  }
756 
757  CSCTMBData* tmbData = data.tmbData();
758  if (tmbData) {
759  CSCTMBHeader* tmbHeader = tmbData->tmbHeader();
760  if (tmbHeader) {
762  if (getCSCHisto(h::CSC_TMB_BXN_VS_ALCT_BXN, crateID, dmbID, mo))
763  mo->Fill( ((int)(alctHeader->BXNCount())) % 256, ((int)(tmbHeader->BXNCount())) % 256 );
764 
765  if (getCSCHisto(h::CSC_TMB_ALCT_BXN_DIFF, crateID, dmbID, mo)) {
766  int clct_alct_bxn_diff = (int)(alctHeader->BXNCount() - tmbHeader->BXNCount());
767  if(clct_alct_bxn_diff < -2048) mo->Fill(clct_alct_bxn_diff + 4096);
768  else {
769  if(clct_alct_bxn_diff > 2048) mo->Fill(clct_alct_bxn_diff - 4096);
770  else mo->Fill(clct_alct_bxn_diff);
771  }
772  mo->SetAxisRange(0.1, 1.1*(1.0+mo->GetBinContent(mo->GetMaximumBin())), "Y");
773  }
774 
775  if (getCSCHisto(h::CSC_TMB_L1A_VS_ALCT_L1A, crateID, dmbID, mo))
776  mo->Fill((int)(alctHeader->L1Acc()%256),(int)(tmbHeader->L1ANumber()%256));
777 
778  if (getCSCHisto(h::CSC_TMB_ALCT_L1A_DIFF, crateID, dmbID, mo)) {
779  int clct_alct_l1a_diff = (int)(tmbHeader->L1ANumber() - alctHeader->L1Acc());
780  if(clct_alct_l1a_diff < -2048) mo->Fill(clct_alct_l1a_diff + 4096);
781  else {
782  if(clct_alct_l1a_diff > 2048) mo->Fill(clct_alct_l1a_diff - 4096);
783  else mo->Fill(clct_alct_l1a_diff);
784  }
785  mo->SetAxisRange(0.1, 1.1*(1.0+mo->GetBinContent(mo->GetMaximumBin())), "Y");
786  }
787  } else {
788  LOG_ERROR << cscTag << " Can not unpack TMB Header";
789  }
790 
791  } else {
792  LOG_ERROR << cscTag << " Can not unpack TMB Data";
793  }
794  } else {
795  LOG_ERROR << cscTag << " Can not unpack ALCT Header";
796  }
797  }
798 
800  if (data.nclct()) {
801 
804  CSCTMBData* tmbData = data.tmbData();
805  if (tmbData) {
806 
807 
808  CSCTMBHeader* tmbHeader = tmbData->tmbHeader();
809  CSCTMBTrailer* tmbTrailer = tmbData->tmbTrailer();
810 
811  if (tmbHeader && tmbTrailer) {
812 
813  CSCCLCTData* clctData = data.clctData();
814 
815  std::vector<CSCCLCTDigi> clctsDatasTmp = tmbHeader->CLCTDigis(cid.rawId());
816  std::vector<CSCCLCTDigi> clctsDatas;
817 
818  for (uint32_t lct = 0; lct < clctsDatasTmp.size(); lct++) {
819  if (clctsDatasTmp[lct].isValid()) clctsDatas.push_back(clctsDatasTmp[lct]);
820  }
821 
822  FEBunpacked = FEBunpacked +1;
823  tmb_unpacked = 1;
824 
825  if (getCSCHisto(h::CSC_ALCT_MATCH_TIME, crateID, dmbID, mo)) {
826 
827  mo->Fill(tmbHeader->ALCTMatchTime());
828  double alct_match_mean = mo->getTH1()->GetMean();
829  double alct_match_rms = mo->getTH1()->GetRMS();
830  MonitorObject* mo1 = nullptr;
831 
832  if (cid.endcap() == 1) {
833  if (cscPosition && getEMUHisto(h::EMU_CSC_ENDCAP_PLUS_ALCT_CLCT_MATCH_TIME, mo1)) {
834  mo1->Fill(tmbHeader->ALCTMatchTime());
835  }
836  }
837 
838  if (cid.endcap() == 2) {
840  mo1->Fill(tmbHeader->ALCTMatchTime());
841  }
842  }
843 
844  if (cscPosition && getEMUHisto(h::EMU_CSC_ALCT_CLCT_MATCH_MEAN, mo1)) {
845  mo1->SetBinContent(cscPosition, cscType + 1, alct_match_mean);
846  }
847 
848  if (cscPosition && getEMUHisto(h::EMU_CSC_ALCT_CLCT_MATCH_RMS, mo1)) {
849  mo1->SetBinContent(cscPosition, cscType + 1, alct_match_rms);
850  }
851 
852  }
853 
854  if (getCSCHisto(h::CSC_LCT_MATCH_STATUS, crateID, dmbID, mo)) {
855  if (tmbHeader->CLCTOnly()) mo->Fill(0.0,0.0);
856  if (tmbHeader->ALCTOnly()) mo->Fill(0.0,1.0);
857  if (tmbHeader->TMBMatch()) mo->Fill(0.0,2.0);
858  }
859 
860  if (getCSCHisto(h::CSC_LCT0_MATCH_BXN_DIFFERENCE, crateID, dmbID, mo)) mo->Fill(tmbHeader->Bxn0Diff());
861  if (getCSCHisto(h::CSC_LCT1_MATCH_BXN_DIFFERENCE, crateID, dmbID, mo)) mo->Fill(tmbHeader->Bxn1Diff());
862 
863  if ((tmb_dav > 0) && (getCSCHisto(h::CSC_DMB_FEB_UNPACKED_VS_DAV, crateID, dmbID, mo))) {
864  mo->Fill(1.0, 0.0);
865  }
866 
868  if (getCSCHisto(h::CSC_CSC_RATE, crateID, dmbID, mo)) {
869  mo->Fill(3);
870  uint32_t CLCTEvent = (uint32_t)mo->GetBinContent(4);
871  config->setChamberCounterValue(CLCT_TRIGGERS, crateID, dmbID, CLCTEvent);
872  if (getCSCHisto(h::CSC_CSC_EFFICIENCY, crateID, dmbID, mo)) {
873  if(config->getNEvents() > 0) {
874  mo->SetBinContent(2,((float)CLCTEvent/(float)(DMBEvents)*100.0));
875  mo->SetEntries(DMBEvents);
876  }
877  }
878  }
879 
880  if (getCSCHisto(h::CSC_CLCT_L1A, crateID, dmbID, mo)) mo->Fill(tmbHeader->L1ANumber());
881 
883  if (getCSCHisto(h::CSC_CLCT_DMB_L1A_DIFF, crateID, dmbID, mo)) {
884  int clct_dmb_l1a_diff = (int)((tmbHeader->L1ANumber() % 64)-dmbHeader->l1a24() % 64);
885  if (clct_dmb_l1a_diff != 0) L1A_out_of_sync = true;
886  if(clct_dmb_l1a_diff < -32) mo->Fill(clct_dmb_l1a_diff + 64);
887  else {
888  if(clct_dmb_l1a_diff >= 32) mo->Fill(clct_dmb_l1a_diff - 64);
889  else mo->Fill(clct_dmb_l1a_diff);
890  }
891  mo->SetAxisRange(0.1, 1.1*(1.0+mo->GetBinContent(mo->GetMaximumBin())), "Y");
892  }
893 
895  if (getCSCHisto(h::CSC_DMB_L1A_VS_CLCT_L1A, crateID, dmbID, mo)) mo->Fill(tmbHeader->L1ANumber()%256,dmbHeader->l1a24()%256);
896 
897  if (getCSCHisto(h::CSC_CLCT_DMB_BXN_DIFF, crateID, dmbID, mo)) {
898  int clct_dmb_bxn_diff = (int)(tmbHeader->BXNCount()%64-dmbHeader->bxn12()%64);
899  if(clct_dmb_bxn_diff < -32) mo->Fill(clct_dmb_bxn_diff + 64);
900  else {
901  if(clct_dmb_bxn_diff >= 32) mo->Fill(clct_dmb_bxn_diff - 64);
902  else mo->Fill(clct_dmb_bxn_diff);
903  }
904  mo->SetAxisRange(0.1, 1.1*(1.0+mo->GetBinContent(mo->GetMaximumBin())), "Y");
905  }
906 
907  if (getCSCHisto(h::CSC_CLCT_BXN, crateID, dmbID, mo)) mo->Fill((int)(tmbHeader->BXNCount()));
908 
910  if (getCSCHisto(h::CSC_CLCT_BXN_VS_DMB_BXN, crateID, dmbID, mo)) mo->Fill(tmbHeader->BXNCount()%256,dmbHeader->bxn12()%256);
911 
912  if (getCSCHisto(h::CSC_CLCT_NUMBER_RATE, crateID, dmbID, mo)) {
913  mo->Fill(clctsDatas.size());
914  int nCLCT = (int)mo->GetBinContent((int)(clctsDatas.size()+1));
915  if (getCSCHisto(h::CSC_CLCT_NUMBER, crateID, dmbID, mo)) mo->SetBinContent((int)(clctsDatas.size() + 1), (float)(nCLCT) / (float)(DMBEvents) * 100.0);
916  }
917 
918  if (clctsDatas.size() == 1) {
919  if (getCSCHisto(h::CSC_CLCT0_CLSSIFICATION, crateID, dmbID, mo)) {
920  if (clctsDatas[0].getStripType()) mo->Fill(0.0);
921  else mo->Fill(1.0);
922  }
923  }
924 
925  if (clctsDatas.size() == 2) {
926  if (getCSCHisto(h::CSC_CLCT1_VS_CLCT0_KEY_STRIP, crateID, dmbID, mo))
927  mo->Fill(clctsDatas[0].getKeyStrip(),clctsDatas[1].getKeyStrip());
928  if (getCSCHisto(h::CSC_CLCT0_CLCT1_CLSSIFICATION, crateID, dmbID, mo)) {
929  if ( clctsDatas[0].getStripType() && clctsDatas[1].getStripType()) mo->Fill(0.0);
930  if ( clctsDatas[0].getStripType() && !clctsDatas[1].getStripType()) mo->Fill(1.0);
931  if (!clctsDatas[0].getStripType() && clctsDatas[1].getStripType()) mo->Fill(2.0);
932  if (!clctsDatas[0].getStripType() && !clctsDatas[1].getStripType()) mo->Fill(3.0);
933  }
934  }
935 
936  if (getCSCHisto(h::CSC_TMB_WORD_COUNT, crateID, dmbID, mo)) mo->Fill((int)(tmbTrailer->wordCount()));
939  MonitorObject* mo_CSC_Plus_endcap_CLCT0_dTime = nullptr;
940  getEMUHisto(h::EMU_CSC_ENDCAP_PLUS_CLCT0_DTIME, mo_CSC_Plus_endcap_CLCT0_dTime);
941 
942  MonitorObject* mo_CSC_Minus_endcap_CLCT0_dTime = nullptr;
943  getEMUHisto(h::EMU_CSC_ENDCAP_MINUS_CLCT0_DTIME, mo_CSC_Minus_endcap_CLCT0_dTime);
944 
945  MonitorObject* mo_CSC_CLCT0_BXN_mean = nullptr;
946  getEMUHisto(h::EMU_CSC_CLCT0_BXN_MEAN, mo_CSC_CLCT0_BXN_mean);
947 
948  MonitorObject* mo_CSC_CLCT0_BXN_rms = nullptr;
949  getEMUHisto(h::EMU_CSC_CLCT0_BXN_RMS, mo_CSC_CLCT0_BXN_rms);
950 
951  for (uint32_t lct = 0; lct < clctsDatas.size(); lct++) {
952 
953  if (getCSCHisto(h::CSC_CLCTXX_BXN, crateID, dmbID, lct, mo)) mo->Fill(clctsDatas[lct].getFullBX()%64);
954 
955  int clct_dtime = clctsDatas[lct].getFullBX() - tmbHeader->BXNCount();
956  if (clct_dtime > 0) {
957  clct_dtime -= 3564;
958  }
959 
960  int dTime = clct_dtime;
961 
962  if (lct == 0) {
963  if (cid.endcap() == 1) {
964  if (mo_CSC_Plus_endcap_CLCT0_dTime) mo_CSC_Plus_endcap_CLCT0_dTime->Fill(dTime);
965  }
966  if (cid.endcap() == 2) {
967  if (mo_CSC_Minus_endcap_CLCT0_dTime) mo_CSC_Minus_endcap_CLCT0_dTime->Fill(dTime);
968  }
969  }
970 
971  if (getCSCHisto(h::CSC_CLCTXX_DTIME, crateID, dmbID, lct, mo)) {
972  /*
973  int dTime = clct_dtime;
974  if (clct_dtime < -16) {
975  dTime = clct_dtime + 32;
976  } else {
977  if (clct_dtime > 16) dTime = clct_dtime - 32;
978  }
979  */
980 
981  mo->Fill(dTime);
982  mo->SetAxisRange(0.1, 1.1 * (1.0 + mo->GetBinContent(mo->GetMaximumBin())), "Y");
983 
984  double dTime_mean = mo->getTH1()->GetMean();
985  double dTime_rms = mo->getTH1()->GetRMS();
986 
987  // == For CLCT0 Fill Summary dTime Histograms
988  if (lct == 0) {
989  /* -- Moved
990  if (cid.endcap() == 1) {
991  if (mo_CSC_Plus_endcap_CLCT0_dTime) mo_CSC_Plus_endcap_CLCT0_dTime->Fill(dTime);
992  }
993  if (cid.endcap() == 2) {
994  if (mo_CSC_Minus_endcap_CLCT0_dTime) mo_CSC_Minus_endcap_CLCT0_dTime->Fill(dTime);
995  }
996  */
997  if (cscPosition && mo_CSC_CLCT0_BXN_mean) {
998  mo_CSC_CLCT0_BXN_mean->SetBinContent(cscPosition, cscType + 1, dTime_mean);
999  }
1000  if (cscPosition && mo_CSC_CLCT0_BXN_rms) {
1001  mo_CSC_CLCT0_BXN_rms->SetBinContent(cscPosition, cscType + 1, dTime_rms);
1002  }
1003  }
1004 
1005  }
1006 
1009  LOG_DEBUG << "LCT:" << lct << " Type:" << clctsDatas[lct].getStripType() << " Strip:" << clctsDatas[lct].getKeyStrip();
1010 
1011  if (clctsDatas[lct].getStripType()) { // HalfStrip Type
1012 
1013  if (getCSCHisto(h::CSC_CLCTXX_KEYHALFSTRIP, crateID, dmbID, lct, mo))
1014  mo->Fill(clctsDatas[lct].getKeyStrip());
1015 
1016  if (getCSCHisto(h::CSC_CLCTXX_DTIME_VS_HALF_STRIP, crateID, dmbID, lct, mo)) {
1017  mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime);
1018  /*
1019  if (clct_dtime < -16) {
1020  mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime + 32);
1021  } else {
1022  if (clct_dtime > 16) mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime - 32);
1023  else mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime);
1024  }
1025  */
1026  }
1027 
1028  if (getCSCHisto(h::CSC_CLCTXX_DTIME_PROFILE, crateID, dmbID, lct, mo)) {
1029  mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime);
1030  /*
1031  if (clct_dtime < -16) {
1032  mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime + 32);
1033  } else {
1034  if (clct_dtime > 16) mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime - 32);
1035  else mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime);
1036  }
1037  */
1038  }
1039 
1040  if (getCSCHisto(h::CSC_CLCTXX_HALF_STRIP_PATTERN, crateID, dmbID, lct, mo)) {
1041 
1042  int pattern_clct = clctsDatas[lct].getPattern();
1046  double tbin = -1;
1047 
1048  switch (pattern_clct) {
1049  case 0: tbin=0.; break;
1050  case 1: tbin=1.; break;
1051  case 2: tbin=2.; break;
1052  case 3: tbin=10.; break;
1053  case 4: tbin=3.; break;
1054  case 5: tbin=9.; break;
1055  case 6: tbin=4.; break;
1056  case 7: tbin=8.; break;
1057  case 8: tbin=5.; break;
1058  case 9: tbin=7.; break;
1059  case 10: tbin=6.; break;
1060  }
1061 
1062  if (tbin >= 0) mo->Fill(clctsDatas[lct].getKeyStrip(), tbin);
1063 
1064  MonitorObject* mo1 = nullptr;
1065  if (getCSCHisto(h::CSC_CLCT_HALF_STRIP_PATTERN_DISTR, crateID, dmbID, lct, mo1)) mo1->Fill(tbin);
1066 
1067  }
1068 
1069  if (getCSCHisto(h::CSC_CLCTXX_HALF_STRIP_QUALITY, crateID, dmbID, lct, mo))
1070  mo->Fill((int)(clctsDatas[lct].getKeyStrip()),(int)(clctsDatas[lct].getQuality()));
1071 
1072  if (mo_EventDisplay) {
1073  mo_EventDisplay->SetBinContent(10, clctsDatas[lct].getKeyStrip(), clct_dtime);
1074  mo_EventDisplay->SetBinContent(11, clctsDatas[lct].getKeyStrip(), clctsDatas[lct].getQuality());
1075  }
1076 
1077  if (getCSCHisto(h::CSC_CLCTXX_HALF_STRIP_QUALITY_DISTR, crateID, dmbID, lct, mo)) {
1078  mo->Fill((int)(clctsDatas[lct].getQuality()));
1079  if (lct == 0) {
1080  MonitorObject* mo1 = nullptr;
1081  if (cscPosition && getEMUHisto(h::EMU_CSC_CLCT0_QUALITY, mo1)) {
1082  mo1->SetBinContent(cscPosition, cscType + 1, mo->getTH1()->GetMean());
1083  }
1084  }
1085  }
1086 
1087  if (getCSCHisto(h::CSC_CLCTXX_HALF_STRIP_QUALITY_PROFILE, crateID, dmbID, lct, mo))
1088  mo->Fill((int)(clctsDatas[lct].getKeyStrip()), (int)(clctsDatas[lct].getQuality()));
1089 
1090  } else { // DiStrip Type
1091 
1092  LOG_INFO << "Entering block!";
1093 
1094  if (getCSCHisto(h::CSC_CLCTXX_KEYDISTRIP, crateID, dmbID, lct, mo)) mo->Fill(clctsDatas[lct].getKeyStrip());
1095  else LOG_ERROR << "Not found h::CSC_CLCTXX_KEYDISTRIP = " << h::CSC_CLCTXX_KEYDISTRIP;
1096 
1097  if(lct == 0) clct_kewdistrip = clctsDatas[lct].getKeyStrip();
1098 
1099  if (getCSCHisto(h::CSC_CLCTXX_DTIME_VS_DISTRIP, crateID, dmbID, lct, mo)) {
1100  mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime);
1101  /*
1102  if(clct_dtime < -16) mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime + 32);
1103  else {
1104  if(clct_dtime > 16) mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime - 32);
1105  else mo->Fill((int)(clctsDatas[lct].getKeyStrip()), clct_dtime);
1106  }
1107  */
1108  }
1109 
1110  if (getCSCHisto(h::CSC_CLCTXX_DISTRIP_PATTERN, crateID, dmbID, lct, mo)) {
1111  int pattern_clct = (int)((clctsDatas[lct].getPattern() >> 1) & 0x3);
1114  if(pattern_clct == 1) mo->Fill(clctsDatas[lct].getKeyStrip(), 7.0);
1115  if(pattern_clct == 3) mo->Fill(clctsDatas[lct].getKeyStrip(), 6.0);
1116  if(pattern_clct == 5) mo->Fill(clctsDatas[lct].getKeyStrip(), 5.0);
1117  if(pattern_clct == 7) mo->Fill(clctsDatas[lct].getKeyStrip(), 4.0);
1118  if(pattern_clct == 6) mo->Fill(clctsDatas[lct].getKeyStrip(), 3.0);
1119  if(pattern_clct == 4) mo->Fill(clctsDatas[lct].getKeyStrip(), 2.0);
1120  if(pattern_clct == 2) mo->Fill(clctsDatas[lct].getKeyStrip(), 1.0);
1121  if(pattern_clct == 0) mo->Fill(clctsDatas[lct].getKeyStrip(), 0.0);
1122  }
1123 
1124  if (getCSCHisto(h::CSC_CLCTXX_DISTRIP_QUALITY, crateID, dmbID, lct, mo))
1125  mo->Fill((int)(clctsDatas[lct].getKeyStrip()),(int)(clctsDatas[lct].getQuality()));
1126 
1127  if (getCSCHisto(h::CSC_CLCTXX_DISTRIP_QUALITY_PROFILE, crateID, dmbID, lct, mo))
1128  mo->Fill((int)(clctsDatas[lct].getKeyStrip()), (int)(clctsDatas[lct].getQuality()));
1129  }
1130  }
1131 
1132  // int N_CFEBs = 5;
1133  int N_CFEBs=tmbHeader->NCFEBs();
1134 
1135  int NumberOfLayersWithHitsInCLCT = 0;
1136  int NumberOfHalfStripsWithHitsInCLCT = 0;
1137 
1138  if (clctData && clctData->check()) {
1139 
1140  MonitorObject* mo_CFEB_Comparators_TimeSamples = nullptr;
1141  getCSCHisto(h::CSC_CFEB_COMPARATORS_TIMESAMPLES, crateID, dmbID, mo_CFEB_Comparators_TimeSamples);
1142 
1143  MonitorObject* mo_CSC_Plus_endcap_CFEB_Comparators_Time = nullptr;
1144  getEMUHisto(h::EMU_CSC_ENDCAP_PLUS_CFEB_COMPARATORS_TIME, mo_CSC_Plus_endcap_CFEB_Comparators_Time);
1145 
1146  MonitorObject* mo_CSC_Minus_endcap_CFEB_Comparators_Time = nullptr;
1147  getEMUHisto(h::EMU_CSC_ENDCAP_MINUS_CFEB_COMPARATORS_TIME, mo_CSC_Minus_endcap_CFEB_Comparators_Time);
1148 
1149  MonitorObject* mo_CSC_CFEB_Comparators_Time_mean = nullptr;
1150  getEMUHisto(h::EMU_CSC_CFEB_COMPARATORS_TIME_MEAN, mo_CSC_CFEB_Comparators_Time_mean);
1151 
1152  MonitorObject* mo_CSC_CFEB_Comparators_Time_rms = nullptr;
1153  getEMUHisto(h::EMU_CSC_CFEB_COMPARATORS_TIME_RMS, mo_CSC_CFEB_Comparators_Time_rms);
1154 
1155  for(int nCFEB = 0; nCFEB < N_CFEBs; ++nCFEB) {
1156  for (int nLayer = 1; nLayer <= 6; nLayer++) {
1157 
1158  int hstrip_previous = -1;
1159  int tbin_clct_previous = -1;
1160  bool CheckLayerCLCT = true;
1161 
1162  std::vector<CSCComparatorDigi> compOutData = clctData->comparatorDigis(nLayer, nCFEB);
1163 
1164  for (std::vector<CSCComparatorDigi>::iterator compOutDataItr = compOutData.begin(); compOutDataItr != compOutData.end(); ++compOutDataItr) {
1166  int hstrip = 2 * (compOutDataItr->getStrip() - 1) + compOutDataItr->getComparator();
1167  std::vector<int> tbins_clct = compOutDataItr->getTimeBinsOn();
1168  int tbin_clct = (int)compOutDataItr->getTimeBin();
1169 
1170  if (mo_EventDisplay) {
1171  mo_EventDisplay->SetBinContent(nLayer + 11, hstrip, tbin_clct + 1);
1172  setEmuEventDisplayBit(mo_Emu_EventDisplay_Anode, glChamberIndex, 160 + hstrip, nLayer - 1);
1173  setEmuEventDisplayBit(mo_Emu_EventDisplay_XY, glChamberIndex, 160 + hstrip, nLayer - 1);
1174  }
1175 
1176  if(CheckLayerCLCT) {
1177  NumberOfLayersWithHitsInCLCT = NumberOfLayersWithHitsInCLCT + 1;
1178  CheckLayerCLCT = false;
1179  }
1180 
1181  for (uint32_t n=0; n < tbins_clct.size(); n++) {
1182  tbin_clct = tbins_clct[n];
1183  if(hstrip != hstrip_previous || (tbin_clct != tbin_clct_previous + 1 && tbin_clct != tbin_clct_previous - 1) ) {
1184 
1185  if (getCSCHisto(h::CSC_CLCTTIME_LYXX, crateID, dmbID, nLayer, mo)) mo->Fill(hstrip, tbin_clct);
1186 
1187  if (mo_CFEB_Comparators_TimeSamples) mo_CFEB_Comparators_TimeSamples->Fill(tbin_clct);
1188 
1189  if (cid.endcap() == 1) {
1190  if (mo_CSC_Plus_endcap_CFEB_Comparators_Time) mo_CSC_Plus_endcap_CFEB_Comparators_Time->Fill(tbin_clct);
1191  }
1192 
1193  if (cid.endcap() == 2) {
1194  if (mo_CSC_Minus_endcap_CFEB_Comparators_Time) mo_CSC_Minus_endcap_CFEB_Comparators_Time->Fill(tbin_clct);
1195  }
1196 
1197  if (getCSCHisto(h::CSC_CLCTTIME_LYXX_PROFILE, crateID, dmbID, nLayer, mo)) mo->Fill(hstrip, tbin_clct);
1198 
1199  if (getCSCHisto(h::CSC_CLCT_LYXX_RATE, crateID, dmbID, nLayer, mo)) {
1200 
1201  mo->Fill(hstrip);
1202 
1203  double number_hstrip = mo->GetBinContent(hstrip+1);
1204  double Number_of_entries_CLCT = mo->GetEntries();
1205 
1206  if (getCSCHisto(h::CSC_CLCT_LYXX_EFFICIENCY, crateID, dmbID, nLayer, mo)) {
1207  mo->SetBinContent(hstrip + 1, number_hstrip);
1208  if(DMBEvents > 0) {
1209  double norm = (100.0 * Number_of_entries_CLCT) / ((double)(DMBEvents));
1211  mo->SetNormFactor(norm);
1212  } else {
1213  mo->SetNormFactor(100.0);
1214  }
1215  mo->SetEntries(DMBEvents);
1216  }
1217  }
1218  }
1219 
1220  if(hstrip != hstrip_previous) {
1221  NumberOfHalfStripsWithHitsInCLCT = NumberOfHalfStripsWithHitsInCLCT + 1;
1222  }
1223  hstrip_previous = hstrip;
1224  tbin_clct_previous = tbin_clct;
1225  }
1226  }
1227  }
1228  }
1229 
1230  if (mo_CFEB_Comparators_TimeSamples) {
1231 
1232  double comps_time_mean = mo_CFEB_Comparators_TimeSamples->getTH1()->GetMean();
1233  double comps_time_rms = mo_CFEB_Comparators_TimeSamples->getTH1()->GetRMS();
1234 
1235  if (cscPosition && mo_CSC_CFEB_Comparators_Time_mean) {
1236  mo_CSC_CFEB_Comparators_Time_mean->SetBinContent(cscPosition, cscType + 1, comps_time_mean);
1237  }
1238  if (cscPosition && mo_CSC_CFEB_Comparators_Time_rms) {
1239  mo_CSC_CFEB_Comparators_Time_rms->SetBinContent(cscPosition, cscType + 1, comps_time_rms);
1240  }
1241 
1242  }
1243 
1244  } else {
1245  LOG_ERROR << cscTag << " Can not unpack CLCT Data";
1246  }
1247 
1248  if (getCSCHisto(h::CSC_CLCT_NUMBER_OF_LAYERS_WITH_HITS, crateID, dmbID, mo)) {
1249  mo->Fill(NumberOfLayersWithHitsInCLCT);
1250  MonitorObject* mo1 = nullptr;
1251  if (cscPosition && getEMUHisto(h::EMU_CSC_CLCT_PLANES_WITH_HITS, mo1)) {
1252  mo1->SetBinContent(cscPosition, cscType + 1, mo->getTH1()->GetMean());
1253  }
1254  }
1255 
1257  mo->Fill(NumberOfHalfStripsWithHitsInCLCT);
1258  } else {
1259  LOG_ERROR << cscTag << " Can not unpack TMB Header or/and Trailer";
1260  }
1261  } else {
1262  LOG_ERROR << cscTag << " Can not unpack TMB Data";
1263  }
1264 
1265  } else {
1268  if (getCSCHisto(h::CSC_CLCT_NUMBER_RATE, crateID, dmbID, mo)) {
1269  mo->Fill(0);
1270  int nCLCT = (int)mo->GetBinContent(1);
1271  if (getCSCHisto(h::CSC_CLCT_NUMBER, crateID, dmbID, mo)) mo->SetBinContent(1, (float)(nCLCT) / (float)(DMBEvents) * 100.0);
1272  }
1273  if ((tmb_dav > 0) && (getCSCHisto(h::CSC_DMB_FEB_UNPACKED_VS_DAV, crateID, dmbID, mo))) {
1274  mo->Fill(1.0, 1.0);
1275  }
1276  }
1277 
1279  int NumberOfUnpackedCFEBs = 0;
1280  const int N_CFEBs = nCFEBs, N_Samples = 16, N_Layers = 6, N_Strips = 16, nStrips = nCFEBs * N_Strips;
1281  int ADC = 0, OutOffRange, Threshold = 30;
1283 // CSCCFEBData * cfebData[N_CFEBs];
1284 // CSCCFEBTimeSlice * timeSlice[N_CFEBs][16];
1285 // CSCCFEBDataWord * timeSample[N_CFEBs][16][6][16];
1286  int Pedestal[N_CFEBs][6][16]; memset(Pedestal, 0, sizeof(Pedestal));
1287  #ifdef __clang__
1288  std::vector<std::array<std::array<std::pair<int,int>, 6>, 16>> CellPeak(N_CFEBs);
1289  std::fill(CellPeak.begin(), CellPeak.end(), std::array<std::array<std::pair<int,int>, 6>, 16>{});
1290  #else
1291  std::pair<int,int> CellPeak[N_CFEBs][6][16];
1292  memset(CellPeak, 0, sizeof(CellPeak));
1293  #endif
1294 // float PedestalError[N_CFEBs][6][16];
1295 // CSCCFEBSCAControllerWord scaControllerWord[5][16][6];
1296  bool CheckCFEB = true;
1298  float Clus_Sum_Charge;
1299  int TrigTime, L1APhase, UnpackedTrigTime, LCTPhase, SCA_BLK, NmbTimeSamples;
1301  int FreeCells, LCT_Pipe_Empty, LCT_Pipe_Full, LCT_Pipe_Count, L1_Pipe_Empty, L1_Pipe_Full, Buffer_Count;
1304  bool CheckThresholdStripInTheLayer[6][nStrips];
1305  for(int i=0; i<6; i++) {
1306  for(int j = 0; j < nStrips; j++) CheckThresholdStripInTheLayer[i][j] = true;
1307  }
1308 
1309  bool CheckOutOffRangeStripInTheLayer[6][nStrips];
1310  for(int i=0; i<6; i++) {
1311  for(int j=0; j<nStrips; j++) CheckOutOffRangeStripInTheLayer[i][j] = true;
1312  }
1313 
1315  float cscdata[N_CFEBs * 16][N_Samples][N_Layers];
1317  int SCABlockData[N_CFEBs * 16][N_Samples][N_Layers];
1318  memset(cscdata, 0, sizeof(cscdata));
1320  memset(SCABlockData, 0, sizeof(SCABlockData));
1323  char hbuf[255];
1324  memset(hbuf, 0, sizeof(hbuf));
1325 
1326  MonitorObject* mo_CFEB_SCA_CellPeak_Time = nullptr;
1327  getCSCHisto(h::CSC_CFEB_SCA_CELLPEAK_TIME, crateID, dmbID, mo_CFEB_SCA_CellPeak_Time);
1328 
1329  MonitorObject* mo_CSC_Plus_endcap_CFEB_SCA_CellPeak_Time = nullptr;
1330  getEMUHisto(h::EMU_CSC_PLUS_ENDCAP_CFEB_SCA_CELLPEAK_TIME, mo_CSC_Plus_endcap_CFEB_SCA_CellPeak_Time);
1331 
1332  MonitorObject* mo_CSC_Minus_endcap_CFEB_SCA_CellPeak_Time = nullptr;
1333  getEMUHisto(h::EMU_CSC_MINUS_ENDCAP_CFEB_SCA_CELLPEAK_TIME, mo_CSC_Minus_endcap_CFEB_SCA_CellPeak_Time);
1334 
1335  MonitorObject* mo_CSC_CFEB_SCA_CellPeak_Time_mean = nullptr;
1336  getEMUHisto(h::EMU_CSC_CFEB_SCA_CELLPEAK_TIME_MEAN, mo_CSC_CFEB_SCA_CellPeak_Time_mean);
1337 
1338  MonitorObject* mo_CSC_CFEB_SCA_CellPeak_Time_rms = nullptr;
1339  getEMUHisto(h::EMU_CSC_CFEB_SCA_CELLPEAK_TIME_RMS, mo_CSC_CFEB_SCA_CellPeak_Time_rms);
1340 
1341  for(int nCFEB = 0; nCFEB < N_CFEBs; ++nCFEB) {
1342 
1343 // cfebData[nCFEB] = data.cfebData(nCFEB);
1344  if (data.cfebData(nCFEB) !=nullptr) {
1345  if (!data.cfebData(nCFEB)->check()) continue;
1346 
1348  FEBunpacked = FEBunpacked +1; // Increment number of unpacked FED
1349  NumberOfUnpackedCFEBs = NumberOfUnpackedCFEBs + 1; // Increment number of unpaked CFEB
1350  cfeb_unpacked = 1;
1351  if(CheckCFEB == true){
1352  if (getCSCHisto(h::CSC_CSC_RATE, crateID, dmbID, mo)) {
1353  mo->Fill(4);
1354  uint32_t CFEBEvent = (uint32_t)mo->GetBinContent(5);
1355  config->setChamberCounterValue(CFEB_TRIGGERS, crateID, dmbID, CFEBEvent);
1356  if (getCSCHisto(h::CSC_CSC_EFFICIENCY, crateID, dmbID, mo)) {
1357  if(config->getNEvents() > 0) {
1358  mo->SetBinContent(3, ((float)CFEBEvent/(float)(DMBEvents)*100.0));
1359  mo->SetEntries((int)DMBEvents);
1360  }
1361  }
1362  }
1363 
1364  if ((cfeb_dav2 > 0) && (getCSCHisto(h::CSC_DMB_FEB_UNPACKED_VS_DAV, crateID, dmbID, mo))) {
1365  mo->Fill(2.0, 0.0);
1366  }
1367  CheckCFEB = false;
1368  }
1370  NmbTimeSamples= (data.cfebData(nCFEB))->nTimeSamples();
1376  MonitorObject* mo_CFEB_SCA_Block_Occupancy = nullptr;
1377  getCSCHisto(h::CSC_CFEBXX_SCA_BLOCK_OCCUPANCY, crateID, dmbID, nCFEB + 1, mo_CFEB_SCA_Block_Occupancy);
1378  MonitorObject* mo_CFEB_Free_SCA_Cells = nullptr;
1379  getCSCHisto(h::CSC_CFEBXX_FREE_SCA_CELLS, crateID, dmbID, nCFEB + 1, mo_CFEB_Free_SCA_Cells);
1380  MonitorObject* mo_CFEB_SCA_Blocks_Locked_by_LCTs = nullptr;
1381  getCSCHisto(h::CSC_CFEBXX_SCA_BLOCKS_LOCKED_BY_LCTS, crateID, dmbID, nCFEB + 1, mo_CFEB_SCA_Blocks_Locked_by_LCTs);
1382  MonitorObject* mo_CFEB_SCA_Blocks_Locked_by_LCTxL1 = nullptr;
1383  getCSCHisto(h::CSC_CFEBXX_SCA_BLOCKS_LOCKED_BY_LCTXL1, crateID, dmbID, nCFEB + 1, mo_CFEB_SCA_Blocks_Locked_by_LCTxL1);
1384  MonitorObject* mo_CFEB_DMB_L1A_diff = nullptr;
1385  getCSCHisto(h::CSC_CFEBXX_DMB_L1A_DIFF, crateID, dmbID, nCFEB + 1, mo_CFEB_DMB_L1A_diff);
1386 
1389  for(int nLayer = 1; nLayer <= N_Layers; ++nLayer) {
1391  MonitorObject * mo_CFEB_Out_Off_Range_Strips = nullptr;
1392  getCSCHisto(h::CSC_CFEB_OUT_OFF_RANGE_STRIPS_LYXX, crateID, dmbID, nLayer, mo_CFEB_Out_Off_Range_Strips);
1393  MonitorObject * mo_CFEB_Active_Samples_vs_Strip = nullptr;
1394  getCSCHisto(h::CSC_CFEB_ACTIVE_SAMPLES_VS_STRIP_LYXX, crateID, dmbID, nLayer, mo_CFEB_Active_Samples_vs_Strip);
1395  MonitorObject * mo_CFEB_Active_Samples_vs_Strip_Profile = nullptr;
1396  getCSCHisto(h::CSC_CFEB_ACTIVE_SAMPLES_VS_STRIP_LYXX_PROFILE, crateID, dmbID, nLayer, mo_CFEB_Active_Samples_vs_Strip_Profile);
1397  MonitorObject * mo_CFEB_ActiveStrips = nullptr;
1398  getCSCHisto(h::CSC_CFEB_ACTIVESTRIPS_LYXX, crateID, dmbID, nLayer, mo_CFEB_ActiveStrips);
1399  MonitorObject * mo_CFEB_SCA_Cell_Peak = nullptr;
1400  getCSCHisto(h::CSC_CFEB_SCA_CELL_PEAK_LY_XX, crateID, dmbID, nLayer, mo_CFEB_SCA_Cell_Peak);
1401 
1402  MonitorObject * mo_CFEB_Pedestal_withEMV_Sample = nullptr;
1403  getCSCHisto(h::CSC_CFEB_PEDESTAL_WITHEMV_SAMPLE_01_LYXX, crateID, dmbID, nLayer, mo_CFEB_Pedestal_withEMV_Sample);
1404  MonitorObject * mo_CFEB_Pedestal_withRMS_Sample = nullptr;
1405  getCSCHisto(h::CSC_CFEB_PEDESTAL_WITHRMS_SAMPLE_01_LYXX, crateID, dmbID, nLayer, mo_CFEB_Pedestal_withRMS_Sample);
1406  MonitorObject * mo_CFEB_PedestalRMS_Sample = nullptr;
1407  getCSCHisto(h::CSC_CFEB_PEDESTALRMS_SAMPLE_01_LYXX, crateID, dmbID, nLayer, mo_CFEB_PedestalRMS_Sample);
1408 
1409  for(int nSample = 0; nSample < NmbTimeSamples; ++nSample) {
1410 // timeSlice[nCFEB][nSample] = (CSCCFEBTimeSlice * )((cfebData[nCFEB])->timeSlice(nSample));
1411  if (timeSlice(data, nCFEB, nSample) == nullptr) {
1412  LOG_WARN << "CFEB" << nCFEB << " nSample: " << nSample << " - B-Word";
1413  continue;
1414  }
1415 
1416  if (mo_CFEB_DMB_L1A_diff && !fCloseL1As ) {
1418  int cfeb_dmb_l1a_diff = (int)((timeSlice(data, nCFEB, nSample)->get_L1A_number())-dmbHeader->l1a24()%64);
1419  if (cfeb_dmb_l1a_diff != 0) {
1420  L1A_out_of_sync = true;
1421  }
1422  if(cfeb_dmb_l1a_diff < -32) mo->Fill(cfeb_dmb_l1a_diff + 64);
1423  else {
1424  if(cfeb_dmb_l1a_diff >= 32) mo->Fill(cfeb_dmb_l1a_diff - 64);
1425  else mo_CFEB_DMB_L1A_diff->Fill(cfeb_dmb_l1a_diff);
1426  }
1427  mo_CFEB_DMB_L1A_diff->SetAxisRange(0.1, 1.1*(1.0+mo_CFEB_DMB_L1A_diff->GetBinContent(mo_CFEB_DMB_L1A_diff->GetMaximumBin())), "Y");
1428  }
1429 
1432 // scaControllerWord[nCFEB][nSample][nLayer-1] = timeSlice(cfebData, nCFEB, nSample)->scaControllerWord(nLayer);
1433 
1434  TrigTime = (int)(timeSlice(data, nCFEB, nSample)->scaControllerWord(nLayer).trig_time);
1436  FreeCells = timeSlice(data, nCFEB, nSample)->get_n_free_sca_blocks();
1437  LCT_Pipe_Empty = timeSlice(data, nCFEB, nSample)->get_lctpipe_empty();
1438  LCT_Pipe_Full = timeSlice(data, nCFEB, nSample)->get_lctpipe_full();
1439  LCT_Pipe_Count = timeSlice(data, nCFEB, nSample)->get_lctpipe_count();
1440  L1_Pipe_Empty = timeSlice(data, nCFEB, nSample)->get_l1pipe_empty();
1441  L1_Pipe_Full = timeSlice(data, nCFEB, nSample)->get_l1pipe_full();
1443  Buffer_Count = timeSlice(data, nCFEB, nSample)->get_buffer_count();
1444 
1445  SCA_BLK = (int)(timeSlice(data, nCFEB, nSample)->scaControllerWord(nLayer).sca_blk);
1449  for(int nStrip = 0; nStrip < N_Strips; ++nStrip) {
1450  SCABlockData[nCFEB*16+nStrip][nSample][nLayer-1] = SCA_BLK;
1452  }
1457  if (mo_CFEB_SCA_Block_Occupancy) mo_CFEB_SCA_Block_Occupancy->Fill(SCA_BLK);
1458 
1461  if (mo_CFEB_Free_SCA_Cells) {
1462  if (timeSlice(data, nCFEB, nSample)->scaControllerWord(nLayer).sca_full == 1) mo_CFEB_Free_SCA_Cells->Fill(-1);
1463  mo_CFEB_Free_SCA_Cells->Fill(FreeCells);
1464  }
1465 
1468  if (mo_CFEB_SCA_Blocks_Locked_by_LCTs) {
1469  if (LCT_Pipe_Empty == 1) mo_CFEB_SCA_Blocks_Locked_by_LCTs->Fill(-0.5);
1470  if (LCT_Pipe_Full == 1) mo_CFEB_SCA_Blocks_Locked_by_LCTs->Fill(16.5);
1471  mo_CFEB_SCA_Blocks_Locked_by_LCTs->Fill(LCT_Pipe_Count);
1472  }
1473 
1476  if (mo_CFEB_SCA_Blocks_Locked_by_LCTxL1) {
1477  if (L1_Pipe_Empty == 1) mo_CFEB_SCA_Blocks_Locked_by_LCTxL1->Fill(-0.5);
1478  if (L1_Pipe_Full == 1) mo_CFEB_SCA_Blocks_Locked_by_LCTxL1->Fill(31.5);
1479  mo_CFEB_SCA_Blocks_Locked_by_LCTxL1->Fill(Buffer_Count);
1480  }
1481 
1484  if(nSample == 0 && nLayer == 1) {
1485  TrigTime = (int)(timeSlice(data, nCFEB, nSample)->scaControllerWord(nLayer).trig_time);
1486  int k = 1;
1487  while (((TrigTime >> (k-1)) & 0x1) != 1 && k <= 8) {
1488  k = k + 1;
1489  }
1490  L1APhase = (int)((timeSlice(data, nCFEB, nSample)->scaControllerWord(nLayer).l1a_phase) & 0x1);
1491  UnpackedTrigTime = ((k << 1) & 0xE) + L1APhase;
1492 
1493  if (getCSCHisto(h::CSC_CFEBXX_L1A_SYNC_TIME, crateID, dmbID, nCFEB + 1, mo))
1494  mo->Fill((int)UnpackedTrigTime);
1495  LCTPhase = (int)((timeSlice(data, nCFEB, nSample)->scaControllerWord(nLayer).lct_phase)&0x1);
1496 
1497  if (getCSCHisto(h::CSC_CFEBXX_LCT_PHASE_VS_L1A_PHASE, crateID, dmbID, nCFEB + 1, mo))
1498  mo->Fill(LCTPhase, L1APhase);
1499 
1502  if (getCSCHisto(h::CSC_CFEBXX_L1A_SYNC_TIME_VS_DMB, crateID, dmbID, nCFEB + 1, mo))
1503  mo->Fill((int)(dmbHeader->dmbCfebSync()), (int)UnpackedTrigTime);
1504 
1505  if (getCSCHisto(h::CSC_CFEBXX_L1A_SYNC_TIME_DMB_DIFF, crateID, dmbID, nCFEB + 1, mo)) {
1506  int cfeb_dmb_L1A_sync_time = (int)(dmbHeader->dmbCfebSync()) - (int)UnpackedTrigTime;
1507  if(cfeb_dmb_L1A_sync_time < -8) mo->Fill(cfeb_dmb_L1A_sync_time+16);
1508  else {
1509  if(cfeb_dmb_L1A_sync_time >= 8) mo->Fill(cfeb_dmb_L1A_sync_time-16);
1510  else mo->Fill(cfeb_dmb_L1A_sync_time);
1511  }
1512  mo->SetAxisRange(0.1, 1.1*(1.0+mo->GetBinContent(mo->GetMaximumBin())), "Y");
1513  }
1514 
1515  }
1516 
1517 
1518  for(int nStrip = 1; nStrip <= N_Strips; ++nStrip) {
1519 // timeSample[nCFEB][nSample][nLayer - 1][nStrip - 1]=(data.cfebData(nCFEB)->timeSlice(nSample))->timeSample(nLayer,nStrip,data.cfebData(nCFEB)->isDCFEB());
1520  ADC = (int) ((timeSample(data, nCFEB, nSample, nLayer, nStrip)->adcCounts) & 0xFFF);
1522  OutOffRange = (int) ((timeSample(data, nCFEB, nSample, nLayer, nStrip)->adcOverflow) & 0x1);
1523 
1524  if(nSample == 0) { // nSample == 0
1525  CellPeak[nCFEB][nLayer-1][nStrip-1] = std::make_pair(nSample,ADC);
1526  Pedestal[nCFEB][nLayer-1][nStrip-1] = ADC;
1528  }
1529 
1530  if(OutOffRange == 1 && CheckOutOffRangeStripInTheLayer[nLayer - 1][nCFEB * 16 + nStrip - 1] == true) {
1532  if ( mo_CFEB_Out_Off_Range_Strips)
1533  mo_CFEB_Out_Off_Range_Strips->Fill((int)(nCFEB * 16 + nStrip - 1));
1534  CheckOutOffRangeStripInTheLayer[nLayer - 1][nCFEB * 16 + nStrip - 1] = false;
1535  }
1536  if(ADC - Pedestal[nCFEB][nLayer - 1][nStrip - 1] > Threshold && OutOffRange != 1) {
1538  if (mo_CFEB_Active_Samples_vs_Strip)
1539  mo_CFEB_Active_Samples_vs_Strip->Fill((int)(nCFEB * 16 + nStrip - 1), nSample);
1540 
1542  if (mo_CFEB_Active_Samples_vs_Strip_Profile)
1543  mo_CFEB_Active_Samples_vs_Strip_Profile->Fill((int)(nCFEB * 16 + nStrip - 1), nSample);
1544 
1545  if(CheckThresholdStripInTheLayer[nLayer - 1][nCFEB * 16 + nStrip - 1] == true) {
1547  if (mo_CFEB_ActiveStrips)
1548  mo_CFEB_ActiveStrips->Fill((int)(nCFEB * 16 + nStrip));
1549  CheckThresholdStripInTheLayer[nLayer - 1][nCFEB * 16 + nStrip - 1] = false;
1550  }
1552  if(ADC - Pedestal[nCFEB][nLayer - 1][nStrip - 1] > Threshold) {
1554  cscdata[nCFEB * 16 + nStrip - 1][nSample][nLayer - 1] = ADC - Pedestal[nCFEB][nLayer - 1][nStrip - 1];
1555  }
1557  if(ADC > CellPeak[nCFEB][nLayer - 1][nStrip - 1].second) {
1558  CellPeak[nCFEB][nLayer - 1][nStrip - 1].first = nSample;
1559  CellPeak[nCFEB][nLayer - 1][nStrip - 1].second = ADC;
1560  }
1561  }
1564  if(nSample == 1) {
1565  int channel_threshold = 40;
1566  if (std::abs(ADC - Pedestal[nCFEB][nLayer - 1][nStrip - 1]) < channel_threshold) {
1568  if (mo_CFEB_Pedestal_withEMV_Sample)
1569  mo_CFEB_Pedestal_withEMV_Sample->Fill((int)(nCFEB * 16 + nStrip - 1), Pedestal[nCFEB][nLayer - 1][nStrip - 1]);
1570 
1572  if (mo_CFEB_Pedestal_withRMS_Sample) {
1573  mo_CFEB_Pedestal_withRMS_Sample->Fill((int)(nCFEB * 16 + nStrip - 1), Pedestal[nCFEB][nLayer - 1][nStrip - 1]);
1574 // PedestalError[nCFEB][nLayer - 1][nStrip - 1] = mo_CFEB_Pedestal_withRMS_Sample->GetBinError(nCFEB * 16 + nStrip);
1575 
1577  if (mo_CFEB_PedestalRMS_Sample) {
1578  mo_CFEB_PedestalRMS_Sample->SetBinContent(nCFEB * 16 + nStrip - 1, mo_CFEB_Pedestal_withRMS_Sample->GetBinError(nCFEB * 16 + nStrip));
1579  mo_CFEB_PedestalRMS_Sample->SetBinError(nCFEB * 16 + nStrip - 1, 0.00000000001);
1580  }
1581  }
1582  }
1583  Pedestal[nCFEB][nLayer-1][nStrip-1] += ADC;
1584  Pedestal[nCFEB][nLayer-1][nStrip-1] /= 2;
1585  }
1587  }
1588  }
1589 
1590  for(int nStrip = 1; nStrip <= N_Strips; ++nStrip) {
1591  if (mo_CFEB_SCA_Cell_Peak && CellPeak[nCFEB][nLayer - 1][nStrip - 1].first) {
1592  mo_CFEB_SCA_Cell_Peak->Fill((int)(nCFEB * 16 + nStrip - 1), CellPeak[nCFEB][nLayer - 1][nStrip - 1].first);
1593  if (mo_CFEB_SCA_CellPeak_Time) {
1594  mo_CFEB_SCA_CellPeak_Time->Fill(CellPeak[nCFEB][nLayer - 1][nStrip - 1].first);
1595  }
1596 
1597  if (mo_EventDisplay) {
1598  int peak_sample = CellPeak[nCFEB][nLayer-1][nStrip-1].first;
1599  int peak_adc = CellPeak[nCFEB][nLayer-1][nStrip-1].second;
1600  int pedestal = Pedestal[nCFEB][nLayer-1][nStrip-1];
1601  int peak_sca_charge = peak_adc - pedestal;
1602 
1603  if (peak_adc - pedestal > Threshold) {
1604  if (peak_sample >=1) {
1605  peak_sca_charge += ((timeSample(data, nCFEB, peak_sample-1, nLayer, nStrip)->adcCounts)&0xFFF)-pedestal;
1606  }
1607  if (peak_sample < NmbTimeSamples-1) {
1608  peak_sca_charge += ((timeSample(data, nCFEB, peak_sample+1, nLayer, nStrip)->adcCounts)&0xFFF)-pedestal;
1609  }
1610  mo_EventDisplay->SetBinContent(nLayer + 17, nCFEB * 16 + nStrip - 1, peak_sca_charge);
1611  setEmuEventDisplayBit(mo_Emu_EventDisplay_Cathode, glChamberIndex, nCFEB * 16 + nStrip - 1, nLayer - 1);
1612  }
1613  }
1614 
1615  if (cid.endcap() == 1) {
1616  if (mo_CSC_Plus_endcap_CFEB_SCA_CellPeak_Time)
1617  mo_CSC_Plus_endcap_CFEB_SCA_CellPeak_Time->Fill(CellPeak[nCFEB][nLayer - 1][nStrip - 1].first);
1618  }
1619  if (cid.endcap() == 2) {
1620  if (mo_CSC_Minus_endcap_CFEB_SCA_CellPeak_Time)
1621  mo_CSC_Minus_endcap_CFEB_SCA_CellPeak_Time->Fill(CellPeak[nCFEB][nLayer - 1][nStrip - 1].first);
1622  }
1623  }
1624  }
1625 
1626  }
1627  }
1628 
1629  }
1630 
1631  // Fill Summary CFEB Raw Hits Timing Plots
1632  if (mo_CFEB_SCA_CellPeak_Time) {
1633  double cellpeak_time_mean = mo_CFEB_SCA_CellPeak_Time->getTH1()->GetMean();
1634  double cellpeak_time_rms = mo_CFEB_SCA_CellPeak_Time->getTH1()->GetRMS();
1635  if (cscPosition && mo_CSC_CFEB_SCA_CellPeak_Time_mean) {
1636  mo_CSC_CFEB_SCA_CellPeak_Time_mean->SetBinContent(cscPosition, cscType + 1, cellpeak_time_mean);
1637  }
1638  if (cscPosition && mo_CSC_CFEB_SCA_CellPeak_Time_rms) {
1639  mo_CSC_CFEB_SCA_CellPeak_Time_rms->SetBinContent(cscPosition, cscType + 1 ,cellpeak_time_rms);
1640  }
1641  }
1642 
1645  const int a = N_CFEBs * N_Strips;
1646  const int b = a * N_Samples;
1647  float Cathodes[b * N_Layers];
1648  for(int i = 0; i < N_Layers; ++i) {
1649  const int b1 = i * b;
1650  for(int j = 0; j < a; ++j) {
1651  const int b2 = b1 + j;
1652  for(int k = 0; k < N_Samples; ++k) {
1653  Cathodes[b2 + a * k] = cscdata[j][k][i];
1654  }
1655  }
1656  }
1657 
1658  std::vector<StripCluster> Clus;
1659  Clus.clear();
1660  StripClusterFinder ClusterFinder(N_Layers, N_Samples, N_CFEBs, N_Strips);
1661 
1662  for(int nLayer = 1; nLayer <= N_Layers; ++nLayer) {
1663 
1666  ClusterFinder.DoAction(nLayer - 1, Cathodes);
1667  Clus = ClusterFinder.getClusters();
1668 
1671  if (getCSCHisto(h::CSC_CFEB_NUMBER_OF_CLUSTERS_LY_XX, crateID, dmbID, nLayer, mo)) {
1672  // Allways true because Clus.size() = unsigned
1673  // if (Clus.size() >= 0)
1674  mo->Fill(Clus.size());
1675  }
1676 
1677  for(uint32_t u = 0; u < Clus.size(); u++){
1678 
1679  Clus_Sum_Charge = 0.0;
1680 
1681  for(uint32_t k = 0;k < Clus[u].ClusterPulseMapHeight.size(); k++) {
1682 
1685  for(int n = Clus[u].LFTBNDTime; n < Clus[u].IRTBNDTime; n++) {
1686  Clus_Sum_Charge = Clus_Sum_Charge + Clus[u].ClusterPulseMapHeight[k].height_[n];
1687  }
1688 
1689  }
1690 
1692  if (getCSCHisto(h::CSC_CFEB_CLUSTERS_CHARGE_LY_XX, crateID, dmbID, nLayer, mo)) {
1693  mo->Fill(Clus_Sum_Charge);
1694  }
1695 
1697  if (getCSCHisto(h::CSC_CFEB_WIDTH_OF_CLUSTERS_LY_XX, crateID, dmbID, nLayer, mo)) {
1698  mo->Fill(Clus[u].IRTBNDStrip - Clus[u].LFTBNDStrip + 1);
1699  }
1700 
1702  if (getCSCHisto(h::CSC_CFEB_CLUSTER_DURATION_LY_XX, crateID, dmbID, nLayer, mo)) {
1703  mo->Fill(Clus[u].IRTBNDTime - Clus[u].LFTBNDTime + 1);
1704  }
1705 
1706  }
1707 
1708  Clus.clear();
1709 
1711  }
1712 
1716  if (getCSCHisto(h::CSC_DMB_FEB_COMBINATIONS_UNPACKED_VS_DAV, crateID, dmbID, mo)) {
1717  float feb_combination_unpacked = -1.0;
1718  if(alct_unpacked == 0 && tmb_unpacked == 0 && cfeb_unpacked == 0) feb_combination_unpacked = 0.0;
1719  if(alct_unpacked > 0 && tmb_unpacked == 0 && cfeb_unpacked == 0) feb_combination_unpacked = 1.0;
1720  if(alct_unpacked == 0 && tmb_unpacked > 0 && cfeb_unpacked == 0) feb_combination_unpacked = 2.0;
1721  if(alct_unpacked == 0 && tmb_unpacked == 0 && cfeb_unpacked > 0) feb_combination_unpacked = 3.0;
1722  if(alct_unpacked > 0 && tmb_unpacked > 0 && cfeb_unpacked == 0) feb_combination_unpacked = 4.0;
1723  if(alct_unpacked > 0 && tmb_unpacked == 0 && cfeb_unpacked > 0) feb_combination_unpacked = 5.0;
1724  if(alct_unpacked == 0 && tmb_unpacked > 0 && cfeb_unpacked > 0) feb_combination_unpacked = 6.0;
1725  if(alct_unpacked > 0 && tmb_unpacked > 0 && cfeb_unpacked > 0) feb_combination_unpacked = 7.0;
1726  mo->Fill(feb_combination_dav, feb_combination_unpacked);
1727  }
1728 
1729  if((clct_kewdistrip > -1 && alct_keywg > -1) && (getCSCHisto(h::CSC_CLCT0_KEYDISTRIP_VS_ALCT0_KEYWIREGROUP, crateID, dmbID, mo))) {
1730  mo->Fill(alct_keywg, clct_kewdistrip);
1731  }
1732 
1733  if (L1A_out_of_sync && cscPosition && getEMUHisto(h::EMU_CSC_L1A_OUT_OF_SYNC, mo)){
1734  mo->Fill(cscPosition, cscType);
1735  }
1736 
1737  if (L1A_out_of_sync && getEMUHisto(h::EMU_DMB_L1A_OUT_OF_SYNC, mo)){
1738  mo->Fill(crateID, dmbID);
1739  }
1740 
1741  }
uint16_t BXNCount() const
Definition: CSCTMBHeader.h:42
unsigned tmb_half() const
Definition: CSCDMBTrailer.h:56
CSCTMBTrailer * tmbTrailer()
Definition: CSCTMBData.h:53
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.
int wordCount() const
int nclct() const
the number of CLCTs
Definition: CSCEventData.h:93
unsigned cfeb_empty() const
Definition: CSCDMBTrailer.h:53
unsigned l1a24() const
Definition: CSCDMBHeader.h:50
unsigned nclct() const
Definition: CSCDMBHeader.h:53
unsigned alct_full() const
Definition: CSCDMBTrailer.h:59
#define LOG_INFO
Definition: CSCDQM_Logger.h:43
bool isChamberStandby(unsigned int side, unsigned int station, unsigned int ring, unsigned int chamber) const
Check if chamber is in standby?
unsigned short adcOverflow
unsigned tmb_empty() const
Definition: CSCDMBTrailer.h:52
unsigned cfebActive() const
Definition: CSCDMBHeader.h:44
unsigned cfeb_endtimeout() const
Definition: CSCDMBTrailer.h:42
const CSCDMBTrailer * dmbTrailer() const
DMB trailer.
Definition: CSCEventData.h:118
uint16_t CLCTOnly() const
Definition: CSCTMBHeader.h:48
uint16_t L1ANumber() const
Definition: CSCTMBHeader.h:65
unsigned get_l1pipe_full() const
uint16_t Bxn1Diff() const
Definition: CSCTMBHeader.h:61
ExaminerStatusType errorsForChamber(CSCIdType chamber) const
unsigned nalct() const
Definition: CSCDMBHeader.h:52
Definition: config.py:1
unsigned cfebMovlp() const
Definition: CSCDMBHeader.h:54
void setEmuEventDisplayBit(MonitorObject *&mo, const unsigned int x, const unsigned int y, const unsigned int bit)
Set a single bit in the 3D Histogram (aka EMU level event display). Checks if mo and x != null...
CSCAnodeData * alctData() const
user must check if nalct > 0
CSCALCTHeader * alctHeader() const
user must check if nalct > 0
const std::string getPath() const override
Get path part of the histogram (used only for DDUs and CSCs)
bool check() const
makes sure each time slice has a trailer
Definition: CSCCFEBData.cc:319
CSCCFEBSCAControllerWord scaControllerWord(int layer) const
unpacked from the controller words for each channel in the layer
int nalct() const
the flag for existence of ALCT data
Definition: CSCEventData.h:90
int wordCount() const
uint16_t NCFEBs() const
Definition: CSCTMBHeader.h:82
const bool getCSCHisto(const HistoId &histo, const HwId &crateID, const HwId &dmbSlot, MonitorObject *&me)
Get CSC (Chamber) Level Monitoring Object.
unsigned get_buffer_count() const
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
int endcap() const
Definition: CSCDetId.h:93
U second(std::pair< T, U > const &p)
uint16_t getFormatVersion() const
Definition: CSCEventData.h:143
CSCCLCTData * clctData() const
user must check if nclct > 0
CSCALCTTrailer * alctTrailer() const
user must check if nalct > 0
unsigned cfeb_starttimeout() const
Definition: CSCDMBTrailer.h:46
unsigned get_lctpipe_empty() const
unsigned tmb_starttimeout() const
Definition: CSCDMBTrailer.h:45
CSCTMBData * tmbData() const
user must check in nclct > 0
uint16_t ALCTOnly() const
Definition: CSCTMBHeader.h:51
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
unsigned alct_starttimeout() const
Definition: CSCDMBTrailer.h:44
uint16_t Bxn0Diff() const
Definition: CSCTMBHeader.h:58
unsigned tmb_full() const
Definition: CSCDMBTrailer.h:60
CSCDetId chamberID(const CSCDetId &cscDetId)
takes layer ID, converts to chamber ID, switching ME1A to ME11
Definition: CSCDigiToRaw.cc:31
const Detector getDetector() const
unsigned bxn12() const
Definition: CSCDMBHeader.h:48
unsigned alct_half() const
Definition: CSCDMBTrailer.h:55
uint16_t ALCTMatchTime() const
Definition: CSCTMBHeader.h:45
std::vector< CSCComparatorDigi > comparatorDigis(int layer)
layers count from one
Definition: CSCCLCTData.cc:206
unsigned get_n_free_sca_blocks() const
int k[5][pyjets_maxn]
unsigned cfeb_half() const
Definition: CSCDMBTrailer.h:57
unsigned get_l1pipe_empty() const
std::vector< CSCALCTDigi > ALCTDigis() const
int ring() const
Definition: CSCDetId.h:75
unsigned cfeb_full() const
Definition: CSCDMBTrailer.h:61
unsigned crateID() const
Definition: CSCDMBHeader.h:45
std::vector< CSCCLCTDigi > CLCTDigis(uint32_t idlayer)
returns CLCT digis
Definition: CSCTMBHeader.h:98
unsigned short int alctFirmwareVersion() const
unsigned short int L1Acc() const
Definition: CSCALCTHeader.h:98
std::vector< CSCWireDigi > wireDigis(int layer) const
input layer is from 1 to 6
Definition: CSCAnodeData.h:24
double b
Definition: hdecay.h:120
bool check() const
Definition: CSCCLCTData.cc:359
CSCCFEBTimeSlice const *const timeSlice(T const &data, int nCFEB, int nSample)
#define LOG_WARN
Definition: CSCDQM_Logger.h:42
unsigned dmbID() const
Definition: CSCDMBHeader.h:46
CSCTMBHeader * tmbHeader()
Definition: CSCTMBData.h:42
const CSCCFEBData * cfebData(unsigned icfeb) const
unpacked in long mode: has overflow and error bits decoded
uint16_t TMBMatch() const
Definition: CSCTMBHeader.h:54
CSCCFEBDataWord const *const timeSample(T const &data, int nCFEB, int nSample, int nLayer, int nStrip)
double a
Definition: hdecay.h:121
bool fCloseL1As
Data Format version (2005, 2013)
unsigned tmb_endtimeout() const
Definition: CSCDMBTrailer.h:41
int station() const
Definition: CSCDetId.h:86
unsigned int GlobalChamberIndex(unsigned int side, unsigned int station, unsigned int ring, unsigned int chamber) const
Return global chamber index on his geometric location.
Definition: errors.py:1
uint16_t theFormatVersion
Total Number of TMBs per event from DMB DAV.
unsigned short adcCounts
struct ADC ADC
unsigned alct_endtimeout() const
Definition: CSCDMBTrailer.h:40
const bool getEMUHisto(const HistoId &histo, MonitorObject *&me)
Get EMU (Top Level) Monitoring Object.
unsigned short int BXNCount() const
Definition: CSCALCTHeader.h:61
unsigned alct_empty() const
Definition: CSCDMBTrailer.h:51
const CSCDMBHeader * dmbHeader() const
the DAQ motherboard header. A good place for event and chamber info
Definition: CSCEventData.h:96
unsigned dmbCfebSync() const
Definition: CSCDMBHeader.h:55
unsigned get_lctpipe_count() const
bool cfebAvailable(unsigned icfeb)
Definition: CSCDMBHeader.h:29
#define LOG_ERROR
Definition: CSCDQM_Logger.h:41
unsigned dmb_l1pipe() const
Definition: CSCDMBTrailer.h:49
unsigned get_lctpipe_full() const
void cscdqm::EventProcessor::processDDU ( const CSCDDUEventData dduData,
const CSCDCCExaminer binChecker 
)
private

Process DDU output and fill MOs.

Parameters
dduDataDDU object to process

LOG4CPLUS_WARN(logger_,eTag << "Skipped because of DDU Trailer check failed.");

New CSC readout without DCCs. CMS CSC DDU ID range 830-869

Only 8bits are significant; format of DDU id is Dxx

DDU word counter

LOG4CPLUS_DEBUG(logger_,dduTag << " Trailer Word (64 bits) Count = " << std::dec << trl_word_count);

if (fCloseL1As) LOG4CPLUS_DEBUG(logger_,eTag << " Close L1As bit is set");

DDU Header bunch crossing number (BXN)

LOG4CPLUS_WARN(logger_,dduTag << " DDU Header BXN Number = " << std::dec << BXN);

L1A number from DDU Header

LOG4CPLUS_DEBUG(logger_,dduTag << " Header L1A Number = " << std::dec << L1ANumber);

Handle 24-bit L1A roll-over maximum value case

== Occupancy and number of DMB (CSC) with Data available (DAV) in header of particular DDU

== Number of active DMB (CSC) in header of particular DDU

LOG4CPLUS_DEBUG(logger_,dduTag << " Header DMB DAV = 0x" << std::hex << dmb_dav_header);

LOG4CPLUS_DEBUG(logger_,dduTag << " Header Number of Active DMB = " << std::dec << dmb_active_header);

Check binary Error status at DDU Trailer

LOG4CPLUS_DEBUG(logger_,dduTag << " Trailer Error Status = 0x" << std::hex << trl_errorstat);

  Check DDU Output Path status in DDU Header

uint32_t ddu_output_path_status = dduHeader.output_path_status(); if (getEMUHisto(h::EMU_ALL_DDUS_OUTPUT_PATH_STATUS, mo)) { if (ddu_output_path_status) { mo->Fill(dduID,1); // Any Error for (int i=0; i<16; i++) { if ((ddu_output_path_status>>i) & 0x1) { mo->Fill(dduID,i+2); // Fill Summary Histo } } } else { mo->Fill(dduID,0); // No Errors } }

uint32_t nCSCs = 0;

/** Unpack all found CSC

First event per DDU

Definition at line 28 of file CSCDQM_EventProcessor_processDDU.cc.

References BXN, CSCDDUHeader::bxnum(), CSCDDUTrailer::check(), CSCDDUEventData::cscData(), cscdqm::h::DDU_BUFFER_SIZE, cscdqm::h::DDU_BXN, cscdqm::h::DDU_CSC_ERRORS, cscdqm::h::DDU_CSC_ERRORS_RATE, cscdqm::h::DDU_CSC_WARNINGS, cscdqm::h::DDU_CSC_WARNINGS_RATE, cscdqm::h::DDU_DMB_ACTIVE_HEADER_COUNT, cscdqm::h::DDU_DMB_CONNECTED_INPUTS, cscdqm::h::DDU_DMB_CONNECTED_INPUTS_RATE, cscdqm::h::DDU_DMB_DAV_HEADER_COUNT_VS_DMB_ACTIVE_HEADER_COUNT, cscdqm::h::DDU_DMB_DAV_HEADER_OCCUPANCY, cscdqm::h::DDU_DMB_DAV_HEADER_OCCUPANCY_RATE, cscdqm::h::DDU_DMB_UNPACKED_VS_DAV, cscdqm::h::DDU_L1A_INCREMENT, cscdqm::h::DDU_TRAILER_ERRORSTAT_FREQUENCY, cscdqm::h::DDU_TRAILER_ERRORSTAT_RATE, cscdqm::h::DDU_TRAILER_ERRORSTAT_TABLE, cscdqm::h::DDU_WORD_COUNT, CSCDDUHeader::dmb_dav(), CSCDDUTrailer::dmb_full(), CSCDDUTrailer::dmb_warn(), cscdqm::h::EMU_ALL_DDUS_AVERAGE_EVENT_SIZE, cscdqm::h::EMU_ALL_DDUS_AVERAGE_INPUTS_WITH_DATA, cscdqm::h::EMU_ALL_DDUS_AVERAGE_LIVE_INPUTS, cscdqm::h::EMU_ALL_DDUS_EVENT_SIZE, cscdqm::h::EMU_ALL_DDUS_IN_READOUT, cscdqm::h::EMU_ALL_DDUS_INPUTS_ERRORS, cscdqm::h::EMU_ALL_DDUS_INPUTS_WARNINGS, cscdqm::h::EMU_ALL_DDUS_INPUTS_WITH_DATA, cscdqm::h::EMU_ALL_DDUS_L1A_INCREMENT, cscdqm::h::EMU_ALL_DDUS_LIVE_INPUTS, cscdqm::h::EMU_ALL_DDUS_OUTPUT_PATH_STATUS, cscdqm::h::EMU_ALL_DDUS_TRAILER_ERRORS, cscdqm::h::EMU_DDU_BXN, CSCDDUTrailer::errorstat(), fCloseL1As, cscdqm::MonitorObject::Fill(), fNotFirstEvent, cscdqm::MonitorObject::GetBinContent(), getDDUHisto(), getEMUHisto(), cscdqm::DDUHistoDef::getPath(), cscdqm::Utility::getRUIfromDDUId(), CSCDDUEventData::header(), mps_fire::i, createfilelist::int, L1ANumber, L1ANumbers, CSCDDUHeader::live_cscs(), LOG_WARN, CSCDDUHeader::lvl1num(), FEDNumbering::MAXCSCDDUFEDID, FEDNumbering::MINCSCDDUFEDID, CSCDDUHeader::ncsc(), CSCDDUHeader::output_path_status(), processCSC(), CSCDDUTrailer::reserved(), cscdqm::MonitorObject::SetBinContent(), cscdqm::MonitorObject::SetEntries(), CSCDDUEventData::sizeInWords(), CSCDDUHeader::source_id(), AlCaHLTBitMon_QueryRunRegistry::string, CSCDDUEventData::trailer(), CSCDDUTrailer::wordcount(), and globals_cff::x1.

Referenced by preProcessEvent().

29 {
30 
31  CSCDDUHeader dduHeader = dduData.header();
32  CSCDDUTrailer dduTrailer = dduData.trailer();
33  if (!dduTrailer.check())
34  {
36  return;
37  }
38 
39  int dduID = dduHeader.source_id();
40 
41  if ( (dduID >= FEDNumbering::MINCSCDDUFEDID) && (dduID <= FEDNumbering::MAXCSCDDUFEDID) )
42  {
43  // dduID -= (FEDNumbering::MINCSCDDUFEDID - 1); /// TODO: Can require DDU-RUI remapping for actual system
44  dduID = cscdqm::Utility::getRUIfromDDUId(dduHeader.source_id());
45  if (dduID < 0)
46  {
47  LOG_WARN << "DDU source ID (" << dduHeader.source_id() << ") is out of valid range. Remapping to DDU ID 1.";
48  dduID = 1;
49  }
50  }
51  else
52  {
53 
55  dduID = dduID & 0xFF;
56  }
57 
58 
59  MonitorObject* mo = nullptr;
60 
62  {
63  mo->Fill(dduID);
64  }
65 
66  std::string dduTag = DDUHistoDef::getPath(dduID);
67 
68  uint32_t dduEvtSize = dduData.sizeInWords()*2;
69 
70  // if (dduEvtSize > 48)
71  {
72 
74  int trl_word_count = 0;
75  trl_word_count = dduTrailer.wordcount();
76 
77  if (getDDUHisto(h::DDU_BUFFER_SIZE, dduID, mo)) mo->Fill(dduEvtSize);
78 
79  if (getDDUHisto(h::DDU_WORD_COUNT, dduID, mo)) mo->Fill(trl_word_count );
80 
83  if (trl_word_count > 0)
84  {
86  {
87  mo->Fill(dduID, log10((double)trl_word_count));
88  }
89  }
90 
92  {
93  mo->Fill(dduID, trl_word_count);
94  }
95 
96  }
97 
98  fCloseL1As = dduTrailer.reserved() & 0x1; // Get status if Close L1As bit
102  BXN = dduHeader.bxnum();
104  if (getEMUHisto(h::EMU_DDU_BXN, mo)) mo->Fill(BXN);
105  if (getDDUHisto(h::DDU_BXN, dduID, mo)) mo->Fill(BXN);
106 
108  int L1ANumber_previous_event = L1ANumbers[dduID];
109  L1ANumbers[dduID] = (int)(dduHeader.lvl1num());
110  L1ANumber = L1ANumbers[dduID];
112  int L1A_inc = L1ANumber - L1ANumber_previous_event;
113 
115  if ( L1A_inc < 0 ) L1A_inc = 0xFFFFFF + L1A_inc;
116 
117  // if (!fFirstEvent) {
118  if (fNotFirstEvent[dduID])
119  {
120  if (getDDUHisto(h::DDU_L1A_INCREMENT, dduID, mo)) mo->Fill(L1A_inc);
122  {
123  if (L1A_inc > 100000)
124  {
125  L1A_inc = 19;
126  }
127  else if (L1A_inc > 30000)
128  {
129  L1A_inc = 18;
130  }
131  else if (L1A_inc > 10000)
132  {
133  L1A_inc = 17;
134  }
135  else if (L1A_inc > 3000)
136  {
137  L1A_inc = 16;
138  }
139  else if (L1A_inc > 1000)
140  {
141  L1A_inc = 15;
142  }
143  else if (L1A_inc > 300)
144  {
145  L1A_inc = 14;
146  }
147  else if (L1A_inc > 100)
148  {
149  L1A_inc = 13;
150  }
151  else if (L1A_inc > 30)
152  {
153  L1A_inc = 12;
154  }
155  else if (L1A_inc > 10)
156  {
157  L1A_inc = 11;
158  }
159  mo->Fill(dduID, L1A_inc);
160  }
161  }
162 
164  int dmb_dav_header = 0;
165  int dmb_dav_header_cnt = 0;
166 
167  int ddu_connected_inputs= 0;
168  int ddu_connected_inputs_cnt = 0;
169 
170  int csc_error_state = 0;
171  int csc_warning_state = 0;
172 
174  int dmb_active_header = 0;
175 
176  dmb_dav_header = dduHeader.dmb_dav();
177  dmb_active_header = (int)(dduHeader.ncsc() & 0xF);
178  csc_error_state = dduTrailer.dmb_full() & 0x7FFF; // Only 15 inputs for DDU
179  csc_warning_state = dduTrailer.dmb_warn() & 0x7FFF; // Only 15 inputs for DDU
180  ddu_connected_inputs = dduHeader.live_cscs();
181 
185  double freq = 0;
186  for (int i = 0;
187  i < 15;
188  ++i)
189  {
190  if ((dmb_dav_header >> i) & 0x1)
191  {
192  dmb_dav_header_cnt++;
194  {
195  mo->Fill(i + 1);
196  freq = (100.0 * mo->GetBinContent(i + 1)) / config->getNEvents();
198  mo->SetBinContent(i+1,freq);
199  }
201  {
202  mo->Fill(dduID, i);
203  }
204  }
205 
206  if ( (ddu_connected_inputs >> i) & 0x1 )
207  {
208  ddu_connected_inputs_cnt++;
210  {
211  mo->Fill(i + 1);
212  freq = (100.0 * mo->GetBinContent(i + 1)) / config->getNEvents();
214  mo->SetBinContent(i + 1, freq);
215  }
217  {
218  mo->Fill(dduID, i);
219  }
220  }
221 
222  if ( (csc_error_state >> i) & 0x1 )
223  {
224  if (getDDUHisto(h::DDU_CSC_ERRORS_RATE, dduID, mo))
225  {
226  mo->Fill(i + 1);
227  freq = (100.0 * mo->GetBinContent(i + 1)) / config->getNEvents();
228  if (getDDUHisto(h::DDU_CSC_ERRORS, dduID, mo))
229  mo->SetBinContent(i + 1, freq);
230  }
232  {
233  mo->Fill(dduID, i + 2);
234  }
235  }
236 
237  if ((csc_warning_state >> i) & 0x1 )
238  {
239  if (getDDUHisto(h::DDU_CSC_WARNINGS_RATE, dduID, mo))
240  {
241  mo->Fill(i + 1);
242  freq = (100.0 * mo->GetBinContent(i + 1)) / config->getNEvents();
243  if (getDDUHisto(h::DDU_CSC_WARNINGS, dduID, mo)) mo->SetBinContent(i + 1, freq);
244  }
246  {
247  mo->Fill(dduID, i + 2);
248  }
249  }
250  }
251 
253  {
254  mo->Fill(dduID, ddu_connected_inputs_cnt);
255  }
256 
257  // if (dduEvtSize > 48)
258  {
260  {
261  mo->Fill(dduID, dmb_dav_header_cnt);
262  }
263  }
264 
266  {
267  if (csc_error_state > 0)
268  {
269  mo->Fill(dduID, 1); // Any Input
270  }
271  else
272  {
273  mo->Fill(dduID, 0); // No errors
274  }
275  }
276 
278  {
279  if (csc_warning_state > 0)
280  {
281  mo->Fill(dduID, 1); // Any Input
282  }
283  else
284  {
285  mo->Fill(dduID, 0); // No errors
286  }
287  }
288 
289  if (getDDUHisto(h::DDU_DMB_DAV_HEADER_OCCUPANCY, dduID, mo)) mo->SetEntries(config->getNEvents());
290  if (getDDUHisto(h::DDU_DMB_CONNECTED_INPUTS, dduID, mo)) mo->SetEntries(config->getNEvents());
291  if (getDDUHisto(h::DDU_CSC_ERRORS, dduID, mo)) mo->SetEntries(config->getNEvents());
292  if (getDDUHisto(h::DDU_CSC_WARNINGS, dduID, mo)) mo->SetEntries(config->getNEvents());
293  if (getDDUHisto(h::DDU_DMB_ACTIVE_HEADER_COUNT, dduID, mo)) mo->Fill(dmb_active_header);
295  mo->Fill(dmb_active_header, dmb_dav_header_cnt);
296 
298  uint32_t trl_errorstat = dduTrailer.errorstat();
299  if (dmb_dav_header_cnt == 0) trl_errorstat &= ~0x20000000; // Ignore No Good DMB CRC bit of no DMB is present
301  for (int i = 0; i < 32; i++)
302  {
303  if ((trl_errorstat >> i) & 0x1)
304  {
306  {
307  mo->Fill(i);
308  double freq = (100.0 * mo->GetBinContent(i + 1)) / config->getNEvents();
310  mo->SetBinContent(i+1, freq);
311  }
313  mo->Fill(0.,i);
314  }
315  }
317  {
318  if (trl_errorstat)
319  {
320  mo->Fill(dduID, 1); // Any Error
321  for (int i = 0; i < 32; i++)
322  {
323  if ((trl_errorstat >> i) & 0x1)
324  {
325  mo->Fill(dduID, i + 2);
326  }
327  }
328  }
329  else
330  {
331  mo->Fill(dduID, 0); // No Errors
332  }
333  }
334 
335  if (getDDUHisto(h::DDU_TRAILER_ERRORSTAT_TABLE, dduID, mo)) mo->SetEntries(config->getNEvents());
336  if (getDDUHisto(h::DDU_TRAILER_ERRORSTAT_FREQUENCY, dduID, mo)) mo->SetEntries(config->getNEvents());
337 
339  uint32_t ddu_output_path_status = dduHeader.output_path_status();
341  {
342  if (ddu_output_path_status)
343  {
344  mo->Fill(dduID,1); // Any Error
345  for (int i=0; i<16; i++)
346  {
347  if ((ddu_output_path_status>>i) & 0x1)
348  {
349  mo->Fill(dduID,i+2); // Fill Summary Histo
350  }
351  }
352  }
353  else
354  {
355  mo->Fill(dduID,0); // No Errors
356  }
357  }
358 
359 
360  uint32_t nCSCs = 0;
361 
363  if (config->getPROCESS_CSC())
364  {
365 
366  std::vector<CSCEventData> chamberDatas;
367  chamberDatas.clear();
368  chamberDatas = dduData.cscData();
369 
370  nCSCs = chamberDatas.size();
371 
372  for (uint32_t i = 0; i < nCSCs; i++)
373  {
374  processCSC(chamberDatas[i], dduID, binChecker);
375  }
376 
377  }
378 
379  if (getDDUHisto(h::DDU_DMB_UNPACKED_VS_DAV, dduID, mo)) mo->Fill(dmb_active_header, nCSCs);
380 
381  // fFirstEvent = false;
382 
384  fNotFirstEvent[dduID] = true;
385 
386 }
CSCDDUHeader header() const
int lvl1num() const
Definition: CSCDDUHeader.h:25
const bool getDDUHisto(const HistoId &histo, const HwId &dduID, MonitorObject *&me)
Get DDU Level Monitoring Object.
unsigned errorstat() const
Definition: CSCDDUTrailer.h:41
static int getRUIfromDDUId(unsigned ddu_id)
Get RUI Number from DDU source ID for post LS1 configuration.
void processCSC(const CSCEventData &data, const int dduID, const CSCDCCExaminer &binChecker)
Process Chamber Data and fill MOs.
unsigned dmb_warn() const
Definition: CSCDDUTrailer.h:46
std::map< uint32_t, uint32_t > L1ANumbers
Definition: config.py:1
int bxnum() const
Definition: CSCDDUHeader.h:24
int output_path_status() const
Definition: CSCDDUHeader.h:31
int dmb_dav() const
Definition: CSCDDUHeader.h:28
unsigned reserved() const
Definition: CSCDDUTrailer.h:48
bool check() const
Definition: CSCDDUTrailer.h:30
const std::vector< CSCEventData > & cscData() const
accessor to data
unsigned dmb_full() const
Definition: CSCDDUTrailer.h:47
#define LOG_WARN
Definition: CSCDQM_Logger.h:42
CSCDDUTrailer trailer() const
bool fCloseL1As
Data Format version (2005, 2013)
unsigned wordcount() const
Definition: CSCDDUTrailer.h:42
int ncsc() const
Definition: CSCDDUHeader.h:27
int source_id() const
Definition: CSCDDUHeader.h:23
int live_cscs() const
Definition: CSCDDUHeader.h:30
std::map< uint32_t, bool > fNotFirstEvent
const bool getEMUHisto(const HistoId &histo, MonitorObject *&me)
Get EMU (Top Level) Monitoring Object.
const std::string getPath() const override
Get path part of the histogram (used only for DDUs and CSCs)
int sizeInWords() const
bool cscdqm::EventProcessor::processExaminer ( const CSCDCCExaminer binChecker)
private

Referenced by preProcessEvent().

bool cscdqm::EventProcessor::processExaminer ( const CSCDCCExaminer binChecker,
const CSCDCCFormatStatusDigi digi 
)
private

Fill monitor elements with CSCDCCFormatStatusDigi information.

Returns
true if this buffer (event) was accepted by Examiner else otherwise

New CSC readout without DCCs. CMS CSC DDU ID range 830-869

Check and fill CSC Payload information

Update counters

Get FEBs Data Available Info

Increment total number of CFEBs, ALCTs, TMBs

Fill Histogram for FEB DAV Efficiency

Fill Histogram for Different Combinations of FEB DAV Efficiency

Check and fill CSC Data Flow Problems

Check and fill CSC Format Errors

Definition at line 28 of file CSCDQM_EventProcessor_processExaminer.cc.

References cscdqm::BAD_EVENTS, cscd2r::chamberID(), cntALCTs, cntCFEBs, cntDMBs, cntTMBs, cscdqm::h::CSC_ACTUAL_DMB_CFEB_DAV_FREQUENCY, cscdqm::h::CSC_ACTUAL_DMB_CFEB_DAV_MULTIPLICITY_FREQUENCY, cscdqm::h::CSC_ACTUAL_DMB_CFEB_DAV_MULTIPLICITY_RATE, cscdqm::h::CSC_ACTUAL_DMB_CFEB_DAV_RATE, cscdqm::h::CSC_ACTUAL_DMB_FEB_COMBINATIONS_DAV_FREQUENCY, cscdqm::h::CSC_ACTUAL_DMB_FEB_COMBINATIONS_DAV_RATE, cscdqm::h::CSC_ACTUAL_DMB_FEB_DAV_FREQUENCY, cscdqm::h::CSC_ACTUAL_DMB_FEB_DAV_RATE, cscdqm::h::CSC_BINCHECK_DATAFLOW_PROBLEMS_TABLE, cscdqm::h::CSC_BINCHECK_ERRORSTAT_TABLE, cscdqm::h::CSC_DMB_CFEB_ACTIVE_VS_DAV, cscdqm::h::CSC_DMB_CFEB_DAV, cscdqm::h::CSC_DMB_CFEB_DAV_MULTIPLICITY, cscdqm::h::CSC_DMB_CFEB_DAV_MULTIPLICITY_UNPACKING_INEFFICIENCY, cscdqm::h::CSC_DMB_CFEB_DAV_UNPACKING_INEFFICIENCY, cscdqm::h::CSC_DMB_FEB_COMBINATIONS_DAV_RATE, cscdqm::h::CSC_DMB_FEB_COMBINATIONS_DAV_UNPACKING_INEFFICIENCY, cscdqm::h::CSC_DMB_FEB_DAV_RATE, cscdqm::h::CSC_DMB_FEB_DAV_UNPACKING_INEFFICIENCY, cscdqm::DMB_EVENTS, cscdqm::DMB_TRIGGERS, cscdqm::h::EMU_ALL_DDUS_FORMAT_ERRORS, cscdqm::h::EMU_CSC_DMB_INPUT_FIFO_FULL, cscdqm::h::EMU_CSC_DMB_INPUT_TIMEOUT, cscdqm::h::EMU_CSC_FORMAT_ERRORS, cscdqm::h::EMU_CSC_FORMAT_WARNINGS, cscdqm::h::EMU_CSC_REPORTING, cscdqm::h::EMU_CSC_UNPACKED_WITH_ERRORS, cscdqm::h::EMU_CSC_WO_ALCT, cscdqm::h::EMU_CSC_WO_CFEB, cscdqm::h::EMU_CSC_WO_CLCT, cscdqm::h::EMU_DMB_FORMAT_ERRORS, cscdqm::h::EMU_DMB_FORMAT_WARNINGS, cscdqm::h::EMU_DMB_INPUT_FIFO_FULL, cscdqm::h::EMU_DMB_INPUT_TIMEOUT, cscdqm::h::EMU_DMB_REPORTING, cscdqm::h::EMU_DMB_UNPACKED_WITH_ERRORS, cscdqm::h::EMU_DMB_WO_ALCT, cscdqm::h::EMU_DMB_WO_CFEB, cscdqm::h::EMU_DMB_WO_CLCT, cscdqm::MonitorObject::Fill(), cscdqm::MonitorObject::GetBinContent(), CSCDCCFormatStatusDigi::getCSCErrors(), getCSCFromMap(), getCSCHisto(), CSCDCCFormatStatusDigi::getCSCPayload(), CSCDCCFormatStatusDigi::getCSCStatus(), CSCDCCFormatStatusDigi::getDDUErrors(), CSCDCCFormatStatusDigi::getDDUSummaryErrors(), getEMUHisto(), CSCDCCFormatStatusDigi::getListOfDDUs(), cscdqm::Utility::getRUIfromDDUId(), mps_fire::i, LOG_WARN, FEDNumbering::MAXCSCDDUFEDID, FEDNumbering::MINCSCDDUFEDID, CSCDCCFormatStatusDigi::nextCSCWithError(), CSCDCCFormatStatusDigi::nextCSCWithPayload(), CSCDCCFormatStatusDigi::nextCSCWithStatus(), CSCDCCExaminer::nSTATUSES, jets_cff::payload, cscdqm::MonitorObject::SetBinContent(), cscdqm::MonitorObject::SetEntries(), cscdqm::MonitorObject::SetMaximum(), and globals_cff::x1.

29 {
30 
31  bool eventAccepted = true;
32  MonitorObject* mo = nullptr;
33 
34  uint32_t binErrorStatus = digi.getDDUSummaryErrors();
35 
37  {
38 
39  const std::set<DDUIdType> DDUs = digi.getListOfDDUs();
40  for (std::set<DDUIdType>::const_iterator ddu_itr = DDUs.begin(); ddu_itr != DDUs.end(); ++ddu_itr)
41  {
42  ExaminerStatusType errs = digi.getDDUErrors(*ddu_itr);
43  int dduID = (*ddu_itr)&0xFF;
44  if ( ((*ddu_itr) >= FEDNumbering::MINCSCDDUFEDID) && ((*ddu_itr) <= FEDNumbering::MAXCSCDDUFEDID) )
45  {
46  // dduID = (*ddu_itr) - FEDNumbering::MINCSCDDUFEDID + 1; /// TODO: Can require DDU-RUI remapping for actual system
47  dduID = cscdqm::Utility::getRUIfromDDUId((*ddu_itr));
48  if (dduID < 0) {
49  LOG_WARN << "DDU source ID (" << (*ddu_itr) << ") is out of valid range. Remapping to DDU ID 1.";
50  dduID = 1;
51  }
52  }
53  if (errs != 0)
54  {
55  for (int i = 0; i < 29; i++)
56  {
57  if ((errs >> i) & 0x1 )
58  {
59  mo->Fill(dduID, i + 1);
60  }
61  }
62  }
63  else
64  {
65  mo->Fill(dduID, 0);
66  }
67  }
68 
69  }
70 
71  // =VB= We want to use DCC level check mask as in CSCDCCUnpacker and not DDU mask
72  // Otherwise whole DCC event could be skipped because of a single chamber error
73  unsigned long dccBinCheckMask = 0x06080016;
74 // if ((binErrorStatus & config->getDDU_BINCHECK_MASK()) > 0) {
75  if ((binErrorStatus & dccBinCheckMask) > 0)
76  {
77  eventAccepted = false;
78  }
79 
80  if (binErrorStatus != 0)
81  {
82  config->incNEventsBad();
83  }
84 
87  {
88  uint32_t i = 0;
89  CSCIdType chamberID = 0;
90  while (digi.nextCSCWithPayload(i, chamberID))
91  {
92 
93  int crateID = (chamberID >> 4) & 0xFF;
94  int dmbSlot = chamberID & 0xF;
95 
96  if (crateID == 255)
97  {
98  continue;
99  }
100  if ((crateID > 60) || (dmbSlot > 10) || (crateID <= 0) || (dmbSlot <= 0) )
101  {
102  continue;
103  }
104 
105  // Check if in standby!
106  {
107  CSCDetId cid;
108  if (!config->fnGetCSCDetId(crateID, dmbSlot, cid))
109  {
110  continue;
111  }
112  }
113 
115  config->incChamberCounter(DMB_EVENTS, crateID, dmbSlot);
116  long DMBEvents = config->getChamberCounterValue(DMB_EVENTS, crateID, dmbSlot);
117  config->copyChamberCounterValue(DMB_EVENTS, DMB_TRIGGERS, crateID, dmbSlot);
118  cntDMBs++;
119 
121  {
122  mo->Fill(crateID, dmbSlot);
123  }
124 
125  unsigned int cscType = 0;
126  unsigned int cscPosition = 0;
127  if (!getCSCFromMap(crateID, dmbSlot, cscType, cscPosition)) continue;
128 
129  if (cscPosition && getEMUHisto(h::EMU_CSC_REPORTING, mo))
130  {
131  mo->Fill(cscPosition, cscType);
132  }
133 
135  long payload = digi.getCSCPayload(chamberID);
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) & 0x1;
140  int tmb_dav = (payload >> 6) & 0x1;
141  int cfeb_dav_num = 0;
142 
143  if (alct_dav == 0)
144  {
145  if (cscPosition && getEMUHisto(h::EMU_CSC_WO_ALCT, mo))
146  {
147  mo->Fill(cscPosition, cscType);
148  }
150  {
151  mo->Fill(crateID, dmbSlot);
152  }
153  }
154 
155  if (tmb_dav == 0)
156  {
157  if (cscPosition && getEMUHisto(h::EMU_CSC_WO_CLCT, mo))
158  {
159  mo->Fill(cscPosition, cscType);
160  }
162  {
163  mo->Fill(crateID, dmbSlot);
164  }
165  }
166 
167  if (cfeb_dav == 0)
168  {
169  if (cscPosition && getEMUHisto(h::EMU_CSC_WO_CFEB, mo))
170  {
171  mo->Fill(cscPosition, cscType);
172  }
174  {
175  mo->Fill(crateID, dmbSlot);
176  }
177  }
178 
180  for (int i=0; i<7; i++)
181  {
182  if ((cfeb_dav>>i) & 0x1) cntCFEBs++;
183  }
184 
185  if (alct_dav > 0)
186  {
187  cntALCTs++;
188  }
189 
190  if (tmb_dav > 0)
191  {
192  cntTMBs++;
193  }
194 
195 
196  MonitorObject *mof = nullptr, *mo1 = nullptr, *mo2 = nullptr;
197  if (getCSCHisto(h::CSC_ACTUAL_DMB_CFEB_DAV_RATE, crateID, dmbSlot, mo)
198  && getCSCHisto(h::CSC_ACTUAL_DMB_CFEB_DAV_FREQUENCY, crateID, dmbSlot, mof))
199  {
200  if (getCSCHisto(h::CSC_DMB_CFEB_DAV_UNPACKING_INEFFICIENCY, crateID, dmbSlot, mo1)
201  && getCSCHisto(h::CSC_DMB_CFEB_DAV, crateID, dmbSlot, mo2))
202  {
203  for (int i=1; i<=7; i++)
204  {
205  double actual_dav_num = mo->GetBinContent(i);
206  double unpacked_dav_num = mo2->GetBinContent(i);
207  if (actual_dav_num)
208  {
209  mo1->SetBinContent(i,1, 100.*(1-unpacked_dav_num/actual_dav_num));
210  }
211  mo1->SetEntries((int)DMBEvents);
212  }
213  }
214  for (int i=0; i<7; i++)
215  {
216  int cfeb_present = (cfeb_dav>>i) & 0x1;
217  cfeb_dav_num += cfeb_present;
218  if (cfeb_present)
219  {
220  mo->Fill(i);
221  }
222  float cfeb_entries = mo->GetBinContent(i+1);
223  mof->SetBinContent(i+1, ((float)cfeb_entries/(float)(DMBEvents)*100.0));
224  }
225  mof->SetEntries((int)DMBEvents);
226  }
227 
230  {
231  for (unsigned short i = 1; i < 7; i++)
232  {
233  float cfeb_entries = mo->GetBinContent(i);
234  mof->SetBinContent(i, ((float)cfeb_entries / (float)(DMBEvents) * 100.0));
235  }
236  mof->SetEntries((int)DMBEvents);
237 
239  && getCSCHisto(h::CSC_DMB_CFEB_DAV_MULTIPLICITY, crateID, dmbSlot, mo2))
240  {
241  for (unsigned short i = 1; i < 9; i++)
242  {
243  float actual_dav_num = mo->GetBinContent(i);
244  float unpacked_dav_num = mo2->GetBinContent(i);
245  if (actual_dav_num)
246  {
247  mo1->SetBinContent(i, 1, 100. * (1-unpacked_dav_num/actual_dav_num));
248  }
249  mo1->SetEntries((int)DMBEvents);
250  }
251  }
252  mo->Fill(cfeb_dav_num);
253  }
254 
255  if (getCSCHisto(h::CSC_DMB_CFEB_ACTIVE_VS_DAV, crateID, dmbSlot, mo)) mo->Fill(cfeb_dav, cfeb_active);
256 
258  if (getCSCHisto(h::CSC_ACTUAL_DMB_FEB_DAV_RATE, crateID, dmbSlot, mo))
259  {
260  if (getCSCHisto(h::CSC_ACTUAL_DMB_FEB_DAV_FREQUENCY, crateID, dmbSlot, mo1))
261  {
262  for (int i = 1; i < 4; i++)
263  {
264  float dav_num = mo->GetBinContent(i);
265  mo1->SetBinContent(i, ((float)dav_num / (float)(DMBEvents) * 100.0));
266  }
267  mo1->SetEntries((int)DMBEvents);
268 
269  if (getCSCHisto(h::CSC_DMB_FEB_DAV_UNPACKING_INEFFICIENCY, crateID, dmbSlot, mof)
270  && getCSCHisto(h::CSC_DMB_FEB_DAV_RATE, crateID, dmbSlot, mo2))
271  {
272  for (int i = 1; i < 4; i++)
273  {
274  float actual_dav_num = mo->GetBinContent(i);
275  float unpacked_dav_num = mo2->GetBinContent(i);
276  if (actual_dav_num)
277  {
278  mof->SetBinContent(i,1, 100. * (1 - unpacked_dav_num / actual_dav_num));
279  }
280  mof->SetEntries((int)DMBEvents);
281  mof->SetMaximum(100.0);
282  }
283  }
284  }
285 
286  if (alct_dav > 0)
287  {
288  mo->Fill(0.0);
289  }
290  if (tmb_dav > 0)
291  {
292  mo->Fill(1.0);
293  }
294  if (cfeb_dav > 0)
295  {
296  mo->Fill(2.0);
297  }
298  }
299 
300 
301  float feb_combination_dav = -1.0;
303  if (getCSCHisto(h::CSC_ACTUAL_DMB_FEB_COMBINATIONS_DAV_RATE, crateID, dmbSlot, mo))
304  {
305  if (alct_dav == 0 && tmb_dav == 0 && cfeb_dav == 0) feb_combination_dav = 0.0; // Nothing
306  if (alct_dav > 0 && tmb_dav == 0 && cfeb_dav == 0) feb_combination_dav = 1.0; // ALCT Only
307  if (alct_dav == 0 && tmb_dav > 0 && cfeb_dav == 0) feb_combination_dav = 2.0; // TMB Only
308  if (alct_dav == 0 && tmb_dav == 0 && cfeb_dav > 0) feb_combination_dav = 3.0; // CFEB Only
309  if (alct_dav == 0 && tmb_dav > 0 && cfeb_dav > 0) feb_combination_dav = 4.0; // TMB+CFEB
310  if (alct_dav > 0 && tmb_dav > 0 && cfeb_dav == 0) feb_combination_dav = 5.0; // ALCT+TMB
311  if (alct_dav > 0 && tmb_dav == 0 && cfeb_dav > 0) feb_combination_dav = 6.0; // ALCT+CFEB
312  if (alct_dav > 0 && tmb_dav > 0 && cfeb_dav > 0) feb_combination_dav = 7.0; // ALCT+TMB+CFEB
313  // mo->Fill(feb_combination_dav);
314 
316  {
317  for (int i = 1; i < 9; i++)
318  {
319  float feb_combination_dav_number = mo->GetBinContent(i);
320  mo1->SetBinContent(i, ((float)feb_combination_dav_number / (float)(DMBEvents) * 100.0));
321  }
322  mo1->SetEntries(DMBEvents);
323 
325  && getCSCHisto(h::CSC_DMB_FEB_COMBINATIONS_DAV_RATE, crateID, dmbSlot, mo2))
326  {
327  for (int i = 1; i < 9; i++)
328  {
329  float actual_dav_num = mo->GetBinContent(i);
330  float unpacked_dav_num = mo2->GetBinContent(i);
331  if (actual_dav_num)
332  {
333  mof->SetBinContent(i, 1, 100. * (1 - unpacked_dav_num / actual_dav_num));
334  }
335  mof->SetEntries((int)DMBEvents);
336  mof->SetMaximum(100.0);
337  }
338  }
339 
340  }
341  mo->Fill(feb_combination_dav);
342  }
343 
344  }
345  }
346 
349  {
350  uint32_t i = 0;
351  CSCIdType chamberID = 0;
352  while (digi.nextCSCWithStatus(i, chamberID))
353  {
354 
355  unsigned int crateID = (chamberID >> 4) & 0xFF;
356  unsigned int dmbSlot = chamberID & 0xF;
357  ExaminerStatusType chStatus = digi.getCSCStatus(chamberID);
358 
359  if (crateID == 255)
360  {
361  continue;
362  }
363  if ((crateID > 60) || (dmbSlot > 10) || (crateID <= 0) || (dmbSlot <= 0) )
364  {
365  continue;
366  }
367 
368  // Check if in standby!
369  {
370  CSCDetId cid;
371  if (!config->fnGetCSCDetId(crateID, dmbSlot, cid))
372  {
373  continue;
374  }
375  }
376 
377  unsigned int cscType = 0;
378  unsigned int cscPosition = 0;
379  if (!getCSCFromMap(crateID, dmbSlot, cscType, cscPosition)) continue;
380 
381  if (getCSCHisto(h::CSC_BINCHECK_DATAFLOW_PROBLEMS_TABLE, crateID, dmbSlot, mo))
382  {
383  for (int bit = 0; bit < binChecker.nSTATUSES; bit++)
384  {
385  if (chStatus & (1<<bit) )
386  {
387  mo->Fill(0., bit);
388  }
389  }
390  mo->SetEntries(config->getChamberCounterValue(DMB_EVENTS, crateID, dmbSlot));
391  }
392 
393 
394  int anyInputFull = chStatus & 0x3F;
395  if (anyInputFull)
396  {
397  if (cscPosition && getEMUHisto(h::EMU_CSC_DMB_INPUT_FIFO_FULL, mo))
398  {
399  mo->Fill(cscPosition, cscType);
400  }
402  {
403  mo->Fill(crateID, dmbSlot);
404  }
405  }
406 
407  int anyInputTO = (chStatus >> 7) & 0x3FFF;
408  if (anyInputTO)
409  {
410  if (cscPosition && getEMUHisto(h::EMU_CSC_DMB_INPUT_TIMEOUT, mo))
411  {
412  mo->Fill(cscPosition, cscType);
413  }
415  {
416  mo->Fill(crateID, dmbSlot);
417  }
418  }
419 
420  if (digi.getCSCStatus(chamberID) & (1 << 22))
421  {
423  {
424  mo->Fill(crateID, dmbSlot);
425  }
426 
427  if (cscPosition && getEMUHisto(h::EMU_CSC_FORMAT_WARNINGS, mo))
428  {
429  mo->Fill(cscPosition, cscType);
430  }
431 
432  }
433  }
434 
435  }
436 
439  {
440  uint32_t i = 0;
441  CSCIdType chamberID = 0;
442  while (digi.nextCSCWithError(i, chamberID))
443  {
444 
445  const unsigned int crateID = (chamberID >> 4) & 0xFF;
446  const unsigned int dmbSlot = chamberID & 0xF;
447  const ExaminerStatusType chErr = digi.getCSCErrors(chamberID);
448 
449  if ((crateID ==255) || (chErr & 0x80))
450  {
451  continue; // = Skip chamber detection if DMB header is missing (Error code 6)
452  }
453  if ((crateID > 60) || (dmbSlot > 10) || (crateID <= 0) || (dmbSlot <= 0) )
454  {
455  continue;
456  }
457 
458 
459  // Check if in standby!
460  {
461  CSCDetId cid;
462  if (!config->fnGetCSCDetId(crateID, dmbSlot, cid))
463  {
464  continue;
465  }
466  }
467 
468  if ((chErr & config->getBINCHECK_MASK()) != 0)
469  {
470  config->incChamberCounter(BAD_EVENTS, crateID , dmbSlot);
471  }
472 
473  bool isCSCError = false;
474  bool fillBC = getCSCHisto(h::CSC_BINCHECK_ERRORSTAT_TABLE, crateID, dmbSlot, mo);
475 
476  for (int bit = 5; bit < 24; bit++)
477  {
478 
479  if (chErr & (1 << bit) )
480  {
481  isCSCError = true;
482  if (fillBC)
483  {
484  mo->Fill(0., bit - 5);
485  }
486  else
487  {
488  break;
489  }
490  }
491 
492  if (fillBC)
493  {
494  mo->SetEntries(config->getChamberCounterValue(DMB_EVENTS, crateID , dmbSlot));
495  }
496 
497  }
498 
499  if (isCSCError)
500  {
501 
503  {
504  mo->Fill(crateID, dmbSlot);
505  }
506 
507  if (eventAccepted && getEMUHisto(h::EMU_DMB_UNPACKED_WITH_ERRORS, mo))
508  {
509  mo->Fill(crateID, dmbSlot);
510  }
511 
512  unsigned int cscType = 0;
513  unsigned int cscPosition = 0;
514  if (!getCSCFromMap(crateID, dmbSlot, cscType, cscPosition)) continue;
515 
516  if ( cscPosition && getEMUHisto(h::EMU_CSC_FORMAT_ERRORS, mo))
517  {
518  mo->Fill(cscPosition, cscType);
519  }
520 
521  if (eventAccepted && cscPosition && getEMUHisto(h::EMU_CSC_UNPACKED_WITH_ERRORS, mo))
522  {
523  mo->Fill(cscPosition, cscType);
524  }
525  }
526 
527  }
528  }
529 
530  return eventAccepted;
531 
532 }
const uint16_t nSTATUSES
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.
int32_t CSCIdType
ExaminerStatusType getDDUSummaryErrors() const
std::set< DDUIdType > getListOfDDUs() const
ExaminerStatusType getCSCStatus(const CSCIdType CSCId) const
static int getRUIfromDDUId(unsigned ddu_id)
Get RUI Number from DDU source ID for post LS1 configuration.
Definition: config.py:1
bool nextCSCWithStatus(uint32_t &iterator, CSCIdType &CSCId) const
CSC with status iteration procedure.
ExaminerStatusType getCSCErrors(const CSCIdType CSCId) const
ExaminerStatusType getDDUErrors(const DDUIdType DDUId) const
bool nextCSCWithError(uint32_t &iterator, CSCIdType &CSCId) const
CSC with error iteration procedure. Usage: unsigned int i = 0; CSCIdType cscId; while (c...
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.
CSCDetId chamberID(const CSCDetId &cscDetId)
takes layer ID, converts to chamber ID, switching ME1A to ME11
Definition: CSCDigiToRaw.cc:31
ExaminerStatusType getCSCPayload(const CSCIdType CSCId) const
uint32_t ExaminerStatusType
#define LOG_WARN
Definition: CSCDQM_Logger.h:42
bool nextCSCWithPayload(uint32_t &iterator, CSCIdType &CSCId) const
CSC with payload iteration procedure.
const bool getEMUHisto(const HistoId &histo, MonitorObject *&me)
Get EMU (Top Level) Monitoring Object.
void cscdqm::EventProcessor::resetEmuEventDisplays ( )
private

Reset Emu level EventDisplay histograms once per event.

Definition at line 56 of file CSCDQM_EventProcessor_processCSC.cc.

References cscdqm::h::EMU_EVENT_DISPLAY_ANODE, cscdqm::h::EMU_EVENT_DISPLAY_CATHODE, cscdqm::h::EMU_EVENT_DISPLAY_XY, EmuEventDisplayWasReset, getEMUHisto(), and cscdqm::MonitorObject::getTH1Lock().

Referenced by setEmuEventDisplayBit().

56  {
58 
59  // Reseting EMU level Event displays
60  MonitorObject* mo = nullptr;
62  mo->getTH1Lock()->Reset("");
63  }
64 
66  mo->getTH1Lock()->Reset("");
67  }
68 
70  mo->getTH1Lock()->Reset("");
71  }
72 
74 
75  }
76  }
const bool getEMUHisto(const HistoId &histo, MonitorObject *&me)
Get EMU (Top Level) Monitoring Object.
void cscdqm::EventProcessor::setEmuEventDisplayBit ( MonitorObject *&  mo,
const unsigned int  x,
const unsigned int  y,
const unsigned int  bit 
)
private

Set a single bit in the 3D Histogram (aka EMU level event display). Checks if mo and x != null.

Parameters
eventNumbernumber of event
moHistogram
xX bin number
yY bin number
bitbit number to set

Definition at line 43 of file CSCDQM_EventProcessor_processCSC.cc.

References cscdqm::MonitorObject::GetBinContent(), createfilelist::int, resetEmuEventDisplays(), and cscdqm::MonitorObject::SetBinContent().

Referenced by processCSC().

43  {
44  if (mo && x) {
46  int bitset = (int) mo->GetBinContent(x, y);
47  bitset |= 1 << bit;
48  mo->SetBinContent(x, y, bitset);
49  }
50  }
void resetEmuEventDisplays()
Reset Emu level EventDisplay histograms once per event.
void cscdqm::EventProcessor::standbyEfficiencyHistos ( HWStandbyType standby)

apply standby flags/parameters

Parameters
standbystandby flags

Definition at line 366 of file CSCDQM_EventProcessor_updateEffHistos.cc.

References cscdqm::AddressMask::cfeb, cscdqm::AddressMask::chamber, cscdqm::h::EMU_CSC_STANDBY, getEMUHisto(), cscdqm::MonitorObject::getTH1Lock(), cscdqm::AddressMask::hv, cscdqm::AddressMask::layer, CommonMethods::lock(), cscdqm::Address::mask, cscdqm::HWStandbyType::MeM, cscdqm::HWStandbyType::MeP, cscdqm::Lock::mutex, cscdqm::AddressMask::ring, cscdqm::Summary::SetValue(), cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::STANDBY, cscdqm::AddressMask::station, summary, tmp, cscdqm::WAS_ON, and cscdqm::Summary::WriteChamberState().

Referenced by cscdqm::EventProcessorMutex::processStandby().

366  {
367 
368  Address adr;
369  adr.mask.side = true;
370  adr.mask.station = adr.mask.ring = adr.mask.chamber = adr.mask.layer = adr.mask.cfeb = adr.mask.hv = false;
371 
372  adr.side = 1;
373  summary.SetValue(adr, STANDBY, (standby.MeP ? 1 : 0));
374  if (!standby.MeP) {
375  summary.SetValue(adr, WAS_ON);
376  }
377 
378  adr.side = 2;
379  summary.SetValue(adr, STANDBY, (standby.MeM ? 1 : 0));
380  if (!standby.MeM) {
381  summary.SetValue(adr, WAS_ON);
382  }
383 
384  MonitorObject *me = nullptr;
386  LockType lock(me->mutex);
387  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
388 
389  // All standby
390  summary.WriteChamberState(tmp, 0x1000, 5);
391 
392  // Temporary in standby (was ON)
393  summary.WriteChamberState(tmp, 0x3000, 1, false);
394 
395  }
396 
397  }
HW element in standby mode.
Data with CFEB BWORDS.
void SetValue(const HWStatusBit bit, const int value=1)
SetValue for the whole of detector.
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void WriteChamberState(TH2 *&h2, const int mask, const int value=1, const bool reset=true, const bool op_any=false) const
Write State information to chamber histogram.
const bool getEMUHisto(const HistoId &histo, MonitorObject *&me)
Get EMU (Top Level) Monitoring Object.
void cscdqm::EventProcessor::updateEfficiencyHistos ( )

Update Efficiency MOs.

Get CSC Reporting reference histogram

If reference for CSC_Reporting is defined - use it Else - do it flat way

Write summary information

Looping via addresses (scope: side->station->ring) and filling in HW efficiencies

Definition at line 26 of file CSCDQM_EventProcessor_updateEffHistos.cc.

References cscdqm::AddressMask::cfeb, cscdqm::CFEB_BWORDS, cscdqm::AddressMask::chamber, cscdqm::h::EMU_CSC_DMB_INPUT_FIFO_FULL, cscdqm::h::EMU_CSC_DMB_INPUT_TIMEOUT, cscdqm::h::EMU_CSC_FORMAT_ERRORS, cscdqm::h::EMU_CSC_FORMAT_WARNINGS, cscdqm::h::EMU_CSC_L1A_OUT_OF_SYNC, cscdqm::h::EMU_CSC_REPORTING, cscdqm::h::EMU_CSC_WO_ALCT, cscdqm::h::EMU_CSC_WO_CFEB, cscdqm::h::EMU_CSC_WO_CLCT, cscdqm::h::EMU_PHYSICS_EMU, cscdqm::h::EMU_PHYSICS_ME1, cscdqm::h::EMU_PHYSICS_ME2, cscdqm::h::EMU_PHYSICS_ME3, cscdqm::h::EMU_PHYSICS_ME4, cscdqm::FIFOFULL_ERR, cscdqm::MonitorObject::Fill(), cscdqm::FORMAT_ERR, cscdqm::Summary::getDetector(), cscdqm::Summary::GetEfficiencyHW(), getEMUHisto(), getParHisto(), cscdqm::MonitorObject::getRefRootObject(), cscdqm::MonitorObject::getTH1(), cscdqm::MonitorObject::getTH1Lock(), cscdqm::AddressMask::hv, cscdqm::INPUTTO_ERR, cscdqm::L1SYNC_ERR, cscdqm::AddressMask::layer, CommonMethods::lock(), cscdqm::Address::mask, cscdqm::Lock::mutex, N_SIDES, N_STATIONS, cscdqm::NODATA_ALCT, cscdqm::NODATA_CFEB, cscdqm::NODATA_CLCT, cscdqm::Detector::NumberOfChambers(), cscdqm::Detector::NumberOfRings(), cscdqm::h::PAR_CSC_SIDEMINUS, cscdqm::h::PAR_CSC_SIDEMINUS_STATION01, cscdqm::h::PAR_CSC_SIDEMINUS_STATION01_RING01, cscdqm::h::PAR_CSC_SIDEMINUS_STATION01_RING02, cscdqm::h::PAR_CSC_SIDEMINUS_STATION01_RING03, cscdqm::h::PAR_CSC_SIDEMINUS_STATION02, cscdqm::h::PAR_CSC_SIDEMINUS_STATION02_RING01, cscdqm::h::PAR_CSC_SIDEMINUS_STATION02_RING02, cscdqm::h::PAR_CSC_SIDEMINUS_STATION03, cscdqm::h::PAR_CSC_SIDEMINUS_STATION03_RING01, cscdqm::h::PAR_CSC_SIDEMINUS_STATION03_RING02, cscdqm::h::PAR_CSC_SIDEMINUS_STATION04, cscdqm::h::PAR_CSC_SIDEMINUS_STATION04_RING01, cscdqm::h::PAR_CSC_SIDEMINUS_STATION04_RING02, cscdqm::h::PAR_CSC_SIDEPLUS, cscdqm::h::PAR_CSC_SIDEPLUS_STATION01, cscdqm::h::PAR_CSC_SIDEPLUS_STATION01_RING01, cscdqm::h::PAR_CSC_SIDEPLUS_STATION01_RING02, cscdqm::h::PAR_CSC_SIDEPLUS_STATION01_RING03, cscdqm::h::PAR_CSC_SIDEPLUS_STATION02, cscdqm::h::PAR_CSC_SIDEPLUS_STATION02_RING01, cscdqm::h::PAR_CSC_SIDEPLUS_STATION02_RING02, cscdqm::h::PAR_CSC_SIDEPLUS_STATION03, cscdqm::h::PAR_CSC_SIDEPLUS_STATION03_RING01, cscdqm::h::PAR_CSC_SIDEPLUS_STATION03_RING02, cscdqm::h::PAR_CSC_SIDEPLUS_STATION04, cscdqm::h::PAR_CSC_SIDEPLUS_STATION04_RING01, cscdqm::h::PAR_CSC_SIDEPLUS_STATION04_RING02, cscdqm::h::PAR_REPORT_SUMMARY, cscdqm::Summary::ReadErrorChambers(), cscdqm::Summary::ReadReportingChambers(), cscdqm::Summary::ReadReportingChambersRef(), cuy::rep, cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::AddressMask::station, cscdqm::Address::station, summary, tmp, cscdqm::Summary::Write(), cscdqm::Summary::WriteMap(), and writeShifterHistograms().

Referenced by cscdqm::EventProcessorMutex::updateFractionAndEfficiencyHistos().

26  {
27 
28  MonitorObject *me = nullptr, *me1 = nullptr;
29 
30  if (config->getNEvents() > 0) {
31 
33 
34  const TH2* rep = dynamic_cast<const TH2*>(me->getTH1());
35 
37  const TObject *tobj = me->getRefRootObject();
38 
42  if (tobj) {
43  const TH2* ref = dynamic_cast<const TH2*>(tobj);
44  summary.ReadReportingChambersRef(rep, ref, config->getEFF_COLD_THRESHOLD(), config->getEFF_COLD_SIGFAIL(), config->getEFF_HOT_THRESHOLD(), config->getEFF_HOT_SIGFAIL());
45  } else {
47  }
48 
50  const TH2* err = dynamic_cast<const TH2*>(me1->getTH1());
51  summary.ReadErrorChambers(rep, err, FORMAT_ERR, config->getEFF_ERR_THRESHOLD(), config->getEFF_ERR_SIGFAIL());
52  }
53 
55  const TH2* err = dynamic_cast<const TH2*>(me1->getTH1());
56  summary.ReadErrorChambers(rep, err, L1SYNC_ERR, config->getEFF_ERR_THRESHOLD(), config->getEFF_ERR_SIGFAIL());
57  }
58 
60  const TH2* err = dynamic_cast<const TH2*>(me1->getTH1());
61  summary.ReadErrorChambers(rep, err, FIFOFULL_ERR, config->getEFF_ERR_THRESHOLD(), config->getEFF_ERR_SIGFAIL());
62  }
63 
65  const TH2* err = dynamic_cast<const TH2*>(me1->getTH1());
66  summary.ReadErrorChambers(rep, err, INPUTTO_ERR, config->getEFF_ERR_THRESHOLD(), config->getEFF_ERR_SIGFAIL());
67  }
68 
69  if (getEMUHisto(h::EMU_CSC_WO_ALCT, me1)) {
70  const TH2* err = dynamic_cast<const TH2*>(me1->getTH1());
71  summary.ReadErrorChambers(rep, err, NODATA_ALCT, config->getEFF_NODATA_THRESHOLD(), config->getEFF_NODATA_SIGFAIL());
72  }
73 
74  if (getEMUHisto(h::EMU_CSC_WO_CLCT, me1)) {
75  const TH2* err = dynamic_cast<const TH2*>(me1->getTH1());
76  summary.ReadErrorChambers(rep, err, NODATA_CLCT, config->getEFF_NODATA_THRESHOLD(), config->getEFF_NODATA_SIGFAIL());
77  }
78 
79  if (getEMUHisto(h::EMU_CSC_WO_CFEB, me1)) {
80  const TH2* err = dynamic_cast<const TH2*>(me1->getTH1());
81  summary.ReadErrorChambers(rep, err, NODATA_CFEB, config->getEFF_NODATA_THRESHOLD(), config->getEFF_NODATA_SIGFAIL());
82  }
83 
85  const TH2* err = dynamic_cast<const TH2*>(me1->getTH1());
86  summary.ReadErrorChambers(rep, err, CFEB_BWORDS, config->getEFF_NODATA_THRESHOLD(), config->getEFF_NODATA_SIGFAIL());
87  }
88 
89  }
90 
92 
98  LockType lock(me->mutex);
99  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
100  summary.Write(tmp, 1);
101  }
102 
104  LockType lock(me->mutex);
105  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
106  summary.Write(tmp, 2);
107  }
108 
110  LockType lock(me->mutex);
111  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
112  summary.Write(tmp, 3);
113  }
114 
116  LockType lock(me->mutex);
117  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
118  summary.Write(tmp, 4);
119  }
120 
121  if (getEMUHisto(h::EMU_PHYSICS_EMU, me)) {
122  LockType lock(me->mutex);
123  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
124  summary.WriteMap(tmp);
125  }
126 
127  }
128 
133  if (config->getPROCESS_EFF_PARAMETERS()) {
134 
135  { // Compute DQM information parameters
136 
137  Address adr;
138  adr.mask.side = adr.mask.station = adr.mask.ring = true;
139  adr.mask.chamber = adr.mask.layer = adr.mask.cfeb = adr.mask.hv = false;
140 
141  double e_detector = 0.0, e_side = 0.0, e_station = 0.0, e_ring = 0.0;
142  uint32_t e_detector_ch = 0, e_side_ch = 0, e_station_ch = 0;
143 
144  const HistoId parameters [] = {
173  };
174 
175  bool calc = (config->getNEvents() > 0);
176 
177  if (!calc) {
178  e_detector = e_side = e_station = e_ring = -1.0;
179  }
180 
181  unsigned int parameter = 0;
182  for (adr.side = 1; adr.side <= N_SIDES; adr.side++) {
183 
184  if (calc) {
185  e_side = 0.0;
186  e_side_ch = 0;
187  }
188 
189  adr.mask.station = true;
190  for (adr.station = 1; adr.station <= N_STATIONS; adr.station++) {
191 
192  if (calc) {
193  e_station = 0.0;
194  e_station_ch = 0;
195  }
196 
197  adr.mask.ring = true;
198  for (adr.ring = 1; adr.ring <= summary.getDetector().NumberOfRings(adr.station); adr.ring++) {
199 
200  if (calc) {
201  e_ring = summary.GetEfficiencyHW(adr);
202  uint32_t ch = summary.getDetector().NumberOfChambers(adr.station, adr.ring);
203  e_station += (e_ring * ch);
204  e_station_ch += ch;
205  }
206 
207  if (summary.getDetector().NumberOfRings(adr.station) > 1) {
208  if (getParHisto(parameters[parameter++], me)) me->Fill(e_ring);
209  }
210 
211  }
212 
213  adr.mask.ring = false;
214  if (calc) {
215  e_side += e_station;
216  e_side_ch += e_station_ch;
217  e_station = e_station / e_station_ch;
218  }
219 
220  if (getParHisto(parameters[parameter++], me)) me->Fill(e_station);
221 
222  }
223 
224  adr.mask.station = false;
225  if (calc) {
226  e_detector += e_side;
227  e_detector_ch += e_side_ch;
228  e_side = e_side / e_side_ch;
229  }
230 
231  if (getParHisto(parameters[parameter++], me)) me->Fill(e_side);
232 
233  }
234 
235  if (calc) {
236  e_detector = e_detector / e_detector_ch;
237  }
238 
239  if (getParHisto(h::PAR_REPORT_SUMMARY, me)) me->Fill(e_detector);
240 
241  }
242 
243  }
244 
245  }
void ReadReportingChambers(const TH2 *&h2, const double threshold=1.0)
Read Reporting Chamber histogram and fill in detector map.
rval mask
Definition: vlib.h:152
void Write(TH2 *&h2, const unsigned int station) const
Write detector map to H1 histogram (linear data) for the selected adr.station.
const unsigned int NumberOfRings(const unsigned int station) const
Returns the number of rings for the given station.
HW element is cold comparing with reference histogram.
Definition: config.py:1
Format errors.
const double GetEfficiencyHW() const
Get efficiency of the whole detector.
unsigned int HistoId
void ReadReportingChambersRef(const TH2 *&h2, const TH2 *&refh2, const double cold_coef=0.1, const double cold_Sfail=5.0, const double hot_coef=2.0, const double hot_Sfail=5.0)
Read Reporting Chamber histogram and fill in detector map based on reference histogram.
const bool getParHisto(const HistoId &histo, MonitorObject *&me)
Get Parameter Monitoring Object.
void WriteMap(TH2 *&h2)
Write PhysicsReady Map to H2 histogram.
const Detector getDetector() const
rep
Definition: cuy.py:1188
#define N_STATIONS
No CFEB data.
DMB Input timeout error.
void ReadErrorChambers(const TH2 *&evs, const TH2 *&err, const HWStatusBit bit, const double eps_max=0.1, const double Sfail=5.0)
Read Error data for Chambers.
L1A out of sync errors.
#define N_SIDES
DMB FIFO full error.
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
No CLCT data.
const unsigned int NumberOfChambers(const unsigned int station, const unsigned int ring) const
Returns the number of chambers for the given station and ring.
const bool getEMUHisto(const HistoId &histo, MonitorObject *&me)
Get EMU (Top Level) Monitoring Object.
No ALCT data.
void cscdqm::EventProcessor::updateFractionHistos ( )

Update Fractional MOs.

Definition at line 26 of file CSCDQM_EventProcessor_updateFracHistos.cc.

References calcEMUFractionHisto(), cscdqm::h::CSC_BINCHECK_DATAFLOW_PROBLEMS_FREQUENCY, cscdqm::h::CSC_BINCHECK_DATAFLOW_PROBLEMS_TABLE, cscdqm::h::CSC_BINCHECK_ERRORS_FREQUENCY, cscdqm::h::CSC_BINCHECK_ERRORSTAT_TABLE, cscdqm::DMB_EVENTS, cscdqm::h::EMU_CSC_DMB_INPUT_FIFO_FULL, cscdqm::h::EMU_CSC_DMB_INPUT_FIFO_FULL_FRACT, cscdqm::h::EMU_CSC_DMB_INPUT_TIMEOUT, cscdqm::h::EMU_CSC_DMB_INPUT_TIMEOUT_FRACT, cscdqm::h::EMU_CSC_FORMAT_ERRORS, cscdqm::h::EMU_CSC_FORMAT_ERRORS_FRACT, cscdqm::h::EMU_CSC_FORMAT_WARNINGS, cscdqm::h::EMU_CSC_FORMAT_WARNINGS_FRACT, cscdqm::h::EMU_CSC_L1A_OUT_OF_SYNC, cscdqm::h::EMU_CSC_L1A_OUT_OF_SYNC_FRACT, cscdqm::h::EMU_CSC_REPORTING, cscdqm::h::EMU_CSC_UNPACKED, cscdqm::h::EMU_CSC_UNPACKED_FRACT, cscdqm::h::EMU_CSC_WO_ALCT, cscdqm::h::EMU_CSC_WO_ALCT_FRACT, cscdqm::h::EMU_CSC_WO_CFEB, cscdqm::h::EMU_CSC_WO_CFEB_FRACT, cscdqm::h::EMU_CSC_WO_CLCT, cscdqm::h::EMU_CSC_WO_CLCT_FRACT, cscdqm::h::EMU_DMB_FORMAT_ERRORS, cscdqm::h::EMU_DMB_FORMAT_ERRORS_FRACT, cscdqm::h::EMU_DMB_FORMAT_WARNINGS, cscdqm::h::EMU_DMB_FORMAT_WARNINGS_FRACT, cscdqm::h::EMU_DMB_INPUT_FIFO_FULL, cscdqm::h::EMU_DMB_INPUT_FIFO_FULL_FRACT, cscdqm::h::EMU_DMB_INPUT_TIMEOUT, cscdqm::h::EMU_DMB_INPUT_TIMEOUT_FRACT, cscdqm::h::EMU_DMB_L1A_OUT_OF_SYNC, cscdqm::h::EMU_DMB_L1A_OUT_OF_SYNC_FRACT, cscdqm::h::EMU_DMB_REPORTING, cscdqm::h::EMU_DMB_UNPACKED, cscdqm::h::EMU_DMB_UNPACKED_FRACT, cscdqm::h::EMU_DMB_WO_ALCT, cscdqm::h::EMU_DMB_WO_ALCT_FRACT, cscdqm::h::EMU_DMB_WO_CFEB, cscdqm::h::EMU_DMB_WO_CFEB_FRACT, cscdqm::h::EMU_DMB_WO_CLCT, cscdqm::h::EMU_DMB_WO_CLCT_FRACT, cscdqm::h::EMU_FED_DDU_L1A_MISMATCH, cscdqm::h::EMU_FED_DDU_L1A_MISMATCH_FRACT, cscdqm::h::EMU_FED_DDU_L1A_MISMATCH_WITH_CSC_DATA, cscdqm::h::EMU_FED_DDU_L1A_MISMATCH_WITH_CSC_DATA_FRACT, cscdqm::h::EMU_FED_ENTRIES, getCSCHisto(), cscdqm::MonitorObject::getTH1(), CommonMethods::lock(), and cscdqm::MonitorObject::SetEntries().

Referenced by cscdqm::EventProcessorMutex::updateFractionAndEfficiencyHistos().

26  {
27 
48 
49  unsigned int iter = 0, crateId = 0, dmbId = 0;
50  MonitorObject *mo = nullptr, *mof = nullptr;
51  while (config->fnNextBookedCSC(iter, crateId, dmbId)) {
52 
53  uint32_t dmbEvents = config->getChamberCounterValue(DMB_EVENTS, crateId, dmbId);
54 
55  if (getCSCHisto(h::CSC_BINCHECK_DATAFLOW_PROBLEMS_TABLE, crateId, dmbId, mo) &&
57 
58  LockType lock(mof->mutex);
59  TH1* th = mof->getTH1Lock();
60  th->Reset();
61  th->Add(mo->getTH1());
62  th->Scale(1. / dmbEvents);
63  mof->SetMaximum(1.);
64  mof->SetEntries(dmbEvents);
65  mo->SetEntries(dmbEvents);
66  }
67 
68  if (getCSCHisto(h::CSC_BINCHECK_ERRORSTAT_TABLE, crateId, dmbId, mo) &&
69  getCSCHisto(h::CSC_BINCHECK_ERRORS_FREQUENCY, crateId, dmbId, mof)) {
70  LockType lock(mof->mutex);
71  TH1* th = mof->getTH1Lock();
72  th->Reset();
73  th->Add(mo->getTH1());
74  th->Scale(1. / dmbEvents);
75  mof->SetMaximum(1.);
76  mof->SetEntries(dmbEvents);
77  mo->SetEntries(dmbEvents);
78  }
79 
80  }
81 
82  }
Definition: config.py:1
const bool getCSCHisto(const HistoId &histo, const HwId &crateID, const HwId &dmbSlot, MonitorObject *&me)
Get CSC (Chamber) Level Monitoring Object.
void calcEMUFractionHisto(const HistoId &result, const HistoId &set, const HistoId &subset)
Calculate fractional histogram.
void cscdqm::EventProcessor::writeShifterHistograms ( )

Definition at line 247 of file CSCDQM_EventProcessor_updateEffHistos.cc.

References cscdqm::h::EMU_CSC_STATS_CFEB_BWORDS, cscdqm::h::EMU_CSC_STATS_FIFOFULL_ERR, cscdqm::h::EMU_CSC_STATS_FORMAT_ERR, cscdqm::h::EMU_CSC_STATS_INPUTTO_ERR, cscdqm::h::EMU_CSC_STATS_L1SYNC_ERR, cscdqm::h::EMU_CSC_STATS_OCCUPANCY, cscdqm::h::EMU_CSC_STATS_SUMMARY, cscdqm::h::EMU_CSC_STATS_WO_ALCT, cscdqm::h::EMU_CSC_STATS_WO_CFEB, cscdqm::h::EMU_CSC_STATS_WO_CLCT, getEMUHisto(), cscdqm::MonitorObject::getTH1Lock(), HWSTATUSERRORBITS, CommonMethods::lock(), cscdqm::Lock::mutex, summary, tmp, cscdqm::Summary::WriteChamberState(), globals_cff::x1, and globals_cff::x2.

Referenced by cscdqm::EventProcessorMutex::processStandby(), and updateEfficiencyHistos().

247  {
248 
249  MonitorObject *me = nullptr;
250 
251  //const int COLOR_WHITE = 0;
252  const int COLOR_GREEN = 1;
253  const int COLOR_RED = 2;
254  const int COLOR_BLUE = 3;
255  const int COLOR_GREY = 4;
256  const int COLOR_STANDBY = 5;
257 
259  LockType lock(me->mutex);
260  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
261  if (!config->getIN_FULL_STANDBY()) {
262  summary.WriteChamberState(tmp, 0x1, COLOR_GREEN, true, false);
263  summary.WriteChamberState(tmp, HWSTATUSERRORBITS, COLOR_RED, false, true);
264  }
265  summary.WriteChamberState(tmp, 0x1000, COLOR_STANDBY, false);
266  summary.WriteChamberState(tmp, 0x2, COLOR_GREY, false);
267  }
268 
270  LockType lock(me->mutex);
271  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
272  if (!config->getIN_FULL_STANDBY()) {
273  summary.WriteChamberState(tmp, 0x4, COLOR_RED, true, false);
274  summary.WriteChamberState(tmp, 0x8, COLOR_BLUE, false, false);
275  }
276  summary.WriteChamberState(tmp, 0x1000, COLOR_STANDBY, false);
277  summary.WriteChamberState(tmp, 0x2, COLOR_GREY, false, false);
278  }
279 
281  LockType lock(me->mutex);
282  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
283  if (!config->getIN_FULL_STANDBY()) {
284  summary.WriteChamberState(tmp, 0x10, COLOR_RED, true, false);
285  }
286  summary.WriteChamberState(tmp, 0x1000, COLOR_STANDBY, false);
287  summary.WriteChamberState(tmp, 0x2, COLOR_GREY, false, false);
288  }
289 
291  LockType lock(me->mutex);
292  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
293  if (!config->getIN_FULL_STANDBY()) {
294  summary.WriteChamberState(tmp, 0x20, COLOR_RED, true, false);
295  }
296  summary.WriteChamberState(tmp, 0x1000, COLOR_STANDBY, false);
297  summary.WriteChamberState(tmp, 0x2, COLOR_GREY, false, false);
298  }
299 
301  LockType lock(me->mutex);
302  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
303  if (!config->getIN_FULL_STANDBY()) {
304  summary.WriteChamberState(tmp, 0x40, COLOR_RED, true, false);
305  }
306  summary.WriteChamberState(tmp, 0x1000, COLOR_STANDBY, false);
307  summary.WriteChamberState(tmp, 0x2, COLOR_GREY, false, false);
308  }
309 
311  LockType lock(me->mutex);
312  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
313  if (!config->getIN_FULL_STANDBY()) {
314  summary.WriteChamberState(tmp, 0x80, COLOR_RED, true, false);
315  }
316  summary.WriteChamberState(tmp, 0x1000, COLOR_STANDBY, false);
317  summary.WriteChamberState(tmp, 0x2, COLOR_GREY, false, false);
318  }
319 
321  LockType lock(me->mutex);
322  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
323  if (!config->getIN_FULL_STANDBY()) {
324  summary.WriteChamberState(tmp, 0x100, COLOR_RED, true, false);
325  }
326  summary.WriteChamberState(tmp, 0x1000, COLOR_STANDBY, false);
327  summary.WriteChamberState(tmp, 0x2, COLOR_GREY, false, false);
328  }
329 
331  LockType lock(me->mutex);
332  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
333  if (!config->getIN_FULL_STANDBY()) {
334  summary.WriteChamberState(tmp, 0x200, COLOR_RED, true, false);
335  }
336  summary.WriteChamberState(tmp, 0x1000, COLOR_STANDBY, false);
337  summary.WriteChamberState(tmp, 0x2, COLOR_GREY, false, false);
338  }
339 
341  LockType lock(me->mutex);
342  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
343  if (!config->getIN_FULL_STANDBY()) {
344  summary.WriteChamberState(tmp, 0x400, COLOR_RED, true, false);
345  }
346  summary.WriteChamberState(tmp, 0x1000, COLOR_STANDBY, false);
347  summary.WriteChamberState(tmp, 0x2, COLOR_GREY, false, false);
348  }
349 
351  LockType lock(me->mutex);
352  TH2* tmp = dynamic_cast<TH2*>(me->getTH1Lock());
353  if (!config->getIN_FULL_STANDBY()) {
354  summary.WriteChamberState(tmp, 0x800, COLOR_RED, true, false);
355  }
356  summary.WriteChamberState(tmp, 0x1000, COLOR_STANDBY, false);
357  summary.WriteChamberState(tmp, 0x2, COLOR_GREY, false, false);
358  }
359 
360  }
#define HWSTATUSERRORBITS
Definition: config.py:1
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void WriteChamberState(TH2 *&h2, const int mask, const int value=1, const bool reset=true, const bool op_any=false) const
Write State information to chamber histogram.
const bool getEMUHisto(const HistoId &histo, MonitorObject *&me)
Get EMU (Top Level) Monitoring Object.

Member Data Documentation

uint32_t cscdqm::EventProcessor::BXN
private

Definition at line 173 of file CSCDQM_EventProcessor.h.

Referenced by processCSC(), and processDDU().

uint32_t cscdqm::EventProcessor::cntALCTs
private

Total Number of CFEBs per event from DMB DAV.

Definition at line 176 of file CSCDQM_EventProcessor.h.

Referenced by preProcessEvent(), and processExaminer().

uint32_t cscdqm::EventProcessor::cntCFEBs
private

Total Number of DMBs per event from DDU Header DAV.

Definition at line 175 of file CSCDQM_EventProcessor.h.

Referenced by preProcessEvent(), and processExaminer().

uint32_t cscdqm::EventProcessor::cntDMBs
private

Definition at line 174 of file CSCDQM_EventProcessor.h.

Referenced by preProcessEvent(), and processExaminer().

uint32_t cscdqm::EventProcessor::cntTMBs
private

Total Number of ALCTs per event from DMB DAV.

Definition at line 177 of file CSCDQM_EventProcessor.h.

Referenced by preProcessEvent(), and processExaminer().

Configuration* cscdqm::EventProcessor::config
private

Pointer to Global Configuration

Definition at line 165 of file CSCDQM_EventProcessor.h.

bool cscdqm::EventProcessor::EmuEventDisplayWasReset
private

Definition at line 185 of file CSCDQM_EventProcessor.h.

Referenced by preProcessEvent(), and resetEmuEventDisplays().

bool cscdqm::EventProcessor::fCloseL1As
private

Data Format version (2005, 2013)

Definition at line 184 of file CSCDQM_EventProcessor.h.

Referenced by EventProcessor(), processCSC(), and processDDU().

std::map<uint32_t, bool> cscdqm::EventProcessor::fNotFirstEvent
private

Definition at line 171 of file CSCDQM_EventProcessor.h.

Referenced by processDDU().

edm::EDGetTokenT<FEDRawDataCollection> cscdqm::EventProcessor::frdtoken
private

Definition at line 188 of file CSCDQM_EventProcessor.h.

Referenced by EventProcessor(), and preProcessEvent().

uint32_t cscdqm::EventProcessor::L1ANumber
private

Definition at line 172 of file CSCDQM_EventProcessor.h.

Referenced by processCSC(), and processDDU().

std::map<uint32_t, uint32_t> cscdqm::EventProcessor::L1ANumbers
private

Definition at line 170 of file CSCDQM_EventProcessor.h.

Referenced by processDDU().

Summary cscdqm::EventProcessor::summary
private

Detector efficiency manipulation object

Definition at line 168 of file CSCDQM_EventProcessor.h.

Referenced by maskHWElements(), processCSC(), standbyEfficiencyHistos(), updateEfficiencyHistos(), and writeShifterHistograms().

uint16_t cscdqm::EventProcessor::theFormatVersion
private

Total Number of TMBs per event from DMB DAV.

Definition at line 180 of file CSCDQM_EventProcessor.h.

Referenced by processCSC().