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 
9 
16 
18 
24 
25 
27 
36 
42 
46 
49 
50 #include "TH1F.h"
51 #include "TH2F.h"
52 #include "TProfile.h"
53 
54 // std
55 #include <cstdlib>
56 #include <string>
57 //#include <cmath>
58 //#include <numeric>
59 #include <algorithm>
60 
61 
62 //
63 // ----- Constructor
64 //
66 
67  monitorPedestals_ = iConfig.getParameter<bool>("MonitorSiStripPedestal");
68  monitorNoises_ = iConfig.getParameter<bool>("MonitorSiStripNoise");
69  monitorQuality_ = iConfig.getParameter<bool>("MonitorSiStripQuality");
70  monitorApvGains_ = iConfig.getParameter<bool>("MonitorSiStripApvGain");
71  monitorLorentzAngle_ = iConfig.getParameter<bool>("MonitorSiStripLorentzAngle");
72  monitorBackPlaneCorrection_ = iConfig.getParameter<bool>("MonitorSiStripBackPlaneCorrection");
73  monitorLowThreshold_ = iConfig.getParameter<bool>("MonitorSiStripLowThreshold");
74  monitorHighThreshold_ = iConfig.getParameter<bool>("MonitorSiStripHighThreshold");
75  monitorCabling_ = iConfig.getParameter<bool>("MonitorSiStripCabling");
76 
77 }
78 // -----
79 
80 
81 
82 //
83 // ----- Destructor
84 //
86 
87  if(monitorPedestals_) { delete pedestalsDQM_;}
88  if(monitorNoises_) { delete noisesDQM_; }
89  if(monitorQuality_) { delete qualityDQM_; }
90  if(monitorApvGains_) { delete apvgainsDQM_; }
95  if(monitorCabling_) { delete cablingDQM_;}
96 
97 }
98 // -----
99 
100 
101 
102 
103 //
104 // ----- beginRun
105 //
107 
108  if(monitorPedestals_){
109  pedestalsDQM_ = new SiStripPedestalsDQM(eSetup,
110  iRun,
111  conf_.getParameter<edm::ParameterSet>("SiStripPedestalsDQM_PSet"),
112  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
113  }
114 
115 
116  if(monitorNoises_){
117  noisesDQM_ = new SiStripNoisesDQM(eSetup,
118  iRun,
119  conf_.getParameter<edm::ParameterSet>("SiStripNoisesDQM_PSet"),
120  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
121  }
122 
123 
124  if(monitorQuality_){
125  qualityDQM_ = new SiStripQualityDQM(eSetup,
126  iRun,
127  conf_.getParameter<edm::ParameterSet>("SiStripQualityDQM_PSet"),
128  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
129  }
130 
131 
132  if(monitorApvGains_){
133  apvgainsDQM_ = new SiStripApvGainsDQM(eSetup,
134  iRun,
135  conf_.getParameter<edm::ParameterSet>("SiStripApvGainsDQM_PSet"),
136  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
137  }
138 
141  iRun,
142  conf_.getParameter<edm::ParameterSet>("SiStripLorentzAngleDQM_PSet"),
143  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
144  }
145 
148  iRun,
149  conf_.getParameter<edm::ParameterSet>("SiStripBackPlaneCorrectionDQM_PSet"),
150  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
151  }
152 
155  iRun,
156  conf_.getParameter<edm::ParameterSet>("SiStripLowThresholdDQM_PSet"),
157  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
158  }
159 
162  iRun,
163  conf_.getParameter<edm::ParameterSet>("SiStripHighThresholdDQM_PSet"),
164  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
165  }
166 
167  if(monitorCabling_){
168  cablingDQM_ = new SiStripCablingDQM(eSetup,
169  iRun,
170  conf_.getParameter<edm::ParameterSet>("SiStripCablingDQM_PSet"),
171  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
172  }
173 } // beginRun
174 // -----
175 
176 
177 
178 //
179 // ----- beginJob
180 //
182 
183 
184 //
185 // ----- getModuleMEsOnDemand
186 //
187 void SiStripClassToMonitorCondData::getModMEsOnDemand(edm::EventSetup const& eSetup, uint32_t requestedDetId){
188 
189  if(monitorPedestals_) { pedestalsDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
190  if(monitorNoises_) { noisesDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
191  if(monitorQuality_) { qualityDQM_ ->analysisOnDemand(eSetup,requestedDetId);
192  qualityDQM_ ->fillGrandSummaryMEs(eSetup) ;}//fillGrand. for SiStripquality
193  if(monitorApvGains_) { apvgainsDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
194  if(monitorLorentzAngle_) { lorentzangleDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
195  if(monitorBackPlaneCorrection_) { bpcorrectionDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
196  if(monitorCabling_) { cablingDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
197  if(monitorLowThreshold_) { lowthresholdDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
198  if(monitorHighThreshold_) { highthresholdDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
199 }
200 // -----
201 
202 //
203 // ----- getlayerMEsOnDemand
204 //
206  uint32_t requestedSide,
207  uint32_t requestedLayer){
208 
209  if(monitorPedestals_) { pedestalsDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
210  if(monitorNoises_) { noisesDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
211  if(monitorQuality_) { qualityDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);
212  qualityDQM_ ->fillGrandSummaryMEs(eSetup);}
213  if(monitorApvGains_) { apvgainsDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
214  if(monitorLorentzAngle_) { lorentzangleDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
215  if(monitorBackPlaneCorrection_) { bpcorrectionDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
216  if(monitorCabling_) { cablingDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
217  if(monitorLowThreshold_) { lowthresholdDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
218  if(monitorHighThreshold_) { highthresholdDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
219 
220 }
221 
222 //
223 // ----- Analyze
224 //
226 
227  if(monitorPedestals_) { pedestalsDQM_ ->analysis(eSetup);}
228  if(monitorNoises_) { noisesDQM_ ->analysis(eSetup);}
229  if(monitorQuality_) { qualityDQM_ ->analysis(eSetup); qualityDQM_->fillGrandSummaryMEs(eSetup);}//fillGrand. for SiStripquality
230  if(monitorApvGains_) { apvgainsDQM_ ->analysis(eSetup);}
233  if(monitorCabling_) { cablingDQM_ ->analysis(eSetup);}
236 
237 } // analyze
238 // -----
239 
240 
241 
242 //
243 // ----- endRun
244 //
246 
247  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
249 
250  DQMStore* dqmStore_=edm::Service<DQMStore>().operator->();
251 
252  if (outputMEsInRootFile) {
253  dqmStore_->showDirStructure();
254  dqmStore_->save(outputFileName);
255  }
256 
257 } // endRun
258 // -----
259 
260 
261 //
262 // ----- endJob
263 //
265 
266 
267 
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