CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
16 
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  conf_.getParameter<edm::ParameterSet>("SiStripPedestalsDQM_PSet"),
98  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
99  }
100 
101 
102  if(monitorNoises_){
103  noisesDQM_ = new SiStripNoisesDQM(eSetup,
104  conf_.getParameter<edm::ParameterSet>("SiStripNoisesDQM_PSet"),
105  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
106  }
107 
108 
111  conf_.getParameter<edm::ParameterSet>("SiStripLowThresholdDQM_PSet"),
112  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
113  }
114 
117  conf_.getParameter<edm::ParameterSet>("SiStripHighThresholdDQM_PSet"),
118  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
119  }
120 
121  if(monitorQuality_){
122  qualityDQM_ = new SiStripQualityDQM(eSetup,
123  conf_.getParameter<edm::ParameterSet>("SiStripQualityDQM_PSet"),
124  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
125  }
126 
127 
128  if(monitorApvGains_){
129  apvgainsDQM_ = new SiStripApvGainsDQM(eSetup,
130  conf_.getParameter<edm::ParameterSet>("SiStripApvGainsDQM_PSet"),
131  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
132  }
133 
134 
137  conf_.getParameter<edm::ParameterSet>("SiStripLorentzAngleDQM_PSet"),
138  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
139  }
140 
143  conf_.getParameter<edm::ParameterSet>("SiStripBackPlaneCorrectionDQM_PSet"),
144  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
145  }
146  if(monitorCabling_){
147  cablingDQM_ = new SiStripCablingDQM(eSetup,
148  conf_.getParameter<edm::ParameterSet>("SiStripCablingDQM_PSet"),
149  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
150  }
151 } // beginRun
152 // -----
153 
154 
155 
156 //
157 // ----- beginJob
158 //
159 void SiStripMonitorCondData::beginJob(void){} //beginJob
160 // -----
161 
162 
163 
164 //
165 // ----- Analyze
166 //
168 
169  if(monitorPedestals_) { pedestalsDQM_ ->analysis(eSetup);}
170  if(monitorNoises_) { noisesDQM_ ->analysis(eSetup);}
173  if(monitorApvGains_) { apvgainsDQM_ ->analysis(eSetup);}
176  if(monitorQuality_) { qualityDQM_->analysis(eSetup);qualityDQM_->fillGrandSummaryMEs(eSetup);}//fillGrand. for SiStripquality
177  if(monitorCabling_) { cablingDQM_ ->analysis(eSetup);}
178 } // analyze
179 // -----
180 
181 
182 
183 //
184 // ----- endRun
185 //
188  if(monitorNoises_) { noisesDQM_ ->end();}
191  if(monitorApvGains_) { apvgainsDQM_ ->end();}
194  if(monitorQuality_) { qualityDQM_ ->end();}
195  if(monitorCabling_) { cablingDQM_ ->end();}
196 
197  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
199 
200  DQMStore* dqmStore_=edm::Service<DQMStore>().operator->();
201 
202  if (outputMEsInRootFile) {
203  dqmStore_->showDirStructure();
204  dqmStore_->save(outputFileName);
205  }
206 
207 
208 } // endRun
209 // -----
210 
211 
212 //
213 // ----- endJob
214 //
216 //endJob
217 // -----
218 
219 
222 
223 
T getParameter(std::string const &) const
void fillGrandSummaryMEs(const edm::EventSetup &eSetup)
SiStripCablingDQM * cablingDQM_
SiStripBackPlaneCorrectionDQM * bpcorrectionDQM_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
virtual void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
SiStripLorentzAngleDQM * lorentzangleDQM_
SiStripQualityDQM * qualityDQM_
SiStripThresholdDQM * lowthresholdDQM_
int iEvent
Definition: GenABIO.cc:230
virtual void analyze(const edm::Event &, const edm::EventSetup &)
SiStripThresholdDQM * highthresholdDQM_
void analysis(const edm::EventSetup &eSetup_)
virtual void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
SiStripMonitorCondData(const edm::ParameterSet &)
SiStripNoisesDQM * noisesDQM_
SiStripPedestalsDQM * pedestalsDQM_
SiStripApvGainsDQM * apvgainsDQM_
Definition: Run.h:41