CMS 3D CMS Logo

MEtoEDMConverter.h
Go to the documentation of this file.
1 #ifndef MEtoEDMConverter_h
2 #define MEtoEDMConverter_h
3 
12 // framework & common header files
25 
26 //DQM services
29 
30 // helper files
31 #include <iostream>
32 #include <cstdlib>
33 #include <string>
34 #include <memory>
35 #include <vector>
36 #include <map>
37 #include <cassert>
38 #include <cstdint>
39 
40 #include "TString.h"
41 #include "TH1F.h"
42 #include "TH1S.h"
43 #include "TH1D.h"
44 #include "TH2F.h"
45 #include "TH2S.h"
46 #include "TH2D.h"
47 #include "TH3F.h"
48 #include "TProfile.h"
49 #include "TProfile2D.h"
50 #include "TObjString.h"
51 
52 namespace meedm {
53  struct Void {};
54 } // namespace meedm
55 
56 //Using RunCache and LuminosityBlockCache tells the framework the module is able to
57 // allow multiple concurrent Runs and LuminosityBlocks.
58 
59 class MEtoEDMConverter : public edm::one::EDProducer<edm::RunCache<meedm::Void>,
60  edm::LuminosityBlockCache<meedm::Void>,
61  edm::EndLuminosityBlockProducer,
62  edm::EndRunProducer,
63  edm::one::SharedResources> {
64 public:
67 
68  explicit MEtoEDMConverter(const edm::ParameterSet&);
69  ~MEtoEDMConverter() override;
70  void beginJob() override;
71  void produce(edm::Event&, const edm::EventSetup&) override;
72  std::shared_ptr<meedm::Void> globalBeginRun(edm::Run const&, const edm::EventSetup&) const override;
73  void globalEndRun(edm::Run const&, const edm::EventSetup&) override;
74  void endRunProduce(edm::Run&, const edm::EventSetup&) override;
77  std::shared_ptr<meedm::Void> globalBeginLuminosityBlock(edm::LuminosityBlock const&,
78  edm::EventSetup const&) const override;
79 
80  template <class T>
81  void putData(DQMStore::IGetter& g, T& iPutTo, bool iLumiOnly, uint32_t run, uint32_t lumi);
82 
83  using TagList = std::vector<uint32_t>;
84 
85 private:
87  int verbosity;
88  int frequency;
90 
91  // private statistics information
92  std::map<int, int> iCount;
93 
94 }; // end class declaration
95 
96 #endif
MEtoEDMConverter::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: MEtoEDMConverter.h:65
Handle.h
MEtoEDMConverter::MEtoEDMConverter
MEtoEDMConverter(const edm::ParameterSet &)
Definition: MEtoEDMConverter.cc:20
MEtoEDMConverter::endLuminosityBlockProduce
void endLuminosityBlockProduce(edm::LuminosityBlock &, const edm::EventSetup &) override
Definition: MEtoEDMConverter.cc:103
MEtoEDMConverter::putData
void putData(DQMStore::IGetter &g, T &iPutTo, bool iLumiOnly, uint32_t run, uint32_t lumi)
Definition: MEtoEDMConverter.cc:111
EDProducer.h
MessageLogger.h
ESHandle.h
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
LuminosityBlock.h
MEtoEDMConverter::TagList
std::vector< uint32_t > TagList
Definition: MEtoEDMConverter.h:83
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
MEtoEDMConverter::endRunProduce
void endRunProduce(edm::Run &, const edm::EventSetup &) override
Definition: MEtoEDMConverter.cc:93
edm::one::EDProducer
Definition: EDProducer.h:30
MEtoEDMConverter::beginJob
void beginJob() override
Definition: MEtoEDMConverter.cc:84
MEtoEDMConverter::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: MEtoEDMConverter.cc:304
MEtoEDMConverter::~MEtoEDMConverter
~MEtoEDMConverter() override
MakerMacros.h
MEtoEDMConverter::globalBeginLuminosityBlock
std::shared_ptr< meedm::Void > globalBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const override
Definition: MEtoEDMConverter.cc:98
dqm::legacy::DQMStore
Definition: DQMStore.h:727
MEtoEDMConverter::verbosity
int verbosity
Definition: MEtoEDMConverter.h:87
Service.h
Provenance.h
Run.h
MEtoEDMConverter::path
std::string path
Definition: MEtoEDMConverter.h:89
MEtoEDMConverter::globalBeginRun
std::shared_ptr< meedm::Void > globalBeginRun(edm::Run const &, const edm::EventSetup &) const override
Definition: MEtoEDMConverter.cc:86
MEtoEDMConverter
Definition: MEtoEDMConverter.h:59
meedm::Void
Definition: MEtoEDMConverter.h:53
MEtoEDMConverter::globalEndRun
void globalEndRun(edm::Run const &, const edm::EventSetup &) override
Definition: MEtoEDMConverter.cc:91
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
MEtoEDMConverter::fName
std::string fName
Definition: MEtoEDMConverter.h:86
meedm
Definition: MEtoEDMConverter.h:52
edm::EventSetup
Definition: EventSetup.h:58
MEtoEDMConverter::frequency
int frequency
Definition: MEtoEDMConverter.h:88
writedatasetfile.run
run
Definition: writedatasetfile.py:27
Frameworkfwd.h
T
long double T
Definition: Basic3DVectorLD.h:48
dqm::implementation::IGetter
Definition: DQMStore.h:484
EventSetup.h
MEtoEDMConverter::iCount
std::map< int, int > iCount
Definition: MEtoEDMConverter.h:92
MEtoEDMConverter::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: MEtoEDMConverter.h:66
ParameterSet.h
MEtoEDMConverter::globalEndLuminosityBlock
void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: MEtoEDMConverter.h:76
edm::Event
Definition: Event.h:73
lumi
Definition: LumiSectionData.h:20
g
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4