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 // -----
79 
80 //
81 // ----- beginRun
82 //
84  if (monitorPedestals_) {
86  std::make_unique<SiStripPedestalsDQM>(eSetup,
87  iRun,
88  conf_.getParameter<edm::ParameterSet>("SiStripPedestalsDQM_PSet"),
89  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
90  }
91 
92  if (monitorNoises_) {
93  noisesDQM_ = std::make_unique<SiStripNoisesDQM>(eSetup,
94  iRun,
95  conf_.getParameter<edm::ParameterSet>("SiStripNoisesDQM_PSet"),
96  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
97  }
98 
99  if (monitorQuality_) {
100  qualityDQM_ = std::make_unique<SiStripQualityDQM>(eSetup,
101  iRun,
102  conf_.getParameter<edm::ParameterSet>("SiStripQualityDQM_PSet"),
103  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
104  }
105 
106  if (monitorApvGains_) {
107  apvgainsDQM_ =
108  std::make_unique<SiStripApvGainsDQM>(eSetup,
109  iRun,
110  conf_.getParameter<edm::ParameterSet>("SiStripApvGainsDQM_PSet"),
111  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
112  }
113 
114  if (monitorLorentzAngle_) {
116  std::make_unique<SiStripLorentzAngleDQM>(eSetup,
117  iRun,
118  conf_.getParameter<edm::ParameterSet>("SiStripLorentzAngleDQM_PSet"),
119  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
120  }
121 
123  bpcorrectionDQM_ = std::make_unique<SiStripBackPlaneCorrectionDQM>(
124  eSetup,
125  iRun,
126  conf_.getParameter<edm::ParameterSet>("SiStripBackPlaneCorrectionDQM_PSet"),
127  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
128  }
129 
130  if (monitorLowThreshold_) {
132  std::make_unique<SiStripThresholdDQM>(eSetup,
133  iRun,
134  conf_.getParameter<edm::ParameterSet>("SiStripLowThresholdDQM_PSet"),
135  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
136  }
137 
138  if (monitorHighThreshold_) {
140  std::make_unique<SiStripThresholdDQM>(eSetup,
141  iRun,
142  conf_.getParameter<edm::ParameterSet>("SiStripHighThresholdDQM_PSet"),
143  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
144  }
145 
146  if (monitorCabling_) {
147  cablingDQM_ = std::make_unique<SiStripCablingDQM>(eSetup,
148  iRun,
149  conf_.getParameter<edm::ParameterSet>("SiStripCablingDQM_PSet"),
150  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
151  }
152 } // beginRun
153 // -----
154 
155 //
156 // ----- beginJob
157 //
159 
160 //
161 // ----- getModuleMEsOnDemand
162 //
163 void SiStripClassToMonitorCondData::getModMEsOnDemand(edm::EventSetup const &eSetup, uint32_t requestedDetId) {
164  if (monitorPedestals_) {
165  pedestalsDQM_->analysisOnDemand(eSetup, requestedDetId);
166  }
167  if (monitorNoises_) {
168  noisesDQM_->analysisOnDemand(eSetup, requestedDetId);
169  }
170  if (monitorQuality_) {
171  qualityDQM_->analysisOnDemand(eSetup, requestedDetId);
172  qualityDQM_->fillGrandSummaryMEs(eSetup);
173  } // fillGrand. for SiStripquality
174  if (monitorApvGains_) {
175  apvgainsDQM_->analysisOnDemand(eSetup, requestedDetId);
176  }
177  if (monitorLorentzAngle_) {
178  lorentzangleDQM_->analysisOnDemand(eSetup, requestedDetId);
179  }
181  bpcorrectionDQM_->analysisOnDemand(eSetup, requestedDetId);
182  }
183  if (monitorCabling_) {
184  cablingDQM_->analysisOnDemand(eSetup, requestedDetId);
185  }
186  if (monitorLowThreshold_) {
187  lowthresholdDQM_->analysisOnDemand(eSetup, requestedDetId);
188  }
189  if (monitorHighThreshold_) {
190  highthresholdDQM_->analysisOnDemand(eSetup, requestedDetId);
191  }
192 }
193 // -----
194 
195 //
196 // ----- getlayerMEsOnDemand
197 //
199  std::string requestedSubDetector,
200  uint32_t requestedSide,
201  uint32_t requestedLayer) {
202  if (monitorPedestals_) {
203  pedestalsDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
204  }
205  if (monitorNoises_) {
206  noisesDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
207  }
208  if (monitorQuality_) {
209  qualityDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
210  qualityDQM_->fillGrandSummaryMEs(eSetup);
211  }
212  if (monitorApvGains_) {
213  apvgainsDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
214  }
215  if (monitorLorentzAngle_) {
216  lorentzangleDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
217  }
219  bpcorrectionDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
220  }
221  if (monitorCabling_) {
222  cablingDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
223  }
224  if (monitorLowThreshold_) {
225  lowthresholdDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
226  }
227  if (monitorHighThreshold_) {
228  highthresholdDQM_->analysisOnDemand(eSetup, requestedSubDetector, requestedSide, requestedLayer);
229  }
230 }
231 
232 //
233 // ----- Analyze
234 //
236  if (monitorPedestals_) {
237  pedestalsDQM_->analysis(eSetup);
238  }
239  if (monitorNoises_) {
240  noisesDQM_->analysis(eSetup);
241  }
242  if (monitorQuality_) {
243  qualityDQM_->analysis(eSetup);
244  qualityDQM_->fillGrandSummaryMEs(eSetup);
245  } // fillGrand. for SiStripquality
246  if (monitorApvGains_) {
247  apvgainsDQM_->analysis(eSetup);
248  }
249  if (monitorLorentzAngle_) {
250  lorentzangleDQM_->analysis(eSetup);
251  }
253  bpcorrectionDQM_->analysis(eSetup);
254  }
255  if (monitorCabling_) {
256  cablingDQM_->analysis(eSetup);
257  }
258  if (monitorLowThreshold_) {
259  lowthresholdDQM_->analysis(eSetup);
260  }
261  if (monitorHighThreshold_) {
262  highthresholdDQM_->analysis(eSetup);
263  }
264 
265 } // analyze
266 // -----
267 
268 //
269 // ----- endRun
270 //
272  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
274 
275  DQMStore *dqmStore_ = edm::Service<DQMStore>().operator->();
276 
277  if (outputMEsInRootFile) {
278  dqmStore_->save(outputFileName);
279  }
280 
281 } // endRun
282 // -----
283 
284 //
285 // ----- endJob
286 //
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
SiStripClassToMonitorCondData::cablingDQM_
std::unique_ptr< SiStripCablingDQM > cablingDQM_
Definition: SiStripClassToMonitorCondData.h:83
Handle.h
SiStripClassToMonitorCondData::beginRun
void beginRun(edm::RunNumber_t iRun, edm::EventSetup const &eSetup)
Definition: SiStripClassToMonitorCondData.cc:83
MessageLogger.h
SiStripFolderOrganizer.h
SiStripHistoId.h
ESHandle.h
SiStripClassToMonitorCondData::SiStripClassToMonitorCondData
SiStripClassToMonitorCondData(edm::ParameterSet const &iConfig)
Definition: SiStripClassToMonitorCondData.cc:61
SiStripClassToMonitorCondData::monitorPedestals_
bool monitorPedestals_
Definition: SiStripClassToMonitorCondData.h:63
SiStripCablingDQM.h
DQMStore.h
ExtractTObject.h
SiStripApvGainRcd.h
SiStripQualityDQM.h
SiStripNoises.h
SiStripClassToMonitorCondData::endJob
void endJob()
Definition: SiStripClassToMonitorCondData.cc:287
SiStripClassToMonitorCondData::qualityDQM_
std::unique_ptr< SiStripQualityDQM > qualityDQM_
Definition: SiStripClassToMonitorCondData.h:79
dqm::legacy::DQMStore
Definition: DQMStore.h:727
SiStripClassToMonitorCondData::endRun
void endRun(edm::EventSetup const &eSetup)
Definition: SiStripClassToMonitorCondData.cc:271
Service.h
SiStripClassToMonitorCondData::noisesDQM_
std::unique_ptr< SiStripNoisesDQM > noisesDQM_
Definition: SiStripClassToMonitorCondData.h:78
SiStripLorentzAngleDQM.h
SiStripClassToMonitorCondData::beginJob
void beginJob()
Definition: SiStripClassToMonitorCondData.cc:158
SiStripPedestalsRcd.h
SiStripBackPlaneCorrectionDQM.h
SiStripClassToMonitorCondData::lowthresholdDQM_
std::unique_ptr< SiStripThresholdDQM > lowthresholdDQM_
Definition: SiStripClassToMonitorCondData.h:84
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:198
SiStripClassToMonitorCondData::conf_
edm::ParameterSet conf_
Definition: SiStripClassToMonitorCondData.h:61
SiStripApvGain.h
SiStripClassToMonitorCondData::monitorBackPlaneCorrection_
bool monitorBackPlaneCorrection_
Definition: SiStripClassToMonitorCondData.h:68
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripThresholdDQM.h
SiStripClassToMonitorCondData::highthresholdDQM_
std::unique_ptr< SiStripThresholdDQM > highthresholdDQM_
Definition: SiStripClassToMonitorCondData.h:85
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
SiStripClassToMonitorCondData::monitorNoises_
bool monitorNoises_
Definition: SiStripClassToMonitorCondData.h:64
SiStripBackPlaneCorrection.h
SiStripClassToMonitorCondData::pedestalsDQM_
std::unique_ptr< SiStripPedestalsDQM > pedestalsDQM_
Definition: SiStripClassToMonitorCondData.h:77
SiStripPedestalsDQM.h
edm::Service
Definition: Service.h:30
SiStripClassToMonitorCondData::bpcorrectionDQM_
std::unique_ptr< SiStripBackPlaneCorrectionDQM > bpcorrectionDQM_
Definition: SiStripClassToMonitorCondData.h:82
edm::EventSetup
Definition: EventSetup.h:57
SiStripClassToMonitorCondData::apvgainsDQM_
std::unique_ptr< SiStripApvGainsDQM > apvgainsDQM_
Definition: SiStripClassToMonitorCondData.h:80
SiStripClassToMonitorCondData::monitorLorentzAngle_
bool monitorLorentzAngle_
Definition: SiStripClassToMonitorCondData.h:67
SiStripClassToMonitorCondData::getModMEsOnDemand
void getModMEsOnDemand(edm::EventSetup const &eSetup, uint32_t requestedDetId)
Definition: SiStripClassToMonitorCondData.cc:163
SiStripClassToMonitorCondData::monitorCabling_
bool monitorCabling_
Definition: SiStripClassToMonitorCondData.h:71
SiStripApvGainsDQM.h
SiStripQuality.h
SiStripClassToMonitorCondData::analyseCondData
void analyseCondData(const edm::EventSetup &)
Definition: SiStripClassToMonitorCondData.cc:235
SiStripClassToMonitorCondData::monitorQuality_
bool monitorQuality_
Definition: SiStripClassToMonitorCondData.h:65
SiStripQualityRcd.h
SiStripPedestals.h
SiStripClassToMonitorCondData::monitorLowThreshold_
bool monitorLowThreshold_
Definition: SiStripClassToMonitorCondData.h:69
SiStripClassToMonitorCondData.h
EventSetup.h
SiStripNoisesDQM.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiStripClassToMonitorCondData::lorentzangleDQM_
std::unique_ptr< SiStripLorentzAngleDQM > lorentzangleDQM_
Definition: SiStripClassToMonitorCondData.h:81
SiStripClassToMonitorCondData::monitorApvGains_
bool monitorApvGains_
Definition: SiStripClassToMonitorCondData.h:66
SiStripNoisesRcd.h
ParameterSet.h
SiStripClassToMonitorCondData::~SiStripClassToMonitorCondData
~SiStripClassToMonitorCondData()
Definition: SiStripClassToMonitorCondData.cc:77
SiStripLorentzAngle.h
SiStripClassToMonitorCondData::monitorHighThreshold_
bool monitorHighThreshold_
Definition: SiStripClassToMonitorCondData.h:70