CMS 3D CMS Logo

SiStripMonitorCondData.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiStripMonitorSummary
4 // Class : SiStripMonitorCondData
5 //
6 // Original Author: Evelyne Delmeire
7 //
8 
9 
17 
19 
25 
26 
28 
37 
38 #include "TH1F.h"
39 #include "TH2F.h"
40 #include "TProfile.h"
41 
42 // std
43 #include <cstdlib>
44 #include <string>
45 #include <cmath>
46 #include <numeric>
47 #include <algorithm>
48 
49 
50 //
51 // ----- Constructor
52 //
54 
55  monitorPedestals_ = iConfig.getParameter<bool>("MonitorSiStripPedestal");
56  monitorNoises_ = iConfig.getParameter<bool>("MonitorSiStripNoise");
57  monitorLowThreshold_ = iConfig.getParameter<bool>("MonitorSiStripLowThreshold");
58  monitorHighThreshold_ = iConfig.getParameter<bool>("MonitorSiStripHighThreshold");
59  monitorQuality_ = iConfig.getParameter<bool>("MonitorSiStripQuality");
60  monitorApvGains_ = iConfig.getParameter<bool>("MonitorSiStripApvGain");
61  monitorLorentzAngle_ = iConfig.getParameter<bool>("MonitorSiStripLorentzAngle");
62  monitorBackPlaneCorrection_ = iConfig.getParameter<bool>("MonitorSiStripBackPlaneCorrection");
63  monitorCabling_ = iConfig.getParameter<bool>("MonitorSiStripCabling");
64 
65 }
66 // -----
67 
68 
69 
70 //
71 // ----- Destructor
72 //
74 
75  if(monitorPedestals_) { delete pedestalsDQM_ ;}
76  if(monitorNoises_) { delete noisesDQM_ ;}
79  if(monitorQuality_) { delete qualityDQM_ ;}
80  if(monitorApvGains_) { delete apvgainsDQM_ ;}
83  if(monitorCabling_) { delete cablingDQM_;}
84 
85 }
86 // -----
87 
88 
89 
90 //
91 // ----- beginRun
92 //
94 
97  run.run(),
98  conf_.getParameter<edm::ParameterSet>("SiStripPedestalsDQM_PSet"),
99  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
100  }
101 
102 
103  if(monitorNoises_){
104  noisesDQM_ = new SiStripNoisesDQM(eSetup,
105  run.run(),
106  conf_.getParameter<edm::ParameterSet>("SiStripNoisesDQM_PSet"),
107  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
108  }
109 
110 
113  run.run(),
114  conf_.getParameter<edm::ParameterSet>("SiStripLowThresholdDQM_PSet"),
115  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
116  }
117 
120  run.run(),
121  conf_.getParameter<edm::ParameterSet>("SiStripHighThresholdDQM_PSet"),
122  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
123  }
124 
125  if(monitorQuality_){
126  qualityDQM_ = new SiStripQualityDQM(eSetup,
127  run.run(),
128  conf_.getParameter<edm::ParameterSet>("SiStripQualityDQM_PSet"),
129  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
130  }
131 
132 
133  if(monitorApvGains_){
134  apvgainsDQM_ = new SiStripApvGainsDQM(eSetup,
135  run.run(),
136  conf_.getParameter<edm::ParameterSet>("SiStripApvGainsDQM_PSet"),
137  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
138  }
139 
140 
143  run.run(),
144  conf_.getParameter<edm::ParameterSet>("SiStripLorentzAngleDQM_PSet"),
145  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
146  }
147 
150  run.run(),
151  conf_.getParameter<edm::ParameterSet>("SiStripBackPlaneCorrectionDQM_PSet"),
152  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
153  }
154  if(monitorCabling_){
155  cablingDQM_ = new SiStripCablingDQM(eSetup,
156  run.run(),
157  conf_.getParameter<edm::ParameterSet>("SiStripCablingDQM_PSet"),
158  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
159  }
160 } // beginRun
161 // -----
162 
163 
164 
165 //
166 // ----- beginJob
167 //
168 void SiStripMonitorCondData::beginJob(void){} //beginJob
169 // -----
170 
171 
172 
173 //
174 // ----- Analyze
175 //
177 
178  if(monitorPedestals_) { pedestalsDQM_ ->analysis(eSetup);}
179  if(monitorNoises_) { noisesDQM_ ->analysis(eSetup);}
182  if(monitorApvGains_) { apvgainsDQM_ ->analysis(eSetup);}
185  if(monitorQuality_) { qualityDQM_->analysis(eSetup);qualityDQM_->fillGrandSummaryMEs(eSetup);}//fillGrand. for SiStripquality
186  if(monitorCabling_) { cablingDQM_ ->analysis(eSetup);}
187 } // analyze
188 // -----
189 
190 
191 
192 //
193 // ----- endRun
194 //
197  if(monitorNoises_) { noisesDQM_ ->end();}
200  if(monitorApvGains_) { apvgainsDQM_ ->end();}
203  if(monitorQuality_) { qualityDQM_ ->end();}
204  if(monitorCabling_) { cablingDQM_ ->end();}
205 
206  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
208 
209  DQMStore* dqmStore_=edm::Service<DQMStore>().operator->();
210 
211  if (outputMEsInRootFile) {
212  dqmStore_->showDirStructure();
213  dqmStore_->save(outputFileName);
214  }
215 
216 
217 } // endRun
218 // -----
219 
220 
221 //
222 // ----- endJob
223 //
225 //endJob
226 // -----
227 
228 
231 
232 
T getParameter(std::string const &) const
void fillGrandSummaryMEs(const edm::EventSetup &eSetup)
RunNumber_t run() const
Definition: RunBase.h:40
SiStripCablingDQM * cablingDQM_
SiStripBackPlaneCorrectionDQM * bpcorrectionDQM_
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
SiStripLorentzAngleDQM * lorentzangleDQM_
void analyze(const edm::Event &, const edm::EventSetup &) override
SiStripQualityDQM * qualityDQM_
SiStripThresholdDQM * lowthresholdDQM_
int iEvent
Definition: GenABIO.cc:230
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
SiStripThresholdDQM * highthresholdDQM_
void analysis(const edm::EventSetup &eSetup_)
SiStripMonitorCondData(const edm::ParameterSet &)
SiStripNoisesDQM * noisesDQM_
SiStripPedestalsDQM * pedestalsDQM_
SiStripApvGainsDQM * apvgainsDQM_
Definition: Run.h:43