CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
GEMDAQStatusSource Class Reference

#include <GEMDAQStatusSource.h>

Inheritance diagram for GEMDAQStatusSource:
GEMDQMBase DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 GEMDAQStatusSource (const edm::ParameterSet &cfg)
 
 ~GEMDAQStatusSource () override
 
- Public Member Functions inherited from GEMDQMBase
 GEMDQMBase (const edm::ParameterSet &cfg)
 
 ~GEMDQMBase () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (edm::ParameterSet const &)
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
void FillStatusSummaryPlot (std::map< ME4IdsKey, bool > &mapChamber, MonitorElement *h2Plot, std::map< ME4IdsKey, bool > *pmapSummary=nullptr)
 
void FillWithRiseErr (MonitorElement *h, Int_t nX, Int_t nY, Bool_t &bErr)
 
void LoadROMap (edm::EventSetup const &iSetup)
 
- Protected Member Functions inherited from GEMDQMBase
template<typename T >
bool checkRefs (const std::vector< T * > &)
 
dqm::impl::MonitorElementCreateSummaryHist (DQMStore::IBooker &ibooker, TString strName)
 
int GenerateMEPerChamber (DQMStore::IBooker &ibooker)
 
int getDetOccXBin (const int, const int, const int)
 
int getIEtaFromVFAT (const int station, const int vfat)
 
int getIEtaFromVFATGE11 (const int vfat)
 
int getMaxVFAT (const int)
 
int getNumEtaPartitions (const GEMStation *)
 
int getVFATNumber (const int, const int, const int)
 
int getVFATNumberByDigi (const int, const int, const int)
 
int getVFATNumberGE11 (const int, const int, const int)
 
int initGeometry (edm::EventSetup const &iSetup)
 
ME2IdsKey key3Tokey2 (ME3IdsKey key)
 
ME3IdsKey key4Tokey3 (ME4IdsKey key)
 
int keyToChamber (ME4IdsKey key)
 
int keyToIEta (ME3IdsKey key)
 
int keyToIEta (ME4IdsKey key)
 
int keyToLayer (ME3IdsKey key)
 
int keyToLayer (ME4IdsKey key)
 
int keyToRegion (ME2IdsKey key)
 
int keyToRegion (ME3IdsKey key)
 
int keyToRegion (ME4IdsKey key)
 
int keyToStation (ME2IdsKey key)
 
int keyToStation (ME3IdsKey key)
 
int keyToStation (ME4IdsKey key)
 
int loadChambers ()
 
virtual int ProcessWithMEMap2 (BookingHelper &bh, ME2IdsKey key)
 
virtual int ProcessWithMEMap2AbsReWithEta (BookingHelper &bh, ME3IdsKey key)
 
virtual int ProcessWithMEMap2WithEta (BookingHelper &bh, ME3IdsKey key)
 
virtual int ProcessWithMEMap4 (BookingHelper &bh, ME4IdsKey key)
 
Float_t restrictAngle (const Float_t fTheta, const Float_t fStart)
 
int SortingLayers (std::vector< ME3IdsKey > &listLayers)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

int ProcessWithMEMap3 (BookingHelper &bh, ME3IdsKey key) override
 
int ProcessWithMEMap3WithChamber (BookingHelper &bh, ME4IdsKey key) override
 
void SetLabelAMC13Status (MonitorElement *h2Status)
 
void SetLabelAMCStatus (MonitorElement *h2Status)
 
void SetLabelOHStatus (MonitorElement *h2Status)
 
void SetLabelVFATStatus (MonitorElement *h2Status)
 

Private Attributes

const GEMeMapgemEMap_
 
edm::ESGetToken< GEMeMap,
GEMeMapRcd
gemEMapToken_
 
MonitorElementh2AMC13Status_
 
MonitorElementh2AMCStatusNeg_
 
MonitorElementh2AMCStatusPos_
 
MonitorElementh2SummaryStatusAll
 
MonitorElementh2SummaryStatusAMC13Error
 
MonitorElementh2SummaryStatusAMCError
 
MonitorElementh2SummaryStatusAMCWarning
 
MonitorElementh2SummaryStatusError
 
MonitorElementh2SummaryStatusOHError
 
MonitorElementh2SummaryStatusOHWarning
 
MonitorElementh2SummaryStatusVFATError
 
MonitorElementh2SummaryStatusVFATWarning
 
MonitorElementh2SummaryStatusWarning
 
std::map< int, std::vector
< GEMDetId > > 
mapAMC13ToListChamber_
 
std::map< std::tuple< int, int >
, std::vector< GEMDetId > > 
mapAMCToListChamber_
 
std::map< UInt_t, int > mapFEDIdToRe_
 
MEMap3Inf mapStatusErrVFATPerLayer_
 
MEMap3Inf mapStatusOH_
 
MEMap3Inf mapStatusVFAT_
 
MEMap4Inf mapStatusVFATPerCh_
 
MEMap3Inf mapStatusWarnVFATPerLayer_
 
Int_t nAMCSlots_
 
int nBitAMC13_ = 10
 
int nBitAMC_ = 12
 
int nBitOH_ = 17
 
int nBitVFAT_ = 7
 
Int_t nBXMax_
 
Int_t nBXMin_
 
edm::EDGetToken tagAMC13_
 
edm::EDGetToken tagAMC_
 
edm::EDGetToken tagOH_
 
edm::EDGetToken tagVFAT_
 

Additional Inherited Members

- Public Types inherited from GEMDQMBase
typedef MEMapInfT< MEMap2Ids,
ME2IdsKey
MEMap2Inf
 
typedef MEMapInfT< MEMap3Ids,
ME3IdsKey
MEMap3Inf
 
typedef MEMapInfT< MEMap4Ids,
ME4IdsKey
MEMap4Inf
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Public Attributes inherited from GEMDQMBase
std::string log_category_
 
- Protected Attributes inherited from GEMDQMBase
std::vector< GEMChambergemChambers_
 
const GEMGeometryGEMGeometry_
 
edm::ESGetToken< GEMGeometry,
MuonGeometryRecord
geomToken_
 
std::map< ME3IdsKey,
MEStationInfo
mapStationInfo_
 
std::map< ME3IdsKey, int > mapStationToIdx_
 
std::map< ME3IdsKey, bool > MEMap2AbsReWithEtaCheck_
 
std::map< ME2IdsKey, bool > MEMap2Check_
 
std::map< ME3IdsKey, bool > MEMap2WithEtaCheck_
 
std::map< ME3IdsKey, bool > MEMap3Check_
 
std::map< ME4IdsKey, bool > MEMap3WithChCheck_
 
std::map< ME4IdsKey, bool > MEMap4Check_
 
int nMaxNumCh_
 
Int_t nNumEtaPartitionGE0_
 
Int_t nNumEtaPartitionGE11_
 
