CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
27 
29 
30 #include <string>
31 
32 //----------------------------------------------------------------------------------------------------
33 
35 public:
36  explicit GEMDAQStatusSource(const edm::ParameterSet &cfg);
37  ~GEMDAQStatusSource() override{};
38  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
39 
40 protected:
41  void LoadROMap(edm::EventSetup const &iSetup);
42 
43  void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override{};
44  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
45  void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override;
46 
47  void FillWithRiseErr(MonitorElement *h, Int_t nX, Int_t nY, Bool_t &bErr) {
48  h->Fill(nX, nY);
49  bErr = true;
50  };
51 
52  void FillStatusSummaryPlot(std::map<ME4IdsKey, bool> &mapChamber,
53  MonitorElement *h2Plot,
54  std::map<ME4IdsKey, bool> *pmapSummary = nullptr) {
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  };
63 
64 private:
65  int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) override;
66  int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key) override;
67 
68  void SetLabelAMC13Status(MonitorElement *h2Status);
69  void SetLabelAMCStatus(MonitorElement *h2Status);
70  void SetLabelOHStatus(MonitorElement *h2Status);
71  void SetLabelVFATStatus(MonitorElement *h2Status);
72 
74  //std::shared_ptr<GEMROMapping> gemROMap_;
75  const GEMeMap *gemEMap_;
76 
81 
85 
88 
92 
103 
104  Int_t nBXMin_, nBXMax_;
105 
106  std::map<UInt_t, int> mapFEDIdToRe_;
107  std::map<int, std::vector<GEMDetId>> mapAMC13ToListChamber_;
108  std::map<std::tuple<int, int>, std::vector<GEMDetId>> mapAMCToListChamber_;
109  Int_t nAMCSlots_;
110 
111  int nBitAMC13_ = 10;
112  int nBitAMC_ = 12;
113  int nBitOH_ = 17;
114  int nBitVFAT_ = 7;
115 };
116 
117 #endif // DQM_GEM_INTERFACE_GEMDAQStatusSource_h
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key) override
GEMDAQStatusSource(const edm::ParameterSet &cfg)
tuple cfg
Definition: looper.py:296
void FillWithRiseErr(MonitorElement *h, Int_t nX, Int_t nY, Bool_t &bErr)
edm::EDGetToken tagAMC13_
MonitorElement * h2SummaryStatusAMCWarning
MonitorElement * h2AMCStatusNeg_
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
Definition: GEMDQMBase.h:456
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
MonitorElement * h2AMC13Status_
MonitorElement * h2SummaryStatusAMCError
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
edm::ESGetToken< GEMeMap, GEMeMapRcd > gemEMapToken_
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
edm::EDGetToken tagVFAT_
MonitorElement * h2SummaryStatusVFATError
void Fill(long long x)
MEMap3Inf mapStatusWarnVFATPerLayer_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetToken tagOH_
MonitorElement * h2SummaryStatusError
const GEMeMap * gemEMap_
MEMap3Inf mapStatusErrVFATPerLayer_
void SetLabelAMCStatus(MonitorElement *h2Status)
void LoadROMap(edm::EventSetup const &iSetup)
tuple key
prepare the HTCondor submission files and eventually submit them
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
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:520
void SetLabelOHStatus(MonitorElement *h2Status)
MonitorElement * h2SummaryStatusOHWarning
ME3IdsKey key4Tokey3(ME4IdsKey key)
Definition: GEMDQMBase.h:529
MonitorElement * h2SummaryStatusAMC13Error
int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) override
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)
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
MonitorElement * h2AMCStatusPos_
edm::EDGetToken tagAMC_