CMS 3D CMS Logo

DTBlockedROChannelsTest.h
Go to the documentation of this file.
1 #ifndef DTMonitorModule_DTBlockedROChannelsTest_H
2 #define DTMonitorModule_DTBlockedROChannelsTest_H
3 
19 
20 class DQMStore;
21 class MonitorElement;
22 class DTReadOutMapping;
24 
26 
27  public:
28 
31 
33  ~DTBlockedROChannelsTest() override;
34 
35  protected:
36 
38  void beginRun(const edm::Run& , const edm::EventSetup&) override;
39 
40  void fillChamberMap( DQMStore::IGetter & igetter, const edm::EventSetup& c);
41 
42 
45 
48  void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
49 
50 private:
51  int readOutToGeometry(int dduId, int rosNumber, int robNumber, int& wheel, int &station, int& sector);
52 
53  int theDDU(int crate, int slot, int link, bool tenDDU);
54  int theROS(int slot, int link);
55  int theROB(int slot, int link);
56 
57  //Number of onUpdates
58  int nupdates;
59 
60  // prescale on the # of LS to update the test
63  bool checkUros;
64  int nevents;
66  unsigned int nLumiSegs;
67  unsigned int prevNLumiSegs;
68  double prevTotalPerc;
69 
70  int run;
71 
73 
74 
75  // Monitor Elements
76  std::map<int, MonitorElement*> wheelHistos;
78 
79  std::map<int, double> resultsPerLumi;
81 
82 
83  class DTRobBinsMap {
84  public:
85  DTRobBinsMap(DQMStore::IGetter & igetter,const int fed, const int ros);
86 
87  DTRobBinsMap();
88 
89 
90  ~DTRobBinsMap();
91 
92  // add a rob to the set of robs
93  void addRobBin(int robBin);
94  void init(bool v) {init_ = v;}
95 
96  bool robChanged(int robBin);
97 
99 
100  void readNewValues(DQMStore::IGetter & igetter);
101 
102  private:
103  int getValueRobBin(int robBin) const;
104  int getValueRos() const;
105 
106  int rosBin;
107  bool init_;
108 
109  std::map<int, int> robsAndValues;
110  int rosValue;
111 
114 
117  };
118 
119  std::map<DTChamberId, DTRobBinsMap> chamberMap;
120 
121  // For uROS starting in Year 2018
123  public:
124  DTLinkBinsMap(DQMStore::IGetter & igetter,const int fed, const int mapSlot);
125 
126  DTLinkBinsMap();
127 
128  ~DTLinkBinsMap();
129 
130  // add a rob to the set of robs
131  void addLinkBin(int linkBin);
132  void init(bool v) {init_ = v;}
133 
134  bool linkChanged(int linkBin);
135 
137 
138  void readNewValues(DQMStore::IGetter & igetter);
139 
140  private:
141  int getValueLinkBin(int linkBin) const;
142 
143  bool init_;
144 
145  std::map<int, int> linksAndValues;
146 
148 
150  };
151 
152  std::map<DTChamberId, DTLinkBinsMap> chamberMapUros;
153 
154 
155 
156 };
157 
158 #endif
int theROB(int slot, int link)
DTTimeEvolutionHisto * hSystFractionVsLS
std::map< DTChamberId, DTLinkBinsMap > chamberMapUros
std::map< int, MonitorElement * > wheelHistos
void performClientDiagnostic(DQMStore::IGetter &igetter)
DQM Client operations.
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic in online mode.
std::map< DTChamberId, DTRobBinsMap > chamberMap
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
std::map< int, double > resultsPerLumi
int theROS(int slot, int link)
void fillChamberMap(DQMStore::IGetter &igetter, const edm::EventSetup &c)
DTBlockedROChannelsTest(const edm::ParameterSet &ps)
Constructor.
edm::ESHandle< DTReadOutMapping > mapping
void readNewValues(DQMStore::IGetter &igetter)
int theDDU(int crate, int slot, int link, bool tenDDU)
int readOutToGeometry(int dduId, int rosNumber, int robNumber, int &wheel, int &station, int &sector)
void beginRun(const edm::Run &, const edm::EventSetup &) override
BeginRun.
~DTBlockedROChannelsTest() override
Destructor.
double getChamberPercentage(DQMStore::IGetter &)
Definition: Run.h:44