Int_t nNumEtaPartitionGE21_
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 34 of file GEMDAQStatusSource.h.

Constructor & Destructor Documentation

GEMDAQStatusSource::GEMDAQStatusSource ( const edm::ParameterSet cfg)
explicit

Definition at line 6 of file GEMDAQStatusSource.cc.

References gemEMapToken_, edm::ParameterSet::getParameter(), nAMCSlots_, tagAMC13_, tagAMC_, tagOH_, and tagVFAT_.

6  : GEMDQMBase(cfg) {
7  tagVFAT_ = consumes<GEMVFATStatusCollection>(cfg.getParameter<edm::InputTag>("VFATInputLabel"));
8  tagOH_ = consumes<GEMOHStatusCollection>(cfg.getParameter<edm::InputTag>("OHInputLabel"));
9  tagAMC_ = consumes<GEMAMCStatusCollection>(cfg.getParameter<edm::InputTag>("AMCInputLabel"));
10  tagAMC13_ = consumes<GEMAMC13StatusCollection>(cfg.getParameter<edm::InputTag>("AMC13InputLabel"));
11 
12  nAMCSlots_ = cfg.getParameter<Int_t>("AMCSlots");
13  gemEMapToken_ = esConsumes<GEMeMap, GEMeMapRcd, edm::Transition::BeginRun>();
14 }
edm::EDGetToken tagAMC13_
edm::ESGetToken< GEMeMap, GEMeMapRcd > gemEMapToken_
edm::EDGetToken tagVFAT_
edm::EDGetToken tagOH_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
GEMDQMBase(const edm::ParameterSet &cfg)
Definition: GEMDQMBase.cc:7
edm::EDGetToken tagAMC_
GEMDAQStatusSource::~GEMDAQStatusSource ( )
inlineoverride

Definition at line 37 of file GEMDAQStatusSource.h.

37 {};

Member Function Documentation

void GEMDAQStatusSource::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 248 of file GEMDAQStatusSource.cc.

References amc, GEMDetId::chamber(), l1tstage2_dqm_sourceclient-live_cfg::fedId, dqm::impl::MonitorElement::Fill(), GEMDQMBase::MEMapInfT< M, K >::Fill(), FillStatusSummaryPlot(), FillWithRiseErr(), GEMDQMBase::getVFATNumber(), h2AMC13Status_, h2AMCStatusNeg_, h2AMCStatusPos_, h2SummaryStatusAll, h2SummaryStatusAMC13Error, h2SummaryStatusAMCError, h2SummaryStatusAMCWarning, h2SummaryStatusError, h2SummaryStatusOHError, h2SummaryStatusOHWarning, h2SummaryStatusVFATError, h2SummaryStatusVFATWarning, h2SummaryStatusWarning, GEMDetId::ieta(), GEMDQMBase::key4Tokey3(), GEMDQMBase::keyToChamber(), GEMDetId::layer(), GEMDQMBase::log_category_, mapAMC13ToListChamber_, mapAMCToListChamber_, mapFEDIdToRe_, GEMDQMBase::mapStationToIdx_, mapStatusErrVFATPerLayer_, mapStatusOH_, mapStatusVFAT_, mapStatusVFATPerCh_, mapStatusWarnVFATPerLayer_, sistrip::SpyUtilities::range(), GEMDetId::region(), GEMDetId::station(), tagAMC13_, tagAMC_, tagOH_, and tagVFAT_.

