CMS 3D CMS Logo

SiStripClassToMonitorCondData.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiStripMonitorSummary
4 // Class : SiStripClassToMonitorCondData
5 //
6 // Original Author: Evelyne Delmeire
7 //
8 
15 
17 
23 
25 
34 
40 
44 
47 
48 #include "TH1F.h"
49 #include "TH2F.h"
50 #include "TProfile.h"
51 
52 // std
53 #include <cstdlib>
54 #include <string>
55 //#include <cmath>
56 //#include <numeric>
57 #include <algorithm>
58 
59 //
60 // ----- Constructor
61 //
63  monitorPedestals_ = iConfig.getParameter<bool>("MonitorSiStripPedestal");
64  monitorNoises_ = iConfig.getParameter<bool>("MonitorSiStripNoise");
65  monitorQuality_ = iConfig.getParameter<bool>("MonitorSiStripQuality");
66  monitorApvGains_ = iConfig.getParameter<bool>("MonitorSiStripApvGain");
67  monitorLorentzAngle_ = iConfig.getParameter<bool>("MonitorSiStripLorentzAngle");
68  monitorBackPlaneCorrection_ = iConfig.getParameter<bool>("MonitorSiStripBackPlaneCorrection");
69  monitorLowThreshold_ = iConfig.getParameter<bool>("MonitorSiStripLowThreshold");
70  monitorHighThreshold_ = iConfig.getParameter<bool>("MonitorSiStripHighThreshold");
71  monitorCabling_ = iConfig.getParameter<bool>("MonitorSiStripCabling");
72 }
73 // -----
74 
75 //
76 // ----- Destructor
77 //
79  if (monitorPedestals_) {
80  delete pedestalsDQM_;
81  }
82  if (monitorNoises_) {
83  delete noisesDQM_;
84  }
85  if (monitorQuality_) {
86  delete qualityDQM_;
87  }
88  if (monitorApvGains_) {
89  delete apvgainsDQM_;
90  }
92  delete lorentzangleDQM_;
93  }
95  delete bpcorrectionDQM_;
96  }
98  delete lowthresholdDQM_;
99  }
100  if (monitorHighThreshold_) {
101  delete highthresholdDQM_;
102  }
103  if (monitorCabling_) {
104  delete cablingDQM_;
105  }
106 }
107 // -----
108 
109 //
110 // ----- beginRun
111 //
113  if (monitorPedestals_) {
114  pedestalsDQM_ = new SiStripPedestalsDQM(eSetup,
115  iRun,
116  conf_.getParameter<edm::ParameterSet>("SiStripPedestalsDQM_PSet"),
117  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
118  }
119 
120  if (monitorNoises_) {
121  noisesDQM_ = new SiStripNoisesDQM(eSetup,
122  iRun,
123  conf_.getParameter<edm::ParameterSet>("SiStripNoisesDQM_PSet"),
124  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
125  }
126 
127  if (monitorQuality_) {
128  qualityDQM_ = new SiStripQualityDQM(eSetup,
129  iRun,
130  conf_.getParameter<edm::ParameterSet>("SiStripQualityDQM_PSet"),
131  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
132  }
133 
134  if (monitorApvGains_) {
135  apvgainsDQM_ = new SiStripApvGainsDQM(eSetup,
136  iRun,
137  conf_.getParameter<edm::ParameterSet>("SiStripApvGainsDQM_PSet"),
138  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
139  }
140 
141  if (monitorLorentzAngle_) {
143  iRun,
144  conf_.getParameter<edm::ParameterSet>("SiStripLorentzAngleDQM_PSet"),
145  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
146  }
147 
151  iRun,
152  conf_.getParameter<edm::ParameterSet>("SiStripBackPlaneCorrectionDQM_PSet"),
153  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
154  }
155 
156  if (monitorLowThreshold_) {
158  iRun,
159  conf_.getParameter<edm::ParameterSet>("SiStripLowThresholdDQM_PSet"),
160  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
161  }
162 
163  if (monitorHighThreshold_) {
165  iRun,
166  conf_.getParameter<edm::ParameterSet>("SiStripHighThresholdDQM_PSet"),
167  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
168  }
169 
170  if (monitorCabling_) {
171  cablingDQM_ = new SiStripCablingDQM(eSetup,
172  iRun,
173  conf_.getParameter<edm::ParameterSet>("SiStripCablingDQM_PSet"),
174  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
175  }
176 } // beginRun
177 // -----
178 
179 //
180 // ----- beginJob
181 //
183 
184 //
185 // ----- getModuleMEsOnDemand
186 //
187 void SiStripClassToMonitorCondData::getModMEsOnDemand(edm::EventSetup const &eSetup, uint32_t requestedDetId) {
188  if (monitorPedestals_) {
189  pedestalsDQM_->analysisOnDemand(eSetup, requestedDetId);
190  }
191  if (monitorNoises_) {
192  noisesDQM_->analysisOnDemand(eSetup, requestedDetId);
193  }
194  if (monitorQuality_) {
195  qualityDQM_->analysisOnDemand(eSetup, requestedDetId);
197  } // fillGrand. for SiStripquality
198  if (monitorApvGains_) {
199  apvgainsDQM_->analysisOnDemand(eSetup, requestedDetId);
200  }
201  if (monitorLorentzAngle_) {
202  lorentzangleDQM_->analysisOnDemand(eSetup, requestedDetId);
203  }
205  bpcorrectionDQM_->analysisOnDemand(eSetup, requestedDetId);
206  }
207  if (monitorCabling_) {
208  cablingDQM_->analysisOnDemand(eSetup, requestedDetId);
209  }
210  if (monitorLowThreshold_) {
211  lowthresholdDQM_->analysisOnDemand(eSetup, requestedDetId);
212  }
213  if (monitorHighThreshold_) {
214  highthresholdDQM_->analysisOnDemand(eSetup, requestedDetId);
215  }
216 }
217 // -----
218 
219 //
220 // ----- getlayerMEsOnDemand
221 //
223  std::string requestedSubDetector,
224  uint32_t requestedSide,
225  uint32_t requestedLayer) {
226  if (monitorPedestals_) {
227  pedestalsDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
228  }
229  if (monitorNoises_) {
230  noisesDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
231  }
232  if (monitorQuality_) {
233  qualityDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
235  }
236  if (monitorApvGains_) {
237  apvgainsDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
238  }
239  if (monitorLorentzAngle_) {
240  lorentzangleDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
241  }
243  bpcorrectionDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
244  }
245  if (monitorCabling_) {
246  cablingDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
247  }
248  if (monitorLowThreshold_) {
249  lowthresholdDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
250  }
251  if (monitorHighThreshold_) {
252  highthresholdDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
253  }
254 }
255 
256 //
257 // ----- Analyze
258 //
260  if (monitorPedestals_) {
261  pedestalsDQM_->analysis(eSetup);
262  }
263  if (monitorNoises_) {
264  noisesDQM_->analysis(eSetup);
265  }
266  if (monitorQuality_) {
267  qualityDQM_->analysis(eSetup);
269  } // fillGrand. for SiStripquality
270  if (monitorApvGains_) {
271  apvgainsDQM_->analysis(eSetup);
272  }
273  if (monitorLorentzAngle_) {
274  lorentzangleDQM_->analysis(eSetup);
275  }
277  bpcorrectionDQM_->analysis(eSetup);
278  }
279  if (monitorCabling_) {
280  cablingDQM_->analysis(eSetup);
281  }
282  if (monitorLowThreshold_) {
283  lowthresholdDQM_->analysis(eSetup);
284  }
285  if (monitorHighThreshold_) {
286  highthresholdDQM_->analysis(eSetup);
287  }
288 
289 } // analyze
290 // -----
291 
292 //
293 // ----- endRun
294 //
296  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
298 
299  DQMStore *dqmStore_ = edm::Service<DQMStore>().operator->();
300 
301  if (outputMEsInRootFile) {
302  dqmStore_->showDirStructure();
303  dqmStore_->save(outputFileName);
304  }
305 
306 } // endRun
307 // -----
308 
309 //
310 // ----- endJob
311 //
T getParameter(std::string const &) const
void fillGrandSummaryMEs(const edm::EventSetup &eSetup)
SiStripClassToMonitorCondData(edm::ParameterSet const &iConfig)
void beginRun(edm::RunNumber_t iRun, edm::EventSetup const &eSetup)
void getLayerMEsOnDemand(edm::EventSetup const &eSetup, std::string requestedSubDetector, uint32_t requestedSide, uint32_t requestedLayer)
void endRun(edm::EventSetup const &eSetup)
void analysisOnDemand(const edm::EventSetup &eSetup_, uint32_t detIdOnDemand)
void getModMEsOnDemand(edm::EventSetup const &eSetup, uint32_t requestedDetId)
void analysis(const edm::EventSetup &eSetup_)
SiStripBackPlaneCorrectionDQM * bpcorrectionDQM_
void analyseCondData(const edm::EventSetup &)
unsigned int RunNumber_t