|
|
Go to the documentation of this file.
98 desc.add<Int_t>(
"AMCSlots", 13);
101 descriptions.
add(
"GEMDAQStatusSource",
desc);
105 unsigned int unBinPos = 1;
107 h2Status->
setBinLabel(unBinPos++,
"BC0 not locked", 2);
108 h2Status->
setBinLabel(unBinPos++,
"DAQ not ready", 2);
109 h2Status->
setBinLabel(unBinPos++,
"DAQ clock not locked", 2);
110 h2Status->
setBinLabel(unBinPos++,
"MMCM not locked", 2);
111 h2Status->
setBinLabel(unBinPos++,
"Back pressure", 2);
112 h2Status->
setBinLabel(unBinPos++,
"GLIB out-of-sync", 2);
116 unsigned int unBinPos = 1;
118 h2Status->
setBinLabel(unBinPos++,
"BX mismatch GLIB OH", 2);
119 h2Status->
setBinLabel(unBinPos++,
"BX mismatch GLIB VFAT", 2);
120 h2Status->
setBinLabel(unBinPos++,
"OOS GLIB OH", 2);
121 h2Status->
setBinLabel(unBinPos++,
"OOS GLIB VFAT", 2);
122 h2Status->
setBinLabel(unBinPos++,
"No VFAT marker", 2);
123 h2Status->
setBinLabel(unBinPos++,
"Event size warn", 2);
124 h2Status->
setBinLabel(unBinPos++,
"L1AFIFO near full", 2);
125 h2Status->
setBinLabel(unBinPos++,
"InFIFO near full", 2);
126 h2Status->
setBinLabel(unBinPos++,
"EvtFIFO near full", 2);
127 h2Status->
setBinLabel(unBinPos++,
"Event size overflow", 2);
128 h2Status->
setBinLabel(unBinPos++,
"L1AFIFO full", 2);
129 h2Status->
setBinLabel(unBinPos++,
"InFIFO full", 2);
130 h2Status->
setBinLabel(unBinPos++,
"EvtFIFO full", 2);
131 h2Status->
setBinLabel(unBinPos++,
"Input FIFO underflow", 2);
132 h2Status->
setBinLabel(unBinPos++,
"Stuck data", 2);
133 h2Status->
setBinLabel(unBinPos++,
"Event FIFO underflow", 2);
137 unsigned int unBinPos = 1;
140 h2Status->
setBinLabel(unBinPos++,
"b1010 fail", 2);
141 h2Status->
setBinLabel(unBinPos++,
"b1100 fail", 2);
142 h2Status->
setBinLabel(unBinPos++,
"b1110 fail", 2);
143 h2Status->
setBinLabel(unBinPos++,
"Hamming error", 2);
165 "Status of AMC slots (positive region);AMC slot;",
173 "Status of AMC slots (negative region);AMC slot;",
181 "Number of GEBs in AMCs (positive region);AMC slot;Number of GEBs",
189 "Number of GEBs in AMCs (negative region);AMC slot;Number of GEBs",
206 "Number of VFATs in GEBs",
215 this,
"vfat_statusSum",
"Summary on VFAT Quality Status", 36, 0.5, 36.5, 24, 0.5, 24.5,
"Chamber",
"VFAT");
271 event.getByToken(
tagDigi_, gemDigis);
272 event.getByToken(
tagVFAT_, gemVFAT);
273 event.getByToken(
tagGEB_, gemGEB);
274 event.getByToken(
tagAMC_, gemAMC);
277 std::vector<int> listAMCRegion;
297 if (nIdxAMCFull >= (
int)listAMCRegion.size()) {
302 if (listAMCRegion[nIdxAMCFull] > 0) {
311 if (!
amc->bc0locked()) {
312 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
316 if (!
amc->daqReady()) {
317 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
321 if (!
amc->daqClockLocked()) {
322 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
326 if (!
amc->mmcmLocked()) {
327 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
331 if (
amc->backPressure()) {
332 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
336 if (
amc->oosGlib()) {
337 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
341 h2AMCStatus->
Fill(
amc->amcNum(), 1);
343 h2AMCNumGEB->
Fill(
amc->amcNum(),
amc->gebs()->size());
350 std::map<ME4IdsKey, bool> mapChamberStatus;
358 for (
auto GEBStatus =
range.first; GEBStatus !=
range.second; ++GEBStatus) {
362 unStatus |= (GEBStatus->bxmVvV() << unBit++);
363 unStatus |= (GEBStatus->bxmAvV() << unBit++);
364 unStatus |= (GEBStatus->oOScVvV() << unBit++);
365 unStatus |= (GEBStatus->oOScAvV() << unBit++);
366 unStatus |= (GEBStatus->noVFAT() << unBit++);
367 unStatus |= (GEBStatus->evtSzW() << unBit++);
368 unStatus |= (GEBStatus->l1aNF() << unBit++);
369 unStatus |= (GEBStatus->inNF() << unBit++);
370 unStatus |= (GEBStatus->evtNF() << unBit++);
371 unStatus |= (GEBStatus->evtSzOFW() << unBit++);
372 unStatus |= (GEBStatus->l1aF() << unBit++);
373 unStatus |= (GEBStatus->inF() << unBit++);
374 unStatus |= (GEBStatus->evtF() << unBit++);
375 unStatus |= (GEBStatus->inUfw() << unBit++);
376 unStatus |= (GEBStatus->stuckData() << unBit++);
377 unStatus |= (GEBStatus->evUfw() << unBit++);
382 mapChamberStatus[key4] =
false;
397 for (
auto vfatStat =
range.first; vfatStat !=
range.second; ++vfatStat) {
400 uint64_t unQFVFAT = vfatStat->quality();
401 if ((unQFVFAT & ~0
x1) == 0) {
404 mapChamberStatus[key4Ch] =
false;
414 for (
auto const &[key4, bErr] : mapChamberStatus) {
void SetBinConfX(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key) override
GEMDAQStatusSource(const edm::ParameterSet &cfg)
constexpr int layer() const
constexpr int region() const
const GEMGeometry * GEMGeometry_
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
virtual void setCurrentFolder(std::string const &fullpath)
void SetLabelAMCStatus(MonitorElement *h2Status)
MEMap3Inf mapStatusVFATPerLayer_
int Fill(K key, Double_t x)
ME3IdsKey key4Tokey3(ME4IdsKey key)
int keyToChamber(ME4IdsKey key)
int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin=-1)
void SetLabelVFATStatus(MonitorElement *h2Status)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~GEMDAQStatusSource() override
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void SetLabelGEBStatus(MonitorElement *h2Status)
int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) override
DigiRangeIterator end() const
DigiRangeIterator begin() const
dqm::impl::MonitorElement * CreateSummaryHist(DQMStore::IBooker &ibooker, TString strName)
constexpr int chamber() const
int initGeometry(edm::EventSetup const &iSetup)
MEMapInfT< MEMap4Ids, ME4IdsKey > MEMap4Inf
int getVFATNumber(const int, const int, const int)
MonitorElement * h2AMCNumGEBNeg_
int FillBits(K key, Double_t x, UInt_t bits)
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MEMap4Inf mapStatusVFATPerCh_
Log< level::Error, false > LogError
edm::EDGetToken tagAMC13_
MonitorElement * h2AMCStatusPos_
MonitorElement * h2AMCNumGEBPos_
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
std::string log_category_
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
MonitorElement * h2SummaryStatus
void SetBinConfY(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
dqm::impl::MonitorElement * FindHist(K key)
std::map< UInt_t, int > mapFEDIdToRe_
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
std::pair< const_iterator, const_iterator > Range
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
std::map< ME3IdsKey, int > mapStationToIdx_
unsigned long long uint64_t
constexpr int station() const
constexpr int ieta() const
MonitorElement * h2AMCStatusNeg_
int bookND(BookingHelper &bh, K key)
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)