248  {
253 
254  event.getByToken(tagVFAT_, gemVFAT);
255  event.getByToken(tagOH_, gemOH);
256  event.getByToken(tagAMC_, gemAMC);
257  event.getByToken(tagAMC13_, gemAMC13);
258 
259  std::map<ME4IdsKey, bool> mapChamberAll;
260  std::map<ME4IdsKey, bool> mapChamberWarning;
261  std::map<ME4IdsKey, bool> mapChamberError;
262  std::map<ME4IdsKey, bool> mapChamberVFATWarning;
263  std::map<ME4IdsKey, bool> mapChamberVFATError;
264  std::map<ME4IdsKey, bool> mapChamberOHWarning;
265  std::map<ME4IdsKey, bool> mapChamberOHError;
266  std::map<ME4IdsKey, bool> mapChamberAMCWarning;
267  std::map<ME4IdsKey, bool> mapChamberAMCError;
268  std::map<ME4IdsKey, bool> mapChamberAMC13Error;
269 
270  for (auto amc13It = gemAMC13->begin(); amc13It != gemAMC13->end(); ++amc13It) {
271  int fedId = (*amc13It).first;
272  if (mapFEDIdToRe_.find(fedId) == mapFEDIdToRe_.end())
273  continue;
274  int nXBin = 0;
275  if (mapFEDIdToRe_[fedId] < 0) {
276  nXBin = 1;
277  } else if (mapFEDIdToRe_[fedId] > 0) {
278  nXBin = 2;
279  } else {
280  edm::LogError(log_category_) << "+++ Error : Unknown FED Id +++\n" << std::endl;
281  continue;
282  }
283 
284  const auto &range = (*amc13It).second;
285  for (auto amc13 = range.first; amc13 != range.second; ++amc13) {
286  Bool_t bWarn = false;
287  Bool_t bErr = false;
288 
289  GEMAMC13Status::Warnings warnings{amc13->warnings()};
290  if (warnings.InValidAMC)
291  FillWithRiseErr(h2AMC13Status_, nXBin, 2, bWarn);
292 
293  GEMAMC13Status::Errors errors{amc13->errors()};
294  if (errors.InValidSize)
295  FillWithRiseErr(h2AMC13Status_, nXBin, 3, bErr);
296  if (errors.failTrailerCheck)
297  FillWithRiseErr(h2AMC13Status_, nXBin, 4, bErr);
298  if (errors.failFragmentLength)
299  FillWithRiseErr(h2AMC13Status_, nXBin, 5, bErr);
300  if (errors.failTrailerMatch)
301  FillWithRiseErr(h2AMC13Status_, nXBin, 6, bErr);
302  if (errors.moreTrailers)
303  FillWithRiseErr(h2AMC13Status_, nXBin, 7, bErr);
304  if (errors.crcModified)
305  FillWithRiseErr(h2AMC13Status_, nXBin, 8, bErr);
306  if (errors.slinkError)
307  FillWithRiseErr(h2AMC13Status_, nXBin, 9, bErr);
308  if (errors.wrongFedId)
309  FillWithRiseErr(h2AMC13Status_, nXBin, 10, bErr);
310 
311  if (!bWarn && !bErr) {
312  h2AMC13Status_->Fill(nXBin, 1);
313  } else {
314  auto &listChamber = mapAMC13ToListChamber_[fedId];
315  for (auto gid : listChamber) {
316  ME4IdsKey key4Ch{gid.region(), gid.station(), gid.layer(), gid.chamber()};
317  if (bErr)
318  mapChamberAMC13Error[key4Ch] = false;
319  }
320  }
321  }
322  }
323 
324  MonitorElement *h2AMCStatus = nullptr;
325 
326  for (auto amcIt = gemAMC->begin(); amcIt != gemAMC->end(); ++amcIt) {
327  int fedId = (*amcIt).first;
328  if (mapFEDIdToRe_.find(fedId) == mapFEDIdToRe_.end())
329  continue;
330  if (mapFEDIdToRe_[fedId] < 0) {
331  h2AMCStatus = h2AMCStatusNeg_;
332  } else if (mapFEDIdToRe_[fedId] > 0) {
333  h2AMCStatus = h2AMCStatusPos_;
334  } else {
335  edm::LogError(log_category_) << "+++ Error : Unknown FED Id +++\n" << std::endl;
336  continue;
337  }
338 
339  const GEMAMCStatusCollection::Range &range = (*amcIt).second;
340  for (auto amc = range.first; amc != range.second; ++amc) {
341  Bool_t bWarn = false;
342  Bool_t bErr = false;
343 
344  Int_t nAMCNum = amc->amcNumber();
345 
346  GEMAMCStatus::Warnings warnings{amc->warnings()};
347  if (warnings.InValidOH)
348  FillWithRiseErr(h2AMCStatus, nAMCNum, 2, bWarn);
349  if (warnings.backPressure)
350  FillWithRiseErr(h2AMCStatus, nAMCNum, 3, bWarn);
351 
352  GEMAMCStatus::Errors errors{amc->errors()};
353  if (errors.badEC)
354  FillWithRiseErr(h2AMCStatus, nAMCNum, 4, bErr);
355  if (errors.badBC)
356  FillWithRiseErr(h2AMCStatus, nAMCNum, 5, bErr);
357  if (errors.badOC)
358  FillWithRiseErr(h2AMCStatus, nAMCNum, 6, bErr);
359  if (errors.badRunType)
360  FillWithRiseErr(h2AMCStatus, nAMCNum, 7, bErr);
361  if (errors.badCRC)
362  FillWithRiseErr(h2AMCStatus, nAMCNum, 8, bErr);
363  if (errors.MMCMlocked)
364  FillWithRiseErr(h2AMCStatus, nAMCNum, 9, bErr);
365  if (errors.DAQclocklocked)
366  FillWithRiseErr(h2AMCStatus, nAMCNum, 10, bErr);
367  if (errors.DAQnotReday)
368  FillWithRiseErr(h2AMCStatus, nAMCNum, 11, bErr);
369  if (errors.BC0locked)
370  FillWithRiseErr(h2AMCStatus, nAMCNum, 12, bErr);
371 
372  if (!bWarn && !bErr) {
373  h2AMCStatus->Fill(nAMCNum, 1);
374  } else {
375  auto &listChamber = mapAMCToListChamber_[{fedId, nAMCNum}];
376  for (auto gid : listChamber) {
377  ME4IdsKey key4Ch{gid.region(), gid.station(), gid.layer(), gid.chamber()};
378  if (bErr)
379  mapChamberAMCError[key4Ch] = false;
380  if (bWarn)
381  mapChamberAMCWarning[key4Ch] = false;
382  }
383  }
384  }
385  }
386 
387  for (auto ohIt = gemOH->begin(); ohIt != gemOH->end(); ++ohIt) {
388  GEMDetId gid = (*ohIt).first;
389  ME3IdsKey key3{gid.region(), gid.station(), gid.layer()};
390  ME4IdsKey key4{gid.region(), gid.station(), gid.layer(), gid.chamber()}; // WARNING: Chamber, not iEta
391 
392  const GEMOHStatusCollection::Range &range = (*ohIt).second;
393  for (auto OHStatus = range.first; OHStatus != range.second; ++OHStatus) {
394  GEMOHStatus::Warnings warnings{OHStatus->warnings()};
395  if (warnings.EvtNF)
396  mapStatusOH_.Fill(key3, gid.chamber(), 2);
397  if (warnings.InNF)
398  mapStatusOH_.Fill(key3, gid.chamber(), 3);
399  if (warnings.L1aNF)
400  mapStatusOH_.Fill(key3, gid.chamber(), 4);
401  if (warnings.EvtSzW)
402  mapStatusOH_.Fill(key3, gid.chamber(), 5);
403  if (warnings.InValidVFAT)
404  mapStatusOH_.Fill(key3, gid.chamber(), 6);
405 
406  GEMOHStatus::Errors errors{OHStatus->errors()};
407  if (errors.EvtF)
408  mapStatusOH_.Fill(key3, gid.chamber(), 7);
409  if (errors.InF)
410  mapStatusOH_.Fill(key3, gid.chamber(), 8);
411  if (errors.L1aF)
412  mapStatusOH_.Fill(key3, gid.chamber(), 9);
413  if (errors.EvtSzOFW)
414  mapStatusOH_.Fill(key3, gid.chamber(), 10);
415  if (errors.Inv)
416  mapStatusOH_.Fill(key3, gid.chamber(), 11);
417  if (errors.OOScAvV)
418  mapStatusOH_.Fill(key3, gid.chamber(), 12);
419  if (errors.OOScVvV)
420  mapStatusOH_.Fill(key3, gid.chamber(), 13);
421  if (errors.BxmAvV)
422  mapStatusOH_.Fill(key3, gid.chamber(), 14);
423  if (errors.BxmVvV)
424  mapStatusOH_.Fill(key3, gid.chamber(), 15);
425  if (errors.InUfw)
426  mapStatusOH_.Fill(key3, gid.chamber(), 16);
427  if (errors.badVFatCount)
428  mapStatusOH_.Fill(key3, gid.chamber(), 17);
429 
430  Bool_t bWarn = warnings.wcodes != 0;
431  Bool_t bErr = errors.codes != 0;
432  if (!bWarn && !bErr)
433  mapStatusOH_.Fill(key3, gid.chamber(), 1);
434  if (bWarn)
435  mapChamberOHWarning[key4] = false;
436  if (bErr)
437  mapChamberOHError[key4] = false;
438  mapChamberAll[key4] = true;
439  }
440  }
441 
442  for (auto vfatIt = gemVFAT->begin(); vfatIt != gemVFAT->end(); ++vfatIt) {
443  GEMDetId gid = (*vfatIt).first;
444  ME3IdsKey key3{gid.region(), gid.station(), gid.layer()};
445  ME4IdsKey key4Ch{gid.region(), gid.station(), gid.layer(), gid.chamber()}; // WARNING: Chamber, not iEta
446  const GEMVFATStatusCollection::Range &range = (*vfatIt).second;
447 
448  for (auto vfatStat = range.first; vfatStat != range.second; ++vfatStat) {
449  Int_t nIdxVFAT = getVFATNumber(gid.station(), gid.ieta(), vfatStat->vfatPosition());
450 
451  GEMVFATStatus::Warnings warnings{vfatStat->warnings()};
452  if (warnings.basicOFW)
453  mapStatusVFAT_.Fill(key3, nIdxVFAT, 2);
454  if (warnings.zeroSupOFW)
455  mapStatusVFAT_.Fill(key3, nIdxVFAT, 3);
456  if (warnings.basicOFW)
457  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 2);
458  if (warnings.zeroSupOFW)
459  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 3);
460 
461  GEMVFATStatus::Errors errors{(uint8_t)vfatStat->errors()};
462  if (errors.vc)
463  mapStatusVFAT_.Fill(key3, nIdxVFAT, 4);
464  if (errors.InValidHeader)
465  mapStatusVFAT_.Fill(key3, nIdxVFAT, 5);
466  if (errors.EC)
467  mapStatusVFAT_.Fill(key3, nIdxVFAT, 6);
468  if (errors.BC)
469  mapStatusVFAT_.Fill(key3, nIdxVFAT, 7);
470  if (errors.vc)
471  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 4);
472  if (errors.InValidHeader)
473  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 5);
474  if (errors.EC)
475  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 6);
476  if (errors.BC)
477  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 7);
478 
479  Bool_t bWarn = warnings.wcodes != 0;
480  Bool_t bErr = errors.codes != 0;
481  if (!bWarn && !bErr)
482  mapStatusVFAT_.Fill(key3, nIdxVFAT, 1);
483  if (!bWarn && !bErr)
484  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 1);
485  if (bWarn)
486  mapChamberVFATWarning[key4Ch] = false;
487  if (bErr)
488  mapChamberVFATError[key4Ch] = false;
489  if (bWarn)
490  mapStatusWarnVFATPerLayer_.Fill(key3, gid.chamber(), nIdxVFAT);
491  if (bErr)
492  mapStatusErrVFATPerLayer_.Fill(key3, gid.chamber(), nIdxVFAT);
493  mapChamberAll[key4Ch] = true;
494  }
495  }
496 
497  // Summarizing all presence of status of each chamber
498  for (auto const &[key4, bErr] : mapChamberAll) {
499  ME3IdsKey key3 = key4Tokey3(key4);
500  Int_t nChamber = keyToChamber(key4);
501  h2SummaryStatusAll->Fill(nChamber, mapStationToIdx_[key3]);
502  }
503 
504  // Summarizing all presence of status of each chamber
506  // Summarizing all the error and warning occupancy
507  FillStatusSummaryPlot(mapChamberVFATWarning, h2SummaryStatusVFATWarning, &mapChamberWarning);
508  FillStatusSummaryPlot(mapChamberVFATError, h2SummaryStatusVFATError, &mapChamberError);
509  FillStatusSummaryPlot(mapChamberOHWarning, h2SummaryStatusOHWarning, &mapChamberWarning);
510  FillStatusSummaryPlot(mapChamberOHError, h2SummaryStatusOHError, &mapChamberError);
511  FillStatusSummaryPlot(mapChamberAMCWarning, h2SummaryStatusAMCWarning, &mapChamberWarning);
512  FillStatusSummaryPlot(mapChamberAMCError, h2SummaryStatusAMCError, &mapChamberError);
513  FillStatusSummaryPlot(mapChamberAMC13Error, h2SummaryStatusAMC13Error, &mapChamberError);
514 
515  FillStatusSummaryPlot(mapChamberWarning, h2SummaryStatusWarning);
517 }
void FillWithRiseErr(MonitorElement *h, Int_t nX, Int_t nY, Bool_t &bErr)
edm::EDGetToken tagAMC13_
int getVFATNumber(const int, const int, const int)
Definition: GEMDQMBase.h:591
MonitorElement * h2SummaryStatusAMCWarning
MonitorElement * h2AMCStatusNeg_
MonitorElement * h2AMC13Status_
MonitorElement * h2SummaryStatusAMCError
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
std::map< UInt_t, int > mapFEDIdToRe_
std::map< std::tuple< int, int >, std::vector< GEMDetId > > mapAMCToListChamber_
std::map< ME3IdsKey, int > mapStationToIdx_
Definition: GEMDQMBase.h:563
Log< level::Error, false > LogError
int Fill(K key, Double_t x)
Definition: GEMDQMBase.h:377
std::string log_category_
Definition: GEMDQMBase.h:496
constexpr int ieta() const
Definition: GEMDetId.h:199
edm::EDGetToken tagVFAT_
MonitorElement * h2SummaryStatusVFATError
const uint16_t range(const Frame &aFrame)
void Fill(long long x)
MEMap3Inf mapStatusWarnVFATPerLayer_
edm::EDGetToken tagOH_
MonitorElement * h2SummaryStatusError
double amc
Definition: hdecay.h:20
MEMap3Inf mapStatusErrVFATPerLayer_
constexpr int region() const
Definition: GEMDetId.h:171
std::map< int, std::vector< GEMDetId > > mapAMC13ToListChamber_
MonitorElement * h2SummaryStatusVFATWarning
MonitorElement * h2SummaryStatusAll
constexpr int chamber() const
Definition: GEMDetId.h:183
constexpr int layer() const
Definition: GEMDetId.h:190
std::pair< const_iterator, const_iterator > Range
constexpr int station() const
Definition: GEMDetId.h:179
int keyToChamber(ME4IdsKey key)
Definition: GEMDQMBase.h:520
MonitorElement * h2SummaryStatusOHWarning
ME3IdsKey key4Tokey3(ME4IdsKey key)
Definition: GEMDQMBase.h:529
MonitorElement * h2SummaryStatusAMC13Error
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
MonitorElement * h2SummaryStatusWarning
void FillStatusSummaryPlot(std::map< ME4IdsKey, bool > &mapChamber, MonitorElement *h2Plot, std::map< ME4IdsKey, bool > *pmapSummary=nullptr)
MonitorElement * h2SummaryStatusOHError
MonitorElement * h2AMCStatusPos_
edm::EDGetToken tagAMC_
void GEMDAQStatusSource::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 128 of file GEMDAQStatusSource.cc.

