CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
19 
25 
26 
28 
37 
43 
47 
50 
51 #include "TH1F.h"
52 #include "TH2F.h"
53 #include "TProfile.h"
54 
55 // std
56 #include <cstdlib>
57 #include <string>
58 //#include <cmath>
59 //#include <numeric>
60 #include <algorithm>
61 
62 
63 //
64 // ----- Constructor
65 //
67 
68  monitorPedestals_ = iConfig.getParameter<bool>("MonitorSiStripPedestal");
69  monitorNoises_ = iConfig.getParameter<bool>("MonitorSiStripNoise");
70  monitorQuality_ = iConfig.getParameter<bool>("MonitorSiStripQuality");
71  monitorApvGains_ = iConfig.getParameter<bool>("MonitorSiStripApvGain");
72  monitorLorentzAngle_ = iConfig.getParameter<bool>("MonitorSiStripLorentzAngle");
73  monitorBackPlaneCorrection_ = iConfig.getParameter<bool>("MonitorSiStripBackPlaneCorrection");
74  monitorLowThreshold_ = iConfig.getParameter<bool>("MonitorSiStripLowThreshold");
75  monitorHighThreshold_ = iConfig.getParameter<bool>("MonitorSiStripHighThreshold");
76  monitorCabling_ = iConfig.getParameter<bool>("MonitorSiStripCabling");
77 
78 }
79 // -----
80 
81 
82 
83 //
84 // ----- Destructor
85 //
87 
88  if(monitorPedestals_) { delete pedestalsDQM_;}
89  if(monitorNoises_) { delete noisesDQM_; }
90  if(monitorQuality_) { delete qualityDQM_; }
91  if(monitorApvGains_) { delete apvgainsDQM_; }
96  if(monitorCabling_) { delete cablingDQM_;}
97 
98 }
99 // -----
100 
101 
102 
103 
104 //
105 // ----- beginRun
106 //
108 
109  if(monitorPedestals_){
110  pedestalsDQM_ = new SiStripPedestalsDQM(eSetup,
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  conf_.getParameter<edm::ParameterSet>("SiStripNoisesDQM_PSet"),
119  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
120  }
121 
122 
123  if(monitorQuality_){
124  qualityDQM_ = new SiStripQualityDQM(eSetup,
125  conf_.getParameter<edm::ParameterSet>("SiStripQualityDQM_PSet"),
126  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
127  }
128 
129 
130  if(monitorApvGains_){
131  apvgainsDQM_ = new SiStripApvGainsDQM(eSetup,
132  conf_.getParameter<edm::ParameterSet>("SiStripApvGainsDQM_PSet"),
133  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
134  }
135 
138  conf_.getParameter<edm::ParameterSet>("SiStripLorentzAngleDQM_PSet"),
139  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
140  }
141 
144  conf_.getParameter<edm::ParameterSet>("SiStripBackPlaneCorrectionDQM_PSet"),
145  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
146  }
147 
150  conf_.getParameter<edm::ParameterSet>("SiStripLowThresholdDQM_PSet"),
151  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
152  }
153 
156  conf_.getParameter<edm::ParameterSet>("SiStripHighThresholdDQM_PSet"),
157  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
158  }
159 
160  if(monitorCabling_){
161  cablingDQM_ = new SiStripCablingDQM(eSetup,
162  conf_.getParameter<edm::ParameterSet>("SiStripCablingDQM_PSet"),
163  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
164  }
165 } // beginRun
166 // -----
167 
168 
169 
170 //
171 // ----- beginJob
172 //
174 
175 
176 //
177 // ----- getModuleMEsOnDemand
178 //
179 void SiStripClassToMonitorCondData::getModMEsOnDemand(edm::EventSetup const& eSetup, uint32_t requestedDetId){
180 
181  if(monitorPedestals_) { pedestalsDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
182  if(monitorNoises_) { noisesDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
183  if(monitorQuality_) { qualityDQM_ ->analysisOnDemand(eSetup,requestedDetId);
184  qualityDQM_ ->fillGrandSummaryMEs(eSetup) ;}//fillGrand. for SiStripquality
185  if(monitorApvGains_) { apvgainsDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
186  if(monitorLorentzAngle_) { lorentzangleDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
187  if(monitorBackPlaneCorrection_) { bpcorrectionDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
188  if(monitorCabling_) { cablingDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
189  if(monitorLowThreshold_) { lowthresholdDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
190  if(monitorHighThreshold_) { highthresholdDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
191 }
192 // -----
193 
194 //
195 // ----- getlayerMEsOnDemand
196 //
198  uint32_t requestedSide,
199  uint32_t requestedLayer){
200 
201  if(monitorPedestals_) { pedestalsDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
202  if(monitorNoises_) { noisesDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
203  if(monitorQuality_) { qualityDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);
204  qualityDQM_ ->fillGrandSummaryMEs(eSetup);}
205  if(monitorApvGains_) { apvgainsDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
206  if(monitorLorentzAngle_) { lorentzangleDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
207  if(monitorBackPlaneCorrection_) { bpcorrectionDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
208  if(monitorCabling_) { cablingDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
209  if(monitorLowThreshold_) { lowthresholdDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
210  if(monitorHighThreshold_) { highthresholdDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
211 
212 }
213 
214 //
215 // ----- Analyze
216 //
218 
219  if(monitorPedestals_) { pedestalsDQM_ ->analysis(eSetup);}
220  if(monitorNoises_) { noisesDQM_ ->analysis(eSetup);}
221  if(monitorQuality_) { qualityDQM_ ->analysis(eSetup); qualityDQM_->fillGrandSummaryMEs(eSetup);}//fillGrand. for SiStripquality
222  if(monitorApvGains_) { apvgainsDQM_ ->analysis(eSetup);}
225  if(monitorCabling_) { cablingDQM_ ->analysis(eSetup);}
228 
229 } // analyze
230 // -----
231 
232 
233 
234 //
235 // ----- endRun
236 //
238 
239  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
241 
242  DQMStore* dqmStore_=edm::Service<DQMStore>().operator->();
243 
244  if (outputMEsInRootFile) {
245  dqmStore_->showDirStructure();
246  dqmStore_->save(outputFileName);
247  }
248 
249 } // endRun
250 // -----
251 
252 
253 //
254 // ----- endJob
255 //
257 
258 
259 
T getParameter(std::string const &) const
void fillGrandSummaryMEs(const edm::EventSetup &eSetup)
SiStripClassToMonitorCondData(edm::ParameterSet const &iConfig)
void beginRun(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 &)