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 
16 
18 
23 
24 #include "SiStripMonitorCondData.h"
25 
34 
35 #include "TH1F.h"
36 #include "TH2F.h"
37 #include "TProfile.h"
38 
39 // std
40 #include <algorithm>
41 #include <cmath>
42 #include <cstdlib>
43 #include <numeric>
44 #include <string>
45 
46 //
47 // ----- Constructor
48 //
50  monitorPedestals_ = iConfig.getParameter<bool>("MonitorSiStripPedestal");
51  monitorNoises_ = iConfig.getParameter<bool>("MonitorSiStripNoise");
52  monitorLowThreshold_ = iConfig.getParameter<bool>("MonitorSiStripLowThreshold");
53  monitorHighThreshold_ = iConfig.getParameter<bool>("MonitorSiStripHighThreshold");
54  monitorQuality_ = iConfig.getParameter<bool>("MonitorSiStripQuality");
55  monitorApvGains_ = iConfig.getParameter<bool>("MonitorSiStripApvGain");
56  monitorLorentzAngle_ = iConfig.getParameter<bool>("MonitorSiStripLorentzAngle");
57  monitorBackPlaneCorrection_ = iConfig.getParameter<bool>("MonitorSiStripBackPlaneCorrection");
58  monitorCabling_ = iConfig.getParameter<bool>("MonitorSiStripCabling");
59 }
60 // -----
61 
62 //
63 // ----- Destructor
64 //
66 // -----
67 
68 //
69 // ----- beginRun
70 //
72  if (monitorPedestals_) {
74  std::make_unique<SiStripPedestalsDQM>(eSetup,
75  run.run(),
76  conf_.getParameter<edm::ParameterSet>("SiStripPedestalsDQM_PSet"),
77  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
78  }
79 
80  if (monitorNoises_) {
81  noisesDQM_ = std::make_unique<SiStripNoisesDQM>(eSetup,
82  run.run(),
83  conf_.getParameter<edm::ParameterSet>("SiStripNoisesDQM_PSet"),
84  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
85  }
86 
89  std::make_unique<SiStripThresholdDQM>(eSetup,
90  run.run(),
91  conf_.getParameter<edm::ParameterSet>("SiStripLowThresholdDQM_PSet"),
92  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
93  }
94 
97  std::make_unique<SiStripThresholdDQM>(eSetup,
98  run.run(),
99  conf_.getParameter<edm::ParameterSet>("SiStripHighThresholdDQM_PSet"),
100  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
101  }
102 
103  if (monitorQuality_) {
104  qualityDQM_ = std::make_unique<SiStripQualityDQM>(eSetup,
105  run.run(),
106  conf_.getParameter<edm::ParameterSet>("SiStripQualityDQM_PSet"),
107  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
108  }
109 
110  if (monitorApvGains_) {
111  apvgainsDQM_ =
112  std::make_unique<SiStripApvGainsDQM>(eSetup,
113  run.run(),
114  conf_.getParameter<edm::ParameterSet>("SiStripApvGainsDQM_PSet"),
115  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
116  }
117 
118  if (monitorLorentzAngle_) {
120  std::make_unique<SiStripLorentzAngleDQM>(eSetup,
121  run.run(),
122  conf_.getParameter<edm::ParameterSet>("SiStripLorentzAngleDQM_PSet"),
123  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
124  }
125 
127  bpcorrectionDQM_ = std::make_unique<SiStripBackPlaneCorrectionDQM>(
128  eSetup,
129  run.run(),
130  conf_.getParameter<edm::ParameterSet>("SiStripBackPlaneCorrectionDQM_PSet"),
131  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
132  }
133  if (monitorCabling_) {
134  cablingDQM_ = std::make_unique<SiStripCablingDQM>(eSetup,
135  run.run(),
136  conf_.getParameter<edm::ParameterSet>("SiStripCablingDQM_PSet"),
137  conf_.getParameter<edm::ParameterSet>("FillConditions_PSet"));
138  }
139 } // beginRun
140 // -----
141 
142 //
143 // ----- beginJob
144 //
145 void SiStripMonitorCondData::beginJob(void) {} // beginJob
146 // -----
147 
148 //
149 // ----- Analyze
150 //
152  if (monitorPedestals_) {
153  pedestalsDQM_->analysis(eSetup);
154  }
155  if (monitorNoises_) {
156  noisesDQM_->analysis(eSetup);
157  }
158  if (monitorLowThreshold_) {
159  lowthresholdDQM_->analysis(eSetup);
160  }
161  if (monitorHighThreshold_) {
162  highthresholdDQM_->analysis(eSetup);
163  }
164  if (monitorApvGains_) {
165  apvgainsDQM_->analysis(eSetup);
166  }
167  if (monitorLorentzAngle_) {
168  lorentzangleDQM_->analysis(eSetup);
169  }
171  bpcorrectionDQM_->analysis(eSetup);
172  }
173  if (monitorQuality_) {
174  qualityDQM_->analysis(eSetup);
175  qualityDQM_->fillGrandSummaryMEs(eSetup);
176  } // fillGrand. for SiStripquality
177  if (monitorCabling_) {
178  cablingDQM_->analysis(eSetup);
179  }
180 } // analyze
181 // -----
182 
183 //
184 // ----- endRun
185 //
187  if (monitorPedestals_) {
188  pedestalsDQM_->end();
189  }
190  if (monitorNoises_) {
191  noisesDQM_->end();
192  }
193  if (monitorLowThreshold_) {
194  lowthresholdDQM_->end();
195  }
196  if (monitorHighThreshold_) {
197  highthresholdDQM_->end();
198  }
199  if (monitorApvGains_) {
200  apvgainsDQM_->end();
201  }
202  if (monitorLorentzAngle_) {
203  lorentzangleDQM_->end();
204  }
206  bpcorrectionDQM_->end();
207  }
208  if (monitorQuality_) {
209  qualityDQM_->end();
210  }
211  if (monitorCabling_) {
212  cablingDQM_->end();
213  }
214 
215  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
217 
218  DQMStore *dqmStore_ = edm::Service<DQMStore>().operator->();
219 
220  if (outputMEsInRootFile) {
221  dqmStore_->save(outputFileName);
222  }
223 
224 } // endRun
225 // -----
226 
227 //
228 // ----- endJob
229 //
231 // endJob
232 // -----
233 
SiStripMonitorCondData.h
SiStripMonitorCondData::endJob
void endJob() override
Definition: SiStripMonitorCondData.cc:230
Handle.h
MessageLogger.h
SiStripFolderOrganizer.h
SiStripHistoId.h
SiStripMonitorCondData::SiStripMonitorCondData
SiStripMonitorCondData(const edm::ParameterSet &)
Definition: SiStripMonitorCondData.cc:49
ESHandle.h
SiStripMonitorCondData::pedestalsDQM_
std::unique_ptr< SiStripPedestalsDQM > pedestalsDQM_
Definition: SiStripMonitorCondData.h:69
edm::Run
Definition: Run.h:45
SiStripMonitorCondData::apvgainsDQM_
std::unique_ptr< SiStripApvGainsDQM > apvgainsDQM_
Definition: SiStripMonitorCondData.h:74
SiStripMonitorCondData::lowthresholdDQM_
std::unique_ptr< SiStripThresholdDQM > lowthresholdDQM_
Definition: SiStripMonitorCondData.h:71
SiStripCablingDQM.h
SiStripMonitorCondData::monitorLowThreshold_
bool monitorLowThreshold_
Definition: SiStripMonitorCondData.h:59
DQMStore.h
ExtractTObject.h
SiStripQualityDQM.h
SiStripMonitorCondData::bpcorrectionDQM_
std::unique_ptr< SiStripBackPlaneCorrectionDQM > bpcorrectionDQM_
Definition: SiStripMonitorCondData.h:76
SiStripMonitorCondData::monitorBackPlaneCorrection_
bool monitorBackPlaneCorrection_
Definition: SiStripMonitorCondData.h:64
MakerMacros.h
SiStripMonitorCondData::noisesDQM_
std::unique_ptr< SiStripNoisesDQM > noisesDQM_
Definition: SiStripMonitorCondData.h:70
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
dqm::legacy::DQMStore
Definition: DQMStore.h:727
Service.h
SiStripMonitorCondData::lorentzangleDQM_
std::unique_ptr< SiStripLorentzAngleDQM > lorentzangleDQM_
Definition: SiStripMonitorCondData.h:75
SiStripLorentzAngleDQM.h
Run.h
SiStripMonitorCondData::cablingDQM_
std::unique_ptr< SiStripCablingDQM > cablingDQM_
Definition: SiStripMonitorCondData.h:77
SiStripMonitorCondData
Definition: SiStripMonitorCondData.h:39
SiStripBackPlaneCorrectionDQM.h
reco_skim_cfg_mod.outputFileName
outputFileName
Definition: reco_skim_cfg_mod.py:15
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripMonitorCondData::endRun
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
Definition: SiStripMonitorCondData.cc:186
SiStripThresholdDQM.h
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
SiStripMonitorCondData::conf_
edm::ParameterSet conf_
Definition: SiStripMonitorCondData.h:55
SiStripMonitorCondData::monitorQuality_
bool monitorQuality_
Definition: SiStripMonitorCondData.h:61
SiStripMonitorCondData::monitorApvGains_
bool monitorApvGains_
Definition: SiStripMonitorCondData.h:62
SiStripMonitorCondData::beginJob
void beginJob() override
Definition: SiStripMonitorCondData.cc:145
SiStripMonitorCondData::monitorPedestals_
bool monitorPedestals_
Definition: SiStripMonitorCondData.h:57
SiStripMonitorCondData::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: SiStripMonitorCondData.cc:151
SiStripPedestalsDQM.h
edm::Service
Definition: Service.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
SiStripMonitorCondData::monitorCabling_
bool monitorCabling_
Definition: SiStripMonitorCondData.h:65
SiStripMonitorCondData::highthresholdDQM_
std::unique_ptr< SiStripThresholdDQM > highthresholdDQM_
Definition: SiStripMonitorCondData.h:72
edm::EventSetup
Definition: EventSetup.h:57
SiStripMonitorCondData::qualityDQM_
std::unique_ptr< SiStripQualityDQM > qualityDQM_
Definition: SiStripMonitorCondData.h:73
SiStripMonitorCondData::monitorNoises_
bool monitorNoises_
Definition: SiStripMonitorCondData.h:58
SiStripMonitorCondData::monitorHighThreshold_
bool monitorHighThreshold_
Definition: SiStripMonitorCondData.h:60
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SiStripApvGainsDQM.h
EventSetup.h
SiStripMonitorCondData::monitorLorentzAngle_
bool monitorLorentzAngle_
Definition: SiStripMonitorCondData.h:63
SiStripNoisesDQM.h
ParameterSet.h
edm::Event
Definition: Event.h:73
SiStripMonitorCondData::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
Definition: SiStripMonitorCondData.cc:71
SiStripMonitorCondData::~SiStripMonitorCondData
~SiStripMonitorCondData() override
Definition: SiStripMonitorCondData.cc:65