References dqm::implementation::IBooker::book2D(), dqm::implementation::NavigatorBase::cd(), GEMDQMBase::CreateSummaryHist(), GEMDQMBase::GEMGeometry_, GEMDQMBase::GenerateMEPerChamber(), h2AMC13Status_, h2AMCStatusNeg_, h2AMCStatusPos_, h2SummaryStatusAll, h2SummaryStatusAMC13Error, h2SummaryStatusAMCError, h2SummaryStatusAMCWarning, h2SummaryStatusError, h2SummaryStatusOHError, h2SummaryStatusOHWarning, h2SummaryStatusVFATError, h2SummaryStatusVFATWarning, h2SummaryStatusWarning, GEMDQMBase::initGeometry(), GEMDQMBase::loadChambers(), LoadROMap(), mapAMC13ToListChamber_, mapAMCToListChamber_, mapFEDIdToRe_, mapStatusErrVFATPerLayer_, mapStatusOH_, mapStatusVFAT_, mapStatusVFATPerCh_, mapStatusWarnVFATPerLayer_, nAMCSlots_, nBitAMC13_, nBitAMC_, nBitOH_, nBitVFAT_, nBXMax_, nBXMin_, dqm::implementation::NavigatorBase::setCurrentFolder(), SetLabelAMC13Status(), SetLabelAMCStatus(), and dqm::impl::MonitorElement::setTitle().

