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 
22 
24 
33 
39 
43 
46 
47 #include "TH1F.h"
48 #include "TH2F.h"
49 #include "TProfile.h"
50 
51 // std
52 #include <cstdlib>
53 #include <string>
54 //#include <cmath>
55 //#include <numeric>
56 #include <algorithm>
57 
58 //
59 // ----- Constructor
60 //
62  monitorPedestals_ = iConfig.getParameter<bool>("MonitorSiStripPedestal");
63  monitorNoises_ = iConfig.getParameter<bool>("MonitorSiStripNoise");
64  monitorQuality_ = iConfig.getParameter<bool>("MonitorSiStripQuality");
65  monitorApvGains_ = iConfig.getParameter<bool>("MonitorSiStripApvGain");
66  monitorLorentzAngle_ = iConfig.getParameter<bool>("MonitorSiStripLorentzAngle");
67  monitorBackPlaneCorrection_ = iConfig.getParameter<bool>("MonitorSiStripBackPlaneCorrection");
68  monitorLowThreshold_ = iConfig.getParameter<bool>("MonitorSiStripLowThreshold");
69  monitorHighThreshold_ = iConfig.getParameter<bool>("MonitorSiStripHighThreshold");
70  monitorCabling_ = iConfig.getParameter<bool>("MonitorSiStripCabling");
71 }
72 // -----
73 
74 //
75 // ----- Destructor
76 //
78  if (monitorPedestals_) {
79  delete pedestalsDQM_;
80  }
81  if (monitorNoises_) {
82  delete noisesDQM_;
83  }
84  if (monitorQuality_) {
85  delete qualityDQM_;
86  }
87  if (monitorApvGains_) {
88  delete apvgainsDQM_;
89  }
91  delete lorentzangleDQM_;
92  }
94  delete bpcorrectionDQM_;
95  }
97  delete lowthresholdDQM_;
98  }
100  delete highthresholdDQM_;
101  }
102  if (monitorCabling_) {
103  delete cablingDQM_;
104  }
105 }
106 // -----
107 
108 //
109 // ----- beginRun
110 //
112  if (monitorPedestals_) {
113  pedestalsDQM_ = new SiStripPedestalsDQM(eSetup,
114  iRun,
115  conf_.getParameter<edm::ParameterSet>("SiStripPedestalsDQM_PSet"),
116  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
117  }
118 
119  if (monitorNoises_) {
120  noisesDQM_ = new SiStripNoisesDQM(eSetup,
121  iRun,
122  conf_.getParameter<edm::ParameterSet>("SiStripNoisesDQM_PSet"),
123  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
124  }
125 
126  if (monitorQuality_) {
127  qualityDQM_ = new SiStripQualityDQM(eSetup,
128  iRun,
129  conf_.getParameter<edm::ParameterSet>("SiStripQualityDQM_PSet"),
130  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
131  }
132 
133  if (monitorApvGains_) {
134  apvgainsDQM_ = new SiStripApvGainsDQM(eSetup,
135  iRun,
136  conf_.getParameter<edm::ParameterSet>("SiStripApvGainsDQM_PSet"),
137  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
138  }
139 
140  if (monitorLorentzAngle_) {
142  iRun,
143  conf_.getParameter<edm::ParameterSet>("SiStripLorentzAngleDQM_PSet"),
144  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
145  }
146 
150  iRun,
151  conf_.getParameter<edm::ParameterSet>("SiStripBackPlaneCorrectionDQM_PSet"),
152  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
153  }
154 
155  if (monitorLowThreshold_) {
157  iRun,
158  conf_.getParameter<edm::ParameterSet>("SiStripLowThresholdDQM_PSet"),
159  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
160  }
161 
162  if (monitorHighThreshold_) {
164  iRun,
165  conf_.getParameter<edm::ParameterSet>("SiStripHighThresholdDQM_PSet"),
166  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
167  }
168 
169  if (monitorCabling_) {
170  cablingDQM_ = new SiStripCablingDQM(eSetup,
171  iRun,
172  conf_.getParameter<edm::ParameterSet>("SiStripCablingDQM_PSet"),
173  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
174  }
175 } // beginRun
176 // -----
177 
178 //
179 // ----- beginJob
180 //
182 
183 //
184 // ----- getModuleMEsOnDemand
185 //
186 void SiStripClassToMonitorCondData::getModMEsOnDemand(edm::EventSetup const &eSetup, uint32_t requestedDetId) {
187  if (monitorPedestals_) {
188  pedestalsDQM_->analysisOnDemand(eSetup, requestedDetId);
189  }
190  if (monitorNoises_) {
191  noisesDQM_->analysisOnDemand(eSetup, requestedDetId);
192  }
193  if (monitorQuality_) {
194  qualityDQM_->analysisOnDemand(eSetup, requestedDetId);
196  } // fillGrand. for SiStripquality
197  if (monitorApvGains_) {
198  apvgainsDQM_->analysisOnDemand(eSetup, requestedDetId);
199  }
200  if (monitorLorentzAngle_) {
201  lorentzangleDQM_->analysisOnDemand(eSetup, requestedDetId);
202  }
204  bpcorrectionDQM_->analysisOnDemand(eSetup, requestedDetId);
205  }
206  if (monitorCabling_) {
207  cablingDQM_->analysisOnDemand(eSetup, requestedDetId);
208  }
209  if (monitorLowThreshold_) {
210  lowthresholdDQM_->analysisOnDemand(eSetup, requestedDetId);
211  }
212  if (monitorHighThreshold_) {
213  highthresholdDQM_->analysisOnDemand(eSetup, requestedDetId);
214  }
215 }
216 // -----
217 
218 //
219 // ----- getlayerMEsOnDemand
220 //
222  std::string requestedSubDetector,
223  uint32_t requestedSide,
224  uint32_t requestedLayer) {
225  if (monitorPedestals_) {
226  pedestalsDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
227  }
228  if (monitorNoises_) {
229  noisesDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
230  }
231  if (monitorQuality_) {
232  qualityDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
234  }
235  if (monitorApvGains_) {
236  apvgainsDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
237  }
238  if (monitorLorentzAngle_) {
239  lorentzangleDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
240  }
242  bpcorrectionDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
243  }
244  if (monitorCabling_) {
245  cablingDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
246  }
247  if (monitorLowThreshold_) {
248  lowthresholdDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
249  }
250  if (monitorHighThreshold_) {
251  highthresholdDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
252  }
253 }
254 
255 //
256 // ----- Analyze
257 //
259  if (monitorPedestals_) {
260  pedestalsDQM_->analysis(eSetup);
261  }
262  if (monitorNoises_) {
263  noisesDQM_->analysis(eSetup);
264  }
265  if (monitorQuality_) {
266  qualityDQM_->analysis(eSetup);
268  } // fillGrand. for SiStripquality
269  if (monitorApvGains_) {
270  apvgainsDQM_->analysis(eSetup);
271  }
272  if (monitorLorentzAngle_) {
273  lorentzangleDQM_->analysis(eSetup);
274  }
276  bpcorrectionDQM_->analysis(eSetup);
277  }
278  if (monitorCabling_) {
279  cablingDQM_->analysis(eSetup);
280  }
281  if (monitorLowThreshold_) {
282  lowthresholdDQM_->analysis(eSetup);
283  }
284  if (monitorHighThreshold_) {
285  highthresholdDQM_->analysis(eSetup);
286  }
287 
288 } // analyze
289 // -----
290 
291 //
292 // ----- endRun
293 //
295  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
297 
298  DQMStore *dqmStore_ = edm::Service<DQMStore>().operator->();
299 
300  if (outputMEsInRootFile) {
301  dqmStore_->showDirStructure();
302  dqmStore_->save(outputFileName);
303  }
304 
305 } // endRun
306 // -----
307 
308 //
309 // ----- endJob
310 //
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