CMS 3D CMS Logo

GEMDAQStatusSource.h
Go to the documentation of this file.
1 #ifndef DQM_GEM_INTERFACE_GEMDAQStatusSource_h
2 #define DQM_GEM_INTERFACE_GEMDAQStatusSource_h
3 
12 
16 
18 
26 
28 
29 #include <string>
30 
31 //----------------------------------------------------------------------------------------------------
32 
34 public:
35  explicit GEMDAQStatusSource(const edm::ParameterSet &cfg);
36  ~GEMDAQStatusSource() override{};
37  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
38 
39 protected:
40  void LoadROMap(edm::EventSetup const &iSetup);
41 
42  void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override{};
43  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
44  void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override;
45 
46  void FillWithRiseErr(MonitorElement *h, Int_t nX, Int_t nY, Bool_t &bErr) {
47  h->Fill(nX, nY);
48  bErr = true;
49  };
50 
51  void FillStatusSummaryPlot(std::map<ME5IdsKey, bool> &mapChamber,
52  MonitorElement *h2Plot,
53  std::map<ME5IdsKey, bool> *pmapSummary = nullptr) {
54  for (auto const &[key5, bFlag] : mapChamber) { // bFlag is not used
55  ME4IdsKey key4 = key5Tokey4(key5);
56  Int_t nChamber = keyToChamber(key5);
57  h2Plot->Fill(nChamber, mapStationToIdx_[key4]);
58  if (pmapSummary != nullptr)
59  (*pmapSummary)[key5] = true;
60  }
61  };
62 
63 private:
64  int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key) override;
65  int ProcessWithMEMap5WithChamber(BookingHelper &bh, ME5IdsKey key) override;
66 
67  void SetLabelAMC13Status(MonitorElement *h2Status);
68  void SetLabelAMCStatus(MonitorElement *h2Status);
69  void SetLabelOHStatus(MonitorElement *h2Status);
70  void SetLabelVFATStatus(MonitorElement *h2Status);
71 
73 
78 
80 
82 
85 
89 
100 
102 
103  Bool_t bFillAMC_;
104 
105  Int_t nBXMin_, nBXMax_;
106 
107  std::map<UInt_t, int> mapFEDIdToRe_;
108  std::map<UInt_t, int> mapFEDIdToSt_;
109  std::map<UInt_t, int> mapFEDIdToPosition_;
110  std::map<UInt_t, MonitorElement *> mapFEDIdToAMCStatus_;
111  std::map<int, std::vector<GEMDetId>> mapAMC13ToListChamber_;
112  std::map<std::tuple<int, int>, std::vector<GEMDetId>> mapAMCToListChamber_;
113  Int_t nAMCSlots_;
114  Bool_t useDBEMap_;
115 
116  int nBitAMC13_ = 10;
117  int nBitAMC_ = 12;
118  int nBitOH_ = 18;
119  int nBitVFAT_ = 8;
120 };
121 
122 #endif // DQM_GEM_INTERFACE_GEMDAQStatusSource_h
void FillStatusSummaryPlot(std::map< ME5IdsKey, bool > &mapChamber, MonitorElement *h2Plot, std::map< ME5IdsKey, bool > *pmapSummary=nullptr)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MEMapInfT< MEMap4Ids, ME4IdsKey > MEMap4Inf
Definition: GEMDQMBase.h:475
GEMDAQStatusSource(const edm::ParameterSet &cfg)
std::tuple< Int_t, Int_t, Int_t, Int_t, Int_t > ME5IdsKey
void FillWithRiseErr(MonitorElement *h, Int_t nX, Int_t nY, Bool_t &bErr)
edm::EDGetToken tagAMC13_
MonitorElement * h2SummaryStatusAMCWarning
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
MonitorElement * h2AMC13Status_
MonitorElement * h2SummaryStatusAMCError
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
std::map< UInt_t, int > mapFEDIdToRe_
std::map< UInt_t, int > mapFEDIdToSt_
std::map< std::tuple< int, int >, std::vector< GEMDetId > > mapAMCToListChamber_
int ProcessWithMEMap5WithChamber(BookingHelper &bh, ME5IdsKey key) override
MEMap4Inf mapStatusErrVFATPerLayer_
edm::EDGetToken tagVFAT_
MonitorElement * h2SummaryStatusVFATError
const edm::ESGetToken< GEMChMap, GEMChMapRcd > gemChMapToken_
void Fill(long long x)
std::map< UInt_t, MonitorElement * > mapFEDIdToAMCStatus_
int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetToken tagOH_
MonitorElement * h2SummaryStatusError
void SetLabelAMCStatus(MonitorElement *h2Status)
void LoadROMap(edm::EventSetup const &iSetup)
std::map< UInt_t, int > mapFEDIdToPosition_
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
key
prepare the HTCondor submission files and eventually submit them
std::map< ME4IdsKey, int > mapStationToIdx_
Definition: GEMDQMBase.h:635
void SetLabelAMC13Status(MonitorElement *h2Status)
std::map< int, std::vector< GEMDetId > > mapAMC13ToListChamber_
MonitorElement * h2SummaryStatusVFATWarning
~GEMDAQStatusSource() override
MonitorElement * h2SummaryStatusAll
void SetLabelVFATStatus(MonitorElement *h2Status)
int keyToChamber(ME4IdsKey key)
Definition: GEMDQMBase.h:576
void SetLabelOHStatus(MonitorElement *h2Status)
MonitorElement * h2SummaryStatusOHWarning
MonitorElement * h2SummaryStatusAMC13Error
MEMap4Inf mapStatusWarnVFATPerLayer_
MonitorElement * h2SummaryStatusWarning
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
MonitorElement * h2SummaryStatusOHError
Definition: Run.h:45
ME4IdsKey key5Tokey4(ME5IdsKey key)
Definition: GEMDQMBase.h:591
edm::EDGetToken tagAMC_