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 
36 
37 #include "TH1F.h"
38 #include "TH2F.h"
39 #include "TProfile.h"
40 
41 // std
42 #include <cstdlib>
43 #include <string>
44 #include <cmath>
45 #include <numeric>
46 #include <algorithm>
47 
48 
49 //
50 // ----- Constructor
51 //
53 
54  monitorPedestals_ = iConfig.getParameter<bool>("MonitorSiStripPedestal");
55  monitorNoises_ = iConfig.getParameter<bool>("MonitorSiStripNoise");
56  monitorLowThreshold_ = iConfig.getParameter<bool>("MonitorSiStripLowThreshold");
57  monitorHighThreshold_ = iConfig.getParameter<bool>("MonitorSiStripHighThreshold");
58  monitorQuality_ = iConfig.getParameter<bool>("MonitorSiStripQuality");
59  monitorApvGains_ = iConfig.getParameter<bool>("MonitorSiStripApvGain");
60  monitorLorentzAngle_ = iConfig.getParameter<bool>("MonitorSiStripLorentzAngle");
61  monitorCabling_ = iConfig.getParameter<bool>("MonitorSiStripCabling");
62 
63 }
64 // -----
65 
66 
67 
68 //
69 // ----- Destructor
70 //
72 
73  if(monitorPedestals_) { delete pedestalsDQM_ ;}
74  if(monitorNoises_) { delete noisesDQM_ ;}
77  if(monitorQuality_) { delete qualityDQM_ ;}
78  if(monitorApvGains_) { delete apvgainsDQM_ ;}
80  if(monitorCabling_) { delete cablingDQM_;}
81 
82 }
83 // -----
84 
85 
86 
87 //
88 // ----- beginRun
89 //
91 
94  conf_.getParameter<edm::ParameterSet>("SiStripPedestalsDQM_PSet"),
95  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
96  }
97 
98 
99  if(monitorNoises_){
100  noisesDQM_ = new SiStripNoisesDQM(eSetup,
101  conf_.getParameter<edm::ParameterSet>("SiStripNoisesDQM_PSet"),
102  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
103  }
104 
105 
108  conf_.getParameter<edm::ParameterSet>("SiStripLowThresholdDQM_PSet"),
109  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
110  }
111 
114  conf_.getParameter<edm::ParameterSet>("SiStripHighThresholdDQM_PSet"),
115  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
116  }
117 
118  if(monitorQuality_){
119  qualityDQM_ = new SiStripQualityDQM(eSetup,
120  conf_.getParameter<edm::ParameterSet>("SiStripQualityDQM_PSet"),
121  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
122  }
123 
124 
125  if(monitorApvGains_){
126  apvgainsDQM_ = new SiStripApvGainsDQM(eSetup,
127  conf_.getParameter<edm::ParameterSet>("SiStripApvGainsDQM_PSet"),
128  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
129  }
130 
131 
134  conf_.getParameter<edm::ParameterSet>("SiStripLorentzAngleDQM_PSet"),
135  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
136  }
137  if(monitorCabling_){
138  cablingDQM_ = new SiStripCablingDQM(eSetup,
139  conf_.getParameter<edm::ParameterSet>("SiStripCablingDQM_PSet"),
140  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
141  }
142 } // beginRun
143 // -----
144 
145 
146 
147 //
148 // ----- beginJob
149 //
150 void SiStripMonitorCondData::beginJob(void){} //beginJob
151 // -----
152 
153 
154 
155 //
156 // ----- Analyze
157 //
159 
160  if(monitorPedestals_) { pedestalsDQM_ ->analysis(eSetup);}
161  if(monitorNoises_) { noisesDQM_ ->analysis(eSetup);}
164  if(monitorApvGains_) { apvgainsDQM_ ->analysis(eSetup);}
166  if(monitorQuality_) { qualityDQM_->analysis(eSetup);qualityDQM_->fillGrandSummaryMEs(eSetup);}//fillGrand. for SiStripquality
167  if(monitorCabling_) { cablingDQM_ ->analysis(eSetup);}
168 } // analyze
169 // -----
170 
171 
172 
173 //
174 // ----- endRun
175 //
178  if(monitorNoises_) { noisesDQM_ ->end();}
181  if(monitorApvGains_) { apvgainsDQM_ ->end();}
183  if(monitorQuality_) { qualityDQM_ ->end();}
184  if(monitorCabling_) { cablingDQM_ ->end();}
185 
186  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
188 
189  DQMStore* dqmStore_=edm::Service<DQMStore>().operator->();
190 
191  if (outputMEsInRootFile) {
192  dqmStore_->showDirStructure();
193  dqmStore_->save(outputFileName);
194  }
195 
196 
197 } // endRun
198 // -----
199 
200 
201 //
202 // ----- endJob
203 //
205 //endJob
206 // -----
207 
208 
211 
212 
T getParameter(std::string const &) const
void fillGrandSummaryMEs(const edm::EventSetup &eSetup)
SiStripCablingDQM * cablingDQM_
#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:243
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