128  {
129  LoadROMap(iSetup);
130  if (mapAMC13ToListChamber_.empty() || mapAMCToListChamber_.empty())
131  return;
132  initGeometry(iSetup);
133  if (GEMGeometry_ == nullptr)
134  return;
135  loadChambers();
136 
137  nBXMin_ = -10;
138  nBXMax_ = 10;
139 
140  mapFEDIdToRe_[1467] = -1; // FIXME: Need more systematic way
141  mapFEDIdToRe_[1468] = 1;
142 
143  ibooker.cd();
144  ibooker.setCurrentFolder("GEM/DAQStatus");
145 
147  ibooker.book2D("amc13_status", "AMC13 Status;AMC13;", 2, 0.5, 2.5, nBitAMC13_, 0.5, nBitAMC13_ + 0.5);
148  h2AMCStatusNeg_ = ibooker.book2D("amc_status_GE11-M",
149  "AMC Status GE11-M;AMC slot;",
150  nAMCSlots_,
151  -0.5,
152  nAMCSlots_ - 0.5,
153  nBitAMC_,
154  0.5,
155  nBitAMC_ + 0.5);
156  h2AMCStatusPos_ = ibooker.book2D("amc_status_GE11-P",
157  "AMC Status GE11-P;AMC slot;",
158  nAMCSlots_,
159  -0.5,
160  nAMCSlots_ - 0.5,
161  nBitAMC_,
162  0.5,
163  nBitAMC_ + 0.5);
164 
168 
169  mapStatusOH_ =
170  MEMap3Inf(this, "oh_status", "OptoHybrid Status", 36, 0.5, 36.5, nBitOH_, 0.5, nBitOH_ + 0.5, "Chamber");
172  MEMap3Inf(this, "vfat_status", "VFAT Status", 24, -0.5, 24 - 0.5, nBitVFAT_, 0.5, nBitVFAT_ + 0.5, "VFAT");
173 
175  this, "vfat_statusWarnSum", "VFAT reporting warnings", 36, 0.5, 36.5, 24, -0.5, 24 - 0.5, "Chamber", "VFAT");
177  this, "vfat_statusErrSum", "VFAT reporting errors", 36, 0.5, 36.5, 24, -0.5, 24 - 0.5, "Chamber", "VFAT");
179  MEMap4Inf(this, "vfat_status", "VFAT Status", 24, -0.5, 24 - 0.5, nBitVFAT_, 0.5, nBitVFAT_ + 0.5, "VFAT");
180 
181  GenerateMEPerChamber(ibooker);
182 
183  h2SummaryStatusAll = CreateSummaryHist(ibooker, "chamberAllStatus");
184  h2SummaryStatusWarning = CreateSummaryHist(ibooker, "chamberWarnings");
185  h2SummaryStatusError = CreateSummaryHist(ibooker, "chamberErrors");
186  h2SummaryStatusVFATWarning = CreateSummaryHist(ibooker, "chamberVFATWarnings");
187  h2SummaryStatusVFATError = CreateSummaryHist(ibooker, "chamberVFATErrors");
188  h2SummaryStatusOHWarning = CreateSummaryHist(ibooker, "chamberOHWarnings");
189  h2SummaryStatusOHError = CreateSummaryHist(ibooker, "chamberOHErrors");
190  h2SummaryStatusAMCWarning = CreateSummaryHist(ibooker, "chamberAMCWarnings");
191  h2SummaryStatusAMCError = CreateSummaryHist(ibooker, "chamberAMCErrors");
192  h2SummaryStatusAMC13Error = CreateSummaryHist(ibooker, "chamberAMC13Errors");
193 
194  h2SummaryStatusAll->setTitle("Summary of all number of OH or VFAT status of each chambers");
195  h2SummaryStatusWarning->setTitle("Summary of all warnings of each chambers");
196  h2SummaryStatusError->setTitle("Summary of all errors of each chambers");
197  h2SummaryStatusVFATWarning->setTitle("Summary of VFAT warnings of each chambers");
198  h2SummaryStatusVFATError->setTitle("Summary of VFAT errors of each chambers");
199  h2SummaryStatusOHWarning->setTitle("Summary of OH warnings of each chambers");
200  h2SummaryStatusOHError->setTitle("Summary of OH errors of each chambers");
201  h2SummaryStatusAMCWarning->setTitle("Summary of AMC warnings of each chambers");
202  h2SummaryStatusAMCError->setTitle("Summary of AMC errors of each chambers");
203  h2SummaryStatusAMC13Error->setTitle("Summary of AMC13 errors of each chambers");
204 }
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
MEMapInfT< MEMap4Ids, ME4IdsKey > MEMap4Inf
Definition: GEMDQMBase.h:457
dqm::impl::MonitorElement * CreateSummaryHist(DQMStore::IBooker &ibooker, TString strName)
Definition: GEMDQMBase.cc:125
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * h2SummaryStatusAMCWarning
MonitorElement * h2AMCStatusNeg_
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
Definition: GEMDQMBase.h:456
MonitorElement * h2AMC13Status_
MonitorElement * h2SummaryStatusAMCError
int initGeometry(edm::EventSetup const &iSetup)
Definition: GEMDQMBase.cc:15
std::map< UInt_t, int > mapFEDIdToRe_
std::map< std::tuple< int, int >, std::vector< GEMDetId > > mapAMCToListChamber_
int loadChambers()
Definition: GEMDQMBase.cc:46
MonitorElement * h2SummaryStatusVFATError
MEMap3Inf mapStatusWarnVFATPerLayer_
MonitorElement * h2SummaryStatusError
MEMap3Inf mapStatusErrVFATPerLayer_
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)
Definition: GEMDQMBase.cc:161
void SetLabelAMCStatus(MonitorElement *h2Status)
void LoadROMap(edm::EventSetup const &iSetup)
void SetLabelAMC13Status(MonitorElement *h2Status)
std::map< int, std::vector< GEMDetId > > mapAMC13ToListChamber_
MonitorElement * h2SummaryStatusVFATWarning
MonitorElement * h2SummaryStatusAll
const GEMGeometry * GEMGeometry_
Definition: GEMDQMBase.h:550
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
MonitorElement * h2SummaryStatusOHWarning
MonitorElement * h2SummaryStatusAMC13Error
MonitorElement * h2SummaryStatusWarning
MonitorElement * h2SummaryStatusOHError
MonitorElement * h2AMCStatusPos_
void GEMDAQStatusSource::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 43 of file GEMDAQStatusSource.h.

