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 // -----
76 
77 
78 
79 //
80 // ----- beginRun
81 //
83 
85  pedestalsDQM_ = std::make_unique<SiStripPedestalsDQM>(eSetup,
86  run.run(),
87  conf_.getParameter<edm::ParameterSet>("SiStripPedestalsDQM_PSet"),
88  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
89  }
90 
91 
92  if(monitorNoises_){
93  noisesDQM_ = std::make_unique<SiStripNoisesDQM>(eSetup,
94  run.run(),
95  conf_.getParameter<edm::ParameterSet>("SiStripNoisesDQM_PSet"),
96  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
97  }
98 
99 
101  lowthresholdDQM_ = std::make_unique<SiStripThresholdDQM>(eSetup,
102  run.run(),
103  conf_.getParameter<edm::ParameterSet>("SiStripLowThresholdDQM_PSet"),
104  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
105  }
106 
108  highthresholdDQM_ = std::make_unique<SiStripThresholdDQM>(eSetup,
109  run.run(),
110  conf_.getParameter<edm::ParameterSet>("SiStripHighThresholdDQM_PSet"),
111  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
112  }
113 
114  if(monitorQuality_){
115  qualityDQM_ = std::make_unique<SiStripQualityDQM>(eSetup,
116  run.run(),
117  conf_.getParameter<edm::ParameterSet>("SiStripQualityDQM_PSet"),
118  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
119  }
120 
121 
122  if(monitorApvGains_){
123  apvgainsDQM_ = std::make_unique<SiStripApvGainsDQM>(eSetup,
124  run.run(),
125  conf_.getParameter<edm::ParameterSet>("SiStripApvGainsDQM_PSet"),
126  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
127  }
128 
129 
131  lorentzangleDQM_ = std::make_unique<SiStripLorentzAngleDQM>(eSetup,
132  run.run(),
133  conf_.getParameter<edm::ParameterSet>("SiStripLorentzAngleDQM_PSet"),
134  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
135  }
136 
138  bpcorrectionDQM_ = std::make_unique<SiStripBackPlaneCorrectionDQM>(eSetup,
139  run.run(),
140  conf_.getParameter<edm::ParameterSet>("SiStripBackPlaneCorrectionDQM_PSet"),
141  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
142  }
143  if(monitorCabling_){
144  cablingDQM_ = std::make_unique<SiStripCablingDQM>(eSetup,
145  run.run(),
146  conf_.getParameter<edm::ParameterSet>("SiStripCablingDQM_PSet"),
147  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
148  }
149 } // beginRun
150 // -----
151 
152 
153 
154 //
155 // ----- beginJob
156 //
157 void SiStripMonitorCondData::beginJob(void){} //beginJob
158 // -----
159 
160 
161 
162 //
163 // ----- Analyze
164 //
166 
167  if(monitorPedestals_) { pedestalsDQM_ ->analysis(eSetup);}
168  if(monitorNoises_) { noisesDQM_ ->analysis(eSetup);}
169  if(monitorLowThreshold_) { lowthresholdDQM_ ->analysis(eSetup);}
170  if(monitorHighThreshold_) { highthresholdDQM_ ->analysis(eSetup);}
171  if(monitorApvGains_) { apvgainsDQM_ ->analysis(eSetup);}
172  if(monitorLorentzAngle_) { lorentzangleDQM_ ->analysis(eSetup);}
173  if(monitorBackPlaneCorrection_) { bpcorrectionDQM_ ->analysis(eSetup);}
174  if(monitorQuality_) { qualityDQM_->analysis(eSetup);qualityDQM_->fillGrandSummaryMEs(eSetup);}//fillGrand. for SiStripquality
175  if(monitorCabling_) { cablingDQM_ ->analysis(eSetup);}
176 } // analyze
177 // -----
178 
179 
180 
181 //
182 // ----- endRun
183 //
185  if(monitorPedestals_) { pedestalsDQM_ ->end();}
186  if(monitorNoises_) { noisesDQM_ ->end();}
187  if(monitorLowThreshold_) { lowthresholdDQM_ ->end();}
189  if(monitorApvGains_) { apvgainsDQM_ ->end();}
190  if(monitorLorentzAngle_) { lorentzangleDQM_ ->end();}
192  if(monitorQuality_) { qualityDQM_ ->end();}
193  if(monitorCabling_) { cablingDQM_ ->end();}
194 
195  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
197 
198  DQMStore* dqmStore_=edm::Service<DQMStore>().operator->();
199 
200  if (outputMEsInRootFile) {
201  dqmStore_->showDirStructure();
202  dqmStore_->save(outputFileName);
203  }
204 
205 
206 } // endRun
207 // -----
208 
209 
210 //
211 // ----- endJob
212 //
214 //endJob
215 // -----
216 
217 
220 
221 
std::unique_ptr< SiStripNoisesDQM > noisesDQM_
T getParameter(std::string const &) const
std::unique_ptr< SiStripCablingDQM > cablingDQM_
RunNumber_t run() const
Definition: RunBase.h:40
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::unique_ptr< SiStripThresholdDQM > highthresholdDQM_
void analyze(const edm::Event &, const edm::EventSetup &) override
int iEvent
Definition: GenABIO.cc:230
std::unique_ptr< SiStripApvGainsDQM > apvgainsDQM_
std::unique_ptr< SiStripQualityDQM > qualityDQM_
std::unique_ptr< SiStripThresholdDQM > lowthresholdDQM_
std::unique_ptr< SiStripPedestalsDQM > pedestalsDQM_
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
std::unique_ptr< SiStripBackPlaneCorrectionDQM > bpcorrectionDQM_
std::unique_ptr< SiStripLorentzAngleDQM > lorentzangleDQM_
SiStripMonitorCondData(const edm::ParameterSet &)
Definition: Run.h:44