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_->save(outputFileName);
302  }
303 
304 } // endRun
305 // -----
306 
307 //
308 // ----- endJob
309 //
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
Handle.h
SiStripClassToMonitorCondData::beginRun
void beginRun(edm::RunNumber_t iRun, edm::EventSetup const &eSetup)
Definition: SiStripClassToMonitorCondData.cc:111
MessageLogger.h
SiStripFolderOrganizer.h
SiStripHistoId.h
ESHandle.h
SiStripClassToMonitorCondData::SiStripClassToMonitorCondData
SiStripClassToMonitorCondData(edm::ParameterSet const &iConfig)
Definition: SiStripClassToMonitorCondData.cc:61
SiStripClassToMonitorCondData::qualityDQM_
SiStripQualityDQM * qualityDQM_
Definition: SiStripClassToMonitorCondData.h:79
SiStripBaseCondObjDQM::analysisOnDemand
void analysisOnDemand(const edm::EventSetup &eSetup_, uint32_t detIdOnDemand)
Definition: SiStripBaseCondObjDQM.cc:129
SiStripClassToMonitorCondData::monitorPedestals_
bool monitorPedestals_
Definition: SiStripClassToMonitorCondData.h:63
SiStripPedestalsDQM
Definition: SiStripPedestalsDQM.h:9
SiStripCablingDQM.h
SiStripApvGainsDQM
Definition: SiStripApvGainsDQM.h:11
SiStripBaseCondObjDQM::analysis
void analysis(const edm::EventSetup &eSetup_)
Definition: SiStripBaseCondObjDQM.cc:53
SiStripCablingDQM
Definition: SiStripCablingDQM.h:14
DQMStore.h
ExtractTObject.h
SiStripApvGainRcd.h
SiStripQualityDQM.h
SiStripNoises.h
SiStripClassToMonitorCondData::endJob
void endJob()
Definition: SiStripClassToMonitorCondData.cc:310
dqm::legacy::DQMStore
Definition: DQMStore.h:727
SiStripClassToMonitorCondData::endRun
void endRun(edm::EventSetup const &eSetup)
Definition: SiStripClassToMonitorCondData.cc:294
Service.h
SiStripLorentzAngleDQM.h
SiStripClassToMonitorCondData::beginJob
void beginJob()
Definition: SiStripClassToMonitorCondData.cc:181
SiStripPedestalsRcd.h
SiStripBackPlaneCorrectionDQM.h
SiStripClassToMonitorCondData::cablingDQM_
SiStripCablingDQM * cablingDQM_
Definition: SiStripClassToMonitorCondData.h:83
SiStripBackPlaneCorrectionDQM
Definition: SiStripBackPlaneCorrectionDQM.h:9
reco_skim_cfg_mod.outputFileName
outputFileName
Definition: reco_skim_cfg_mod.py:15
SiStripClassToMonitorCondData::getLayerMEsOnDemand
void getLayerMEsOnDemand(edm::EventSetup const &eSetup, std::string requestedSubDetector, uint32_t requestedSide, uint32_t requestedLayer)
Definition: SiStripClassToMonitorCondData.cc:221
SiStripClassToMonitorCondData::conf_
edm::ParameterSet conf_
Definition: SiStripClassToMonitorCondData.h:61
SiStripClassToMonitorCondData::lowthresholdDQM_
SiStripThresholdDQM * lowthresholdDQM_
Definition: SiStripClassToMonitorCondData.h:84
SiStripApvGain.h
SiStripClassToMonitorCondData::monitorBackPlaneCorrection_
bool monitorBackPlaneCorrection_
Definition: SiStripClassToMonitorCondData.h:68
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripThresholdDQM.h
edm::ParameterSet
Definition: ParameterSet.h:36
SiStripLorentzAngleDQM
Definition: SiStripLorentzAngleDQM.h:9
Event.h
SiStripClassToMonitorCondData::monitorNoises_
bool monitorNoises_
Definition: SiStripClassToMonitorCondData.h:64
SiStripBackPlaneCorrection.h
SiStripPedestalsDQM.h
edm::Service
Definition: Service.h:30
edm::EventSetup
Definition: EventSetup.h:57
SiStripClassToMonitorCondData::monitorLorentzAngle_
bool monitorLorentzAngle_
Definition: SiStripClassToMonitorCondData.h:67
SiStripClassToMonitorCondData::noisesDQM_
SiStripNoisesDQM * noisesDQM_
Definition: SiStripClassToMonitorCondData.h:78
SiStripClassToMonitorCondData::getModMEsOnDemand
void getModMEsOnDemand(edm::EventSetup const &eSetup, uint32_t requestedDetId)
Definition: SiStripClassToMonitorCondData.cc:186
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
SiStripClassToMonitorCondData::highthresholdDQM_
SiStripThresholdDQM * highthresholdDQM_
Definition: SiStripClassToMonitorCondData.h:85
SiStripClassToMonitorCondData::pedestalsDQM_
SiStripPedestalsDQM * pedestalsDQM_
Definition: SiStripClassToMonitorCondData.h:77
SiStripClassToMonitorCondData::monitorCabling_
bool monitorCabling_
Definition: SiStripClassToMonitorCondData.h:71
SiStripClassToMonitorCondData::lorentzangleDQM_
SiStripLorentzAngleDQM * lorentzangleDQM_
Definition: SiStripClassToMonitorCondData.h:81
SiStripApvGainsDQM.h
SiStripQuality.h
SiStripClassToMonitorCondData::analyseCondData
void analyseCondData(const edm::EventSetup &)
Definition: SiStripClassToMonitorCondData.cc:258
SiStripClassToMonitorCondData::monitorQuality_
bool monitorQuality_
Definition: SiStripClassToMonitorCondData.h:65
SiStripQualityRcd.h
SiStripPedestals.h
SiStripClassToMonitorCondData::monitorLowThreshold_
bool monitorLowThreshold_
Definition: SiStripClassToMonitorCondData.h:69
SiStripClassToMonitorCondData.h
EventSetup.h
SiStripClassToMonitorCondData::apvgainsDQM_
SiStripApvGainsDQM * apvgainsDQM_
Definition: SiStripClassToMonitorCondData.h:80
SiStripQualityDQM
Definition: SiStripQualityDQM.h:24
SiStripNoisesDQM.h
SiStripClassToMonitorCondData::monitorApvGains_
bool monitorApvGains_
Definition: SiStripClassToMonitorCondData.h:66
SiStripThresholdDQM
Definition: SiStripThresholdDQM.h:9
SiStripClassToMonitorCondData::bpcorrectionDQM_
SiStripBackPlaneCorrectionDQM * bpcorrectionDQM_
Definition: SiStripClassToMonitorCondData.h:82
SiStripNoisesRcd.h
SiStripQualityDQM::fillGrandSummaryMEs
void fillGrandSummaryMEs(const edm::EventSetup &eSetup)
Definition: SiStripQualityDQM.cc:182
ParameterSet.h
SiStripNoisesDQM
Definition: SiStripNoisesDQM.h:11
SiStripClassToMonitorCondData::~SiStripClassToMonitorCondData
~SiStripClassToMonitorCondData()
Definition: SiStripClassToMonitorCondData.cc:77
SiStripLorentzAngle.h
SiStripClassToMonitorCondData::monitorHighThreshold_
bool monitorHighThreshold_
Definition: SiStripClassToMonitorCondData.h:70