43 {};
void GEMDAQStatusSource::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 16 of file GEMDAQStatusSource.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

16  {
18  desc.add<edm::InputTag>("VFATInputLabel", edm::InputTag("muonGEMDigis", "VFATStatus"));
19  desc.add<edm::InputTag>("OHInputLabel", edm::InputTag("muonGEMDigis", "OHStatus"));
20  desc.add<edm::InputTag>("AMCInputLabel", edm::InputTag("muonGEMDigis", "AMCStatus"));
21  desc.add<edm::InputTag>("AMC13InputLabel", edm::InputTag("muonGEMDigis", "AMC13Status"));
22 
23  desc.add<Int_t>("AMCSlots", 13);
24  desc.addUntracked<std::string>("logCategory", "GEMDAQStatusSource");
25 
26  descriptions.add("GEMDAQStatusSource", desc);
27 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void GEMDAQStatusSource::FillStatusSummaryPlot ( std::map< ME4IdsKey, bool > &  mapChamber,
MonitorElement h2Plot,
std::map< ME4IdsKey, bool > *  pmapSummary = nullptr 
)
inlineprotected

Definition at line 52 of file GEMDAQStatusSource.h.

References dqm::impl::MonitorElement::Fill(), GEMDQMBase::key4Tokey3(), GEMDQMBase::keyToChamber(), and GEMDQMBase::mapStationToIdx_.

Referenced by analyze().

54  {
55  for (auto const &[key4, bFlag] : mapChamber) { // bFlag is not used
56  ME3IdsKey key3 = key4Tokey3(key4);
57  Int_t nChamber = keyToChamber(key4);
58  h2Plot->Fill(nChamber, mapStationToIdx_[key3]);
59  if (pmapSummary != nullptr)
60  (*pmapSummary)[key4] = true;
61  }
62  };
std::map< ME3IdsKey, int > mapStationToIdx_
Definition: GEMDQMBase.h:563
void Fill(long long x)
int keyToChamber(ME4IdsKey key)
Definition: GEMDQMBase.h:520
ME3IdsKey key4Tokey3(ME4IdsKey key)
Definition: GEMDQMBase.h:529
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
void GEMDAQStatusSource::FillWithRiseErr ( MonitorElement h,
Int_t  nX,
Int_t  nY,
Bool_t &  bErr 
)
inlineprotected

Definition at line 47 of file GEMDAQStatusSource.h.

References dqm::impl::MonitorElement::Fill().

Referenced by analyze().

47  {
48  h->Fill(nX, nY);
49  bErr = true;
50  };
void Fill(long long x)
void GEMDAQStatusSource::LoadROMap ( edm::EventSetup const &  iSetup)
protected

Definition at line 29 of file GEMDAQStatusSource.cc.

References GEMROMapping::chamDC::detId, l1tstage2_dqm_sourceclient-live_cfg::fedId, gemEMapToken_, edm::EventSetup::getData(), mps_fire::i, mapAMC13ToListChamber_, mapAMCToListChamber_, mapFEDIdToRe_, and GEMDetId::region().

Referenced by bookHistograms().

29  {
30  auto gemROMap = std::make_shared<GEMROMapping>();
31  //if (useDBEMap_)
32  if (true) {
33  const auto &eMap = iSetup.getData(gemEMapToken_);
34  auto gemEMap = std::make_unique<GEMeMap>(eMap);
35  gemEMap->convert(*gemROMap);
36 
37  for (auto imap : gemEMap->theChamberMap_) {
38  int nNumChamber = (int)imap.fedId.size();
39  for (int i = 0; i < nNumChamber; i++) {
40  unsigned int fedId = imap.fedId[i];
41  uint8_t amcNum = imap.amcNum[i];
42  uint8_t gebId = imap.gebId[i];
43  GEMROMapping::chamEC geb_ec{fedId, amcNum, gebId};
44  GEMROMapping::chamDC geb_dc = gemROMap->chamberPos(geb_ec);
45  GEMDetId gemChId = geb_dc.detId;
46 
47  mapFEDIdToRe_[fedId] = gemChId.region();
48  mapAMC13ToListChamber_[fedId].push_back(gemChId);
49  mapAMCToListChamber_[{fedId, amcNum}].push_back(gemChId);
50  }
51  }
52 
53  gemEMap.reset();
54  } else {
55  // no EMap in DB, using dummy
56  // FIXME: How to add mapFEDIdToRe_ and mapDetIdToAMC_??
57  auto gemEMap = std::make_unique<GEMeMap>();
58  gemEMap->convertDummy(*gemROMap);
59  gemEMap.reset();
60  }
61 }
edm::ESGetToken< GEMeMap, GEMeMapRcd > gemEMapToken_
std::map< UInt_t, int > mapFEDIdToRe_
std::map< std::tuple< int, int >, std::vector< GEMDetId > > mapAMCToListChamber_
constexpr int region() const
Definition: GEMDetId.h:171
std::map< int, std::vector< GEMDetId > > mapAMC13ToListChamber_
int GEMDAQStatusSource::ProcessWithMEMap3 ( BookingHelper bh,
ME3IdsKey  key 
)
overrideprivatevirtual

Reimplemented from GEMDQMBase.

Definition at line 206 of file GEMDAQStatusSource.cc.

References GEMDQMBase::MEMapInfT< M, K >::bookND(), GEMDQMBase::MEMapInfT< M, K >::FindHist(), submitPVResolutionJobs::key, GEMDQMBase::mapStationInfo_, mapStatusErrVFATPerLayer_, mapStatusOH_, mapStatusVFAT_, mapStatusWarnVFATPerLayer_, GEMDQMBase::MEStationInfo::nMaxVFAT_, GEMDQMBase::MEStationInfo::nNumChambers_, GEMDQMBase::MEStationInfo::nNumEtaPartitions_, GEMDQMBase::MEMapInfT< M, K >::SetBinConfX(), GEMDQMBase::MEMapInfT< M, K >::SetBinConfY(), GEMDQMBase::MEMapInfT< M, K >::SetLabelForChambers(), GEMDQMBase::MEMapInfT< M, K >::SetLabelForVFATs(), SetLabelOHStatus(), and SetLabelVFATStatus().

206  {
207  MEStationInfo &stationInfo = mapStationInfo_[key];
208 
209  mapStatusOH_.SetBinConfX(stationInfo.nNumChambers_);
210  mapStatusOH_.bookND(bh, key);
212 
214 
215  mapStatusWarnVFATPerLayer_.SetBinConfX(stationInfo.nNumChambers_);
216  mapStatusWarnVFATPerLayer_.SetBinConfY(stationInfo.nMaxVFAT_, -0.5);
219  mapStatusWarnVFATPerLayer_.SetLabelForVFATs(key, stationInfo.nNumEtaPartitions_, 2);
220 
221  mapStatusErrVFATPerLayer_.SetBinConfX(stationInfo.nNumChambers_);
222  mapStatusErrVFATPerLayer_.SetBinConfY(stationInfo.nMaxVFAT_, -0.5);
225  mapStatusErrVFATPerLayer_.SetLabelForVFATs(key, stationInfo.nNumEtaPartitions_, 2);
226 
227  mapStatusVFAT_.SetBinConfX(stationInfo.nMaxVFAT_, -0.5);
229  mapStatusVFAT_.SetLabelForVFATs(key, stationInfo.nNumEtaPartitions_, 1);
230 
232 
233  return 0;
234 }
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:334
int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:356
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:564
MEMap3Inf mapStatusWarnVFATPerLayer_
MEMap3Inf mapStatusErrVFATPerLayer_
tuple key
prepare the HTCondor submission files and eventually submit them
void SetLabelVFATStatus(MonitorElement *h2Status)
void SetLabelOHStatus(MonitorElement *h2Status)
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:305
void SetBinConfX(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:279
void SetBinConfY(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:287
dqm::impl::MonitorElement * FindHist(K key)
Definition: GEMDQMBase.h:326
int GEMDAQStatusSource::ProcessWithMEMap3WithChamber ( BookingHelper bh,
ME4IdsKey  key 
)
overrideprivatevirtual

Reimplemented from GEMDQMBase.

Definition at line 236 of file GEMDAQStatusSource.cc.

References GEMDQMBase::MEMapInfT< M, K >::bookND(), GEMDQMBase::MEMapInfT< M, K >::FindHist(), GEMDQMBase::key4Tokey3(), GEMDQMBase::mapStationInfo_, mapStatusVFATPerCh_, GEMDQMBase::MEStationInfo::nMaxVFAT_, GEMDQMBase::MEStationInfo::nNumEtaPartitions_, GEMDQMBase::MEMapInfT< M, K >::SetBinConfX(), GEMDQMBase::MEMapInfT< M, K >::SetLabelForVFATs(), and SetLabelVFATStatus().

236  {
237  ME3IdsKey key3 = key4Tokey3(key);
238  MEStationInfo &stationInfo = mapStationInfo_[key3];
239 
240  mapStatusVFATPerCh_.SetBinConfX(stationInfo.nMaxVFAT_, -0.5);
242  mapStatusVFATPerCh_.SetLabelForVFATs(key, stationInfo.nNumEtaPartitions_, 1);
244 
245  return 0;
246 }
int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:356
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:564
tuple key
prepare the HTCondor submission files and eventually submit them
void SetLabelVFATStatus(MonitorElement *h2Status)
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:305
ME3IdsKey key4Tokey3(ME4IdsKey key)
Definition: GEMDQMBase.h:529
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
void SetBinConfX(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:279
dqm::impl::MonitorElement * FindHist(K key)
Definition: GEMDQMBase.h:326
void GEMDAQStatusSource::SetLabelAMC13Status ( MonitorElement h2Status)
private

Definition at line 63 of file GEMDAQStatusSource.cc.

References dqm::impl::MonitorElement::setBinLabel().

Referenced by bookHistograms().

63  {
64  unsigned int unBinPos = 1;
65  h2Status->setBinLabel(unBinPos++, "Good", 2);
66  h2Status->setBinLabel(unBinPos++, "Invalid AMC", 2);
67  h2Status->setBinLabel(unBinPos++, "Invalid size", 2);
68  h2Status->setBinLabel(unBinPos++, "Fail trailer check", 2);
69  h2Status->setBinLabel(unBinPos++, "Fail fragment length", 2);
70  h2Status->setBinLabel(unBinPos++, "Fail trailer match", 2);
71  h2Status->setBinLabel(unBinPos++, "More trailer", 2);
72  h2Status->setBinLabel(unBinPos++, "CRC modified", 2);
73  h2Status->setBinLabel(unBinPos++, "S-link error", 2);
74  h2Status->setBinLabel(unBinPos++, "Wrong FED ID", 2);
75 
76  h2Status->setBinLabel(1, "GE11-M", 1);
77  h2Status->setBinLabel(2, "GE11-P", 1);
78 }
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)
void GEMDAQStatusSource::SetLabelAMCStatus ( MonitorElement h2Status)
private

Definition at line 80 of file GEMDAQStatusSource.cc.

References dqm::impl::MonitorElement::setBinLabel().

Referenced by bookHistograms().

80  {
81  unsigned int unBinPos = 1;
82  h2Status->setBinLabel(unBinPos++, "Good", 2);
83  h2Status->setBinLabel(unBinPos++, "Invalid OH", 2);
84  h2Status->setBinLabel(unBinPos++, "Back pressure", 2);
85  h2Status->setBinLabel(unBinPos++, "Bad EC", 2);
86  h2Status->setBinLabel(unBinPos++, "Bad BC", 2);
87  h2Status->setBinLabel(unBinPos++, "Bad OC", 2);
88  h2Status->setBinLabel(unBinPos++, "Bad run type", 2);
89  h2Status->setBinLabel(unBinPos++, "Bad CRC", 2);
90  h2Status->setBinLabel(unBinPos++, "MMCM locked", 2);
91  h2Status->setBinLabel(unBinPos++, "DAQ clock locked", 2);
92  h2Status->setBinLabel(unBinPos++, "DAQ not ready", 2);
93  h2Status->setBinLabel(unBinPos++, "BC0 not locked", 2);
94 }
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)
void GEMDAQStatusSource::SetLabelOHStatus ( MonitorElement h2Status)
private

Definition at line 96 of file GEMDAQStatusSource.cc.

References dqm::impl::MonitorElement::setBinLabel().

Referenced by ProcessWithMEMap3().

96  {
97  unsigned int unBinPos = 1;
98  h2Status->setBinLabel(unBinPos++, "Good", 2);
99  h2Status->setBinLabel(unBinPos++, "Event FIFO near full", 2);
100  h2Status->setBinLabel(unBinPos++, "Input FIFO near full", 2);
101  h2Status->setBinLabel(unBinPos++, "L1A FIFO near full", 2);
102  h2Status->setBinLabel(unBinPos++, "Event size warn", 2);
103  h2Status->setBinLabel(unBinPos++, "Invalid VFAT", 2);
104  h2Status->setBinLabel(unBinPos++, "Event FIFO full", 2);
105  h2Status->setBinLabel(unBinPos++, "Input FIFO full", 2);
106  h2Status->setBinLabel(unBinPos++, "L1A FIFO full", 2);
107  h2Status->setBinLabel(unBinPos++, "Event size overflow", 2);
108  h2Status->setBinLabel(unBinPos++, "Invalid event", 2);
109  h2Status->setBinLabel(unBinPos++, "Out of Sync AMC vs VFAT", 2);
110  h2Status->setBinLabel(unBinPos++, "Out of Sync VFAT vs VFAT", 2);
111  h2Status->setBinLabel(unBinPos++, "BX mismatch AMC vs VFAT", 2);
112  h2Status->setBinLabel(unBinPos++, "BX mismatch VFAT vs VFAT", 2);
113  h2Status->setBinLabel(unBinPos++, "Input FIFO underflow", 2);
114  h2Status->setBinLabel(unBinPos++, "Bad VFAT count", 2);
115 }
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)
void GEMDAQStatusSource::SetLabelVFATStatus ( MonitorElement h2Status)
private

Definition at line 117 of file GEMDAQStatusSource.cc.

References dqm::impl::MonitorElement::setBinLabel().

Referenced by ProcessWithMEMap3(), and ProcessWithMEMap3WithChamber().

117  {
118  unsigned int unBinPos = 1;
119  h2Status->setBinLabel(unBinPos++, "Good", 2);
120  h2Status->setBinLabel(unBinPos++, "Basic overflow", 2);
121  h2Status->setBinLabel(unBinPos++, "Zero-sup overflow", 2);
122  h2Status->setBinLabel(unBinPos++, "VFAT CRC error", 2);
123  h2Status->setBinLabel(unBinPos++, "Invalid header", 2);
124  h2Status->setBinLabel(unBinPos++, "AMC EC mismatch", 2);
125  h2Status->setBinLabel(unBinPos++, "AMC BC mismatch", 2);
126 }
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)

Member Data Documentation

const GEMeMap* GEMDAQStatusSource::gemEMap_
private

Definition at line 75 of file GEMDAQStatusSource.h.

edm::ESGetToken<GEMeMap, GEMeMapRcd> GEMDAQStatusSource::gemEMapToken_
private

Definition at line 73 of file GEMDAQStatusSource.h.

Referenced by GEMDAQStatusSource(), and LoadROMap().

MonitorElement* GEMDAQStatusSource::h2AMC13Status_
private

Definition at line 82 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2AMCStatusNeg_
private

Definition at line 84 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2AMCStatusPos_
private

Definition at line 83 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2SummaryStatusAll
private

Definition at line 93 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2SummaryStatusAMC13Error
private

Definition at line 102 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2SummaryStatusAMCError
private

Definition at line 101 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2SummaryStatusAMCWarning
private

Definition at line 100 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2SummaryStatusError
private

Definition at line 95 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2SummaryStatusOHError
private

Definition at line 99 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2SummaryStatusOHWarning
private

Definition at line 98 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2SummaryStatusVFATError
private

Definition at line 97 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2SummaryStatusVFATWarning
private

Definition at line 96 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMDAQStatusSource::h2SummaryStatusWarning
private

Definition at line 94 of file GEMDAQStatusSource.h.

Referenced by analyze(), and bookHistograms().

std::map<int, std::vector<GEMDetId> > GEMDAQStatusSource::mapAMC13ToListChamber_
private

Definition at line 107 of file GEMDAQStatusSource.h.

Referenced by analyze(), bookHistograms(), and LoadROMap().

std::map<std::tuple<int, int>, std::vector<GEMDetId> > GEMDAQStatusSource::mapAMCToListChamber_
private

Definition at line 108 of file GEMDAQStatusSource.h.

Referenced by analyze(), bookHistograms(), and LoadROMap().

std::map<UInt_t, int> GEMDAQStatusSource::mapFEDIdToRe_
private

Definition at line 106 of file GEMDAQStatusSource.h.

Referenced by analyze(), bookHistograms(), and LoadROMap().

MEMap3Inf GEMDAQStatusSource::mapStatusErrVFATPerLayer_
private

Definition at line 90 of file GEMDAQStatusSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap3().

MEMap3Inf GEMDAQStatusSource::mapStatusOH_
private

Definition at line 86 of file GEMDAQStatusSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap3().

MEMap3Inf GEMDAQStatusSource::mapStatusVFAT_
private

Definition at line 87 of file GEMDAQStatusSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap3().

MEMap4Inf GEMDAQStatusSource::mapStatusVFATPerCh_
private

Definition at line 91 of file GEMDAQStatusSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap3WithChamber().

MEMap3Inf GEMDAQStatusSource::mapStatusWarnVFATPerLayer_
private

Definition at line 89 of file GEMDAQStatusSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap3().

Int_t GEMDAQStatusSource::nAMCSlots_
private

Definition at line 109 of file GEMDAQStatusSource.h.

Referenced by bookHistograms(), and GEMDAQStatusSource().

int GEMDAQStatusSource::nBitAMC13_ = 10
private

Definition at line 111 of file GEMDAQStatusSource.h.

Referenced by bookHistograms().

int GEMDAQStatusSource::nBitAMC_ = 12
private

Definition at line 112 of file GEMDAQStatusSource.h.

Referenced by bookHistograms().

int GEMDAQStatusSource::nBitOH_ = 17
private

Definition at line 113 of file GEMDAQStatusSource.h.

Referenced by bookHistograms().

int GEMDAQStatusSource::nBitVFAT_ = 7
private

Definition at line 114 of file GEMDAQStatusSource.h.

Referenced by bookHistograms().

Int_t GEMDAQStatusSource::nBXMax_
private

Definition at line 104 of file GEMDAQStatusSource.h.

Referenced by bookHistograms().

Int_t GEMDAQStatusSource::nBXMin_
private

Definition at line 104 of file GEMDAQStatusSource.h.

Referenced by bookHistograms().

edm::EDGetToken GEMDAQStatusSource::tagAMC13_
private

Definition at line 80 of file GEMDAQStatusSource.h.

Referenced by analyze(), and GEMDAQStatusSource().

edm::EDGetToken GEMDAQStatusSource::tagAMC_
private

Definition at line 79 of file GEMDAQStatusSource.h.

Referenced by analyze(), and GEMDAQStatusSource().

edm::EDGetToken GEMDAQStatusSource::tagOH_
private

Definition at line 78 of file GEMDAQStatusSource.h.

Referenced by analyze(), and GEMDAQStatusSource().

edm::EDGetToken GEMDAQStatusSource::tagVFAT_
private

Definition at line 77 of file GEMDAQStatusSource.h.

Referenced by analyze(), and GEMDAQStatusSource().