CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SiStripMonitorCondDataOnDemandExample.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiStripMonitorSummary
4 // Class : SiStripMonitorCondDataOnDemandExample
5 //
6 // Original Author: Evelyne Delmeire
7 //
8 
16 
19 
20 #include "TH1F.h"
21 #include "TH2F.h"
22 #include "TProfile.h"
23 
24 // std
25 #include <algorithm>
26 #include <cmath>
27 #include <cstdlib>
28 #include <numeric>
29 #include <string>
30 
31 //
32 // ----- Constructor
33 //
35  condDataMonitoring_ = std::make_unique<SiStripClassToMonitorCondData>(iConfig, consumesCollector());
36 }
37 // -----
38 
39 //
40 // ----- Destructor
41 //
43 // -----
44 
45 //
46 // ----- beginRun
47 //
49  eventCounter_ = 0;
50  condDataMonitoring_->beginRun(run.run(), eSetup);
51 } // beginRun
52 // -----
53 
54 //
55 // ----- beginJob
56 //
58 
59 //
60 // ----- Analyze
61 //
63  // eventCounter_++;
64 
65  // on demand type I : eventSetup and detId to be passed
66  // output : ME's corresponding to that detId
67 
68  // if(eventCounter_==1){ condDataMonitoring_ ->
69  // getModMEsOnDemand(eSetup,369125542);}
70 
71  // on demand type II : eventSetup, subdetector-type(TIB/TOB/TEC/TID),
72  // subdetector-side for TEC/TID (0 for TIB and
73  // TOB) layer_number (0=all layers)
74 
75  // if(eventCounter_==2){ condDataMonitoring_ ->
76  // getLayerMEsOnDemand(eSetup,"TEC",0,1);} condDataMonitoring_ ->
77  // getModMEsOnDemand(eSetup,369125542);
78  condDataMonitoring_->getLayerMEsOnDemand(eSetup, "TEC", 2, 4);
79 
80 } // analyze
81 // -----
82 
83 //
84 // ----- endRun
85 //
87  condDataMonitoring_->save();
88 
89 } // endRun
90 // -----
91 
92 //
93 // ----- endJob
94 //
96 
std::unique_ptr< SiStripClassToMonitorCondData > condDataMonitoring_
RunNumber_t run() const
Definition: RunBase.h:40
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void analyze(const edm::Event &, const edm::EventSetup &) override
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
int iEvent
Definition: GenABIO.cc:224
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
Definition: Run.h:45