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 
36 
41 
45 
48 
49 #include "TH1F.h"
50 #include "TH2F.h"
51 #include "TProfile.h"
52 
53 // std
54 #include <cstdlib>
55 #include <string>
56 //#include <cmath>
57 //#include <numeric>
58 #include <algorithm>
59 
60 
61 //
62 // ----- Constructor
63 //
65 
66  monitorPedestals_ = iConfig.getParameter<bool>("MonitorSiStripPedestal");
67  monitorNoises_ = iConfig.getParameter<bool>("MonitorSiStripNoise");
68  monitorQuality_ = iConfig.getParameter<bool>("MonitorSiStripQuality");
69  monitorApvGains_ = iConfig.getParameter<bool>("MonitorSiStripApvGain");
70  monitorLorentzAngle_ = iConfig.getParameter<bool>("MonitorSiStripLorentzAngle");
71  monitorLowThreshold_ = iConfig.getParameter<bool>("MonitorSiStripLowThreshold");
72  monitorHighThreshold_ = iConfig.getParameter<bool>("MonitorSiStripHighThreshold");
73  monitorCabling_ = iConfig.getParameter<bool>("MonitorSiStripCabling");
74 
75 }
76 // -----
77 
78 
79 
80 //
81 // ----- Destructor
82 //
84 
85  if(monitorPedestals_) { delete pedestalsDQM_;}
86  if(monitorNoises_) { delete noisesDQM_; }
87  if(monitorQuality_) { delete qualityDQM_; }
88  if(monitorApvGains_) { delete apvgainsDQM_; }
92  if(monitorCabling_) { delete cablingDQM_;}
93 
94 }
95 // -----
96 
97 
98 
99 
100 //
101 // ----- beginRun
102 //
104 
105  if(monitorPedestals_){
106  pedestalsDQM_ = new SiStripPedestalsDQM(eSetup,
107  conf_.getParameter<edm::ParameterSet>("SiStripPedestalsDQM_PSet"),
108  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
109  }
110 
111 
112  if(monitorNoises_){
113  noisesDQM_ = new SiStripNoisesDQM(eSetup,
114  conf_.getParameter<edm::ParameterSet>("SiStripNoisesDQM_PSet"),
115  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
116  }
117 
118 
119  if(monitorQuality_){
120  qualityDQM_ = new SiStripQualityDQM(eSetup,
121  conf_.getParameter<edm::ParameterSet>("SiStripQualityDQM_PSet"),
122  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
123  }
124 
125 
126  if(monitorApvGains_){
127  apvgainsDQM_ = new SiStripApvGainsDQM(eSetup,
128  conf_.getParameter<edm::ParameterSet>("SiStripApvGainsDQM_PSet"),
129  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
130  }
131 
134  conf_.getParameter<edm::ParameterSet>("SiStripLorentzAngleDQM_PSet"),
135  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
136  }
137 
140  conf_.getParameter<edm::ParameterSet>("SiStripLowThresholdDQM_PSet"),
141  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
142  }
143 
146  conf_.getParameter<edm::ParameterSet>("SiStripHighThresholdDQM_PSet"),
147  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
148  }
149 
150  if(monitorCabling_){
151  cablingDQM_ = new SiStripCablingDQM(eSetup,
152  conf_.getParameter<edm::ParameterSet>("SiStripCablingDQM_PSet"),
153  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
154  }
155 } // beginRun
156 // -----
157 
158 
159 
160 //
161 // ----- beginJob
162 //
164 
165 
166 //
167 // ----- getModuleMEsOnDemand
168 //
169 void SiStripClassToMonitorCondData::getModMEsOnDemand(edm::EventSetup const& eSetup, uint32_t requestedDetId){
170 
171  if(monitorPedestals_) { pedestalsDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
172  if(monitorNoises_) { noisesDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
173  if(monitorQuality_) { qualityDQM_ ->analysisOnDemand(eSetup,requestedDetId);
174  qualityDQM_ ->fillGrandSummaryMEs(eSetup) ;}//fillGrand. for SiStripquality
175  if(monitorApvGains_) { apvgainsDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
176  if(monitorLorentzAngle_) { lorentzangleDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
177  if(monitorCabling_) { cablingDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
178  if(monitorLowThreshold_) { lowthresholdDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
179  if(monitorHighThreshold_) { highthresholdDQM_ ->analysisOnDemand(eSetup,requestedDetId);}
180 }
181 // -----
182 
183 //
184 // ----- getlayerMEsOnDemand
185 //
187  uint32_t requestedSide,
188  uint32_t requestedLayer){
189 
190  if(monitorPedestals_) { pedestalsDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
191  if(monitorNoises_) { noisesDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
192  if(monitorQuality_) { qualityDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);
193  qualityDQM_ ->fillGrandSummaryMEs(eSetup);}
194  if(monitorApvGains_) { apvgainsDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
195  if(monitorLorentzAngle_) { lorentzangleDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
196  if(monitorCabling_) { cablingDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
197  if(monitorLowThreshold_) { lowthresholdDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
198  if(monitorHighThreshold_) { highthresholdDQM_ ->analysisOnDemand(eSetup,requestedSubDetector, requestedSide,requestedLayer);}
199 
200 }
201 
202 //
203 // ----- Analyze
204 //
206 
207  if(monitorPedestals_) { pedestalsDQM_ ->analysis(eSetup);}
208  if(monitorNoises_) { noisesDQM_ ->analysis(eSetup);}
209  if(monitorQuality_) { qualityDQM_ ->analysis(eSetup); qualityDQM_->fillGrandSummaryMEs(eSetup);}//fillGrand. for SiStripquality
210  if(monitorApvGains_) { apvgainsDQM_ ->analysis(eSetup);}
212  if(monitorCabling_) { cablingDQM_ ->analysis(eSetup);}
215 
216 } // analyze
217 // -----
218 
219 
220 
221 //
222 // ----- endRun
223 //
225 
226  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
228 
229  DQMStore* dqmStore_=edm::Service<DQMStore>().operator->();
230 
231  if (outputMEsInRootFile) {
232  dqmStore_->showDirStructure();
233  dqmStore_->save(outputFileName);
234  }
235 
236 } // endRun
237 // -----
238 
239 
240 //
241 // ----- endJob
242 //
244 
245 
246 
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_)
void analyseCondData(const edm::EventSetup &)