|
|
Go to the documentation of this file.
97 desc.add<Int_t>(
"AMCSlots", 13);
100 descriptions.
add(
"GEMDAQStatusSource",
desc);
104 unsigned int unBinPos = 1;
106 h2Status->
setBinLabel(unBinPos++,
"BC0 not locked", 2);
107 h2Status->
setBinLabel(unBinPos++,
"DAQ not ready", 2);
108 h2Status->
setBinLabel(unBinPos++,
"DAQ clock not locked", 2);
109 h2Status->
setBinLabel(unBinPos++,
"MMCM not locked", 2);
110 h2Status->
setBinLabel(unBinPos++,
"Back pressure", 2);
111 h2Status->
setBinLabel(unBinPos++,
"GLIB out-of-sync", 2);
115 unsigned int unBinPos = 1;
117 h2Status->
setBinLabel(unBinPos++,
"BX mismatch GLIB OH", 2);
118 h2Status->
setBinLabel(unBinPos++,
"BX mismatch GLIB VFAT", 2);
119 h2Status->
setBinLabel(unBinPos++,
"OOS GLIB OH", 2);
120 h2Status->
setBinLabel(unBinPos++,
"OOS GLIB VFAT", 2);
121 h2Status->
setBinLabel(unBinPos++,
"No VFAT marker", 2);
122 h2Status->
setBinLabel(unBinPos++,
"Event size warn", 2);
123 h2Status->
setBinLabel(unBinPos++,
"L1AFIFO near full", 2);
124 h2Status->
setBinLabel(unBinPos++,
"InFIFO near full", 2);
125 h2Status->
setBinLabel(unBinPos++,
"EvtFIFO near full", 2);
126 h2Status->
setBinLabel(unBinPos++,
"Event size overflow", 2);
127 h2Status->
setBinLabel(unBinPos++,
"L1AFIFO full", 2);
128 h2Status->
setBinLabel(unBinPos++,
"InFIFO full", 2);
129 h2Status->
setBinLabel(unBinPos++,
"EvtFIFO full", 2);
130 h2Status->
setBinLabel(unBinPos++,
"Input FIFO underflow", 2);
131 h2Status->
setBinLabel(unBinPos++,
"Stuck data", 2);
132 h2Status->
setBinLabel(unBinPos++,
"Event FIFO underflow", 2);
136 unsigned int unBinPos = 1;
139 h2Status->
setBinLabel(unBinPos++,
"b1010 fail", 2);
140 h2Status->
setBinLabel(unBinPos++,
"b1100 fail", 2);
141 h2Status->
setBinLabel(unBinPos++,
"b1110 fail", 2);
142 h2Status->
setBinLabel(unBinPos++,
"Hamming error", 2);
164 "Status of AMC slots (positive region);AMC slot;",
172 "Status of AMC slots (negative region);AMC slot;",
180 "Number of GEBs in AMCs (positive region);AMC slot;Number of GEBs",
188 "Number of GEBs in AMCs (negative region);AMC slot;Number of GEBs",
205 "Number of VFATs in GEBs",
262 event.getByToken(
tagDigi_, gemDigis);
263 event.getByToken(
tagVFAT_, gemVFAT);
264 event.getByToken(
tagGEB_, gemGEB);
265 event.getByToken(
tagAMC_, gemAMC);
268 std::vector<int> listAMCRegion;
288 if (nIdxAMCFull >= (
int)listAMCRegion.size()) {
293 if (listAMCRegion[nIdxAMCFull] > 0) {
302 if (!
amc->bc0locked()) {
303 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
307 if (!
amc->daqReady()) {
308 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
312 if (!
amc->daqClockLocked()) {
313 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
317 if (!
amc->mmcmLocked()) {
318 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
322 if (
amc->backPressure()) {
323 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
327 if (
amc->oosGlib()) {
328 h2AMCStatus->
Fill(
amc->amcNum(), unBit);
332 h2AMCStatus->
Fill(
amc->amcNum(), 1);
334 h2AMCNumGEB->
Fill(
amc->amcNum(),
amc->gebs()->size());
341 std::map<ME4IdsKey, bool> mapChamberStatus;
349 for (
auto GEBStatus =
range.first; GEBStatus !=
range.second; ++GEBStatus) {
353 unStatus |= (GEBStatus->bxmVvV() << unBit++);
354 unStatus |= (GEBStatus->bxmAvV() << unBit++);
355 unStatus |= (GEBStatus->oOScVvV() << unBit++);
356 unStatus |= (GEBStatus->oOScAvV() << unBit++);
357 unStatus |= (GEBStatus->noVFAT() << unBit++);
358 unStatus |= (GEBStatus->evtSzW() << unBit++);
359 unStatus |= (GEBStatus->l1aNF() << unBit++);
360 unStatus |= (GEBStatus->inNF() << unBit++);
361 unStatus |= (GEBStatus->evtNF() << unBit++);
362 unStatus |= (GEBStatus->evtSzOFW() << unBit++);
363 unStatus |= (GEBStatus->l1aF() << unBit++);
364 unStatus |= (GEBStatus->inF() << unBit++);
365 unStatus |= (GEBStatus->evtF() << unBit++);
366 unStatus |= (GEBStatus->inUfw() << unBit++);
367 unStatus |= (GEBStatus->stuckData() << unBit++);
368 unStatus |= (GEBStatus->evUfw() << unBit++);
373 mapChamberStatus[key4] =
false;
388 for (
auto vfatStat =
range.first; vfatStat !=
range.second; ++vfatStat) {
389 uint64_t unQFVFAT = vfatStat->quality();
390 if ((unQFVFAT & ~0
x1) == 0) {
393 mapChamberStatus[key4Ch] =
false;
403 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)
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)
constexpr int roll() const
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
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
MonitorElement * h2AMCStatusNeg_
int bookND(BookingHelper &bh, K key)
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)