CMS 3D CMS Logo

EDMtoMEConverter.h
Go to the documentation of this file.
1 #ifndef EDMtoMEConverter_h
2 #define EDMtoMEConverter_h
3 
12 // framework & common header files
27 
28 //DQM services
31 
32 // data format
35 
36 // helper files
37 #include <iostream>
38 #include <cstdlib>
39 #include <string>
40 #include <memory>
41 #include <vector>
42 #include <map>
43 #include <tuple>
44 
45 #include "TString.h"
46 #include "TList.h"
47 
48 #include "classlib/utils/StringList.h"
49 #include "classlib/utils/StringOps.h"
50 
51 class EDMtoMEConverter : public edm::one::EDProducer<edm::one::WatchRuns,
52  edm::one::WatchLuminosityBlocks,
53  edm::one::SharedResources,
54  edm::EndLuminosityBlockProducer,
55  edm::EndRunProducer> {
56 public:
59 
60  explicit EDMtoMEConverter(const edm::ParameterSet&);
61  ~EDMtoMEConverter() override;
62 
63  void beginRun(const edm::Run&, const edm::EventSetup&) final{};
64  void endRun(const edm::Run&, const edm::EventSetup&) final{};
67  void produce(edm::Event&, edm::EventSetup const&) final{};
68 
70  void endRunProduce(edm::Run& run, edm::EventSetup const& setup) override;
71 
72  template <class T>
73  void getData(DQMStore::IBooker& iBooker, DQMStore::IGetter& iGetter, T& iGetFrom);
74 
75  using TagList = std::vector<uint32_t>;
76 
77 private:
79  int verbosity;
80  int frequency;
81 
85 
86  template <typename T>
87  class Tokens {
88  public:
89  using type = T;
91 
92  Tokens() = default;
93 
95 
96  void getData(const edm::Run& iRun, edm::Handle<Product>& handle) const;
97  void getData(const edm::LuminosityBlock& iLumi, edm::Handle<Product>& handle) const;
98 
99  private:
102  };
103 
104  std::tuple<Tokens<TH1F>,
105  Tokens<TH1S>,
106  Tokens<TH1D>,
107  Tokens<TH2F>,
108  Tokens<TH2S>,
109  Tokens<TH2D>,
110  Tokens<TH3F>,
114  Tokens<int>,
118 
121 }; // end class declaration
122 
123 #endif
EDMtoMEConverter::endRunProduce
void endRunProduce(edm::Run &run, edm::EventSetup const &setup) override
Definition: EDMtoMEConverter.cc:310
EDMtoMEConverter::endLuminosityBlock
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
Definition: EDMtoMEConverter.h:66
EDMtoMEConverter::produce
void produce(edm::Event &, edm::EventSetup const &) final
Definition: EDMtoMEConverter.h:67
Handle.h
EDMtoMEConverter::Tokens
Definition: EDMtoMEConverter.h:87
EDProducer.h
MessageLogger.h
EDMtoMEConverter::dqmLumiToken_
edm::EDPutTokenT< DQMToken > dqmLumiToken_
Definition: EDMtoMEConverter.h:119
ESHandle.h
EDMtoMEConverter::tokens_
std::tuple< Tokens< TH1F >, Tokens< TH1S >, Tokens< TH1D >, Tokens< TH2F >, Tokens< TH2S >, Tokens< TH2D >, Tokens< TH3F >, Tokens< TProfile >, Tokens< TProfile2D >, Tokens< double >, Tokens< int >, Tokens< long long >, Tokens< TString > > tokens_
Definition: EDMtoMEConverter.h:117
MEtoEDM
Definition: MEtoEDMFormat.h:37
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
patZpeak.handle
handle
Definition: patZpeak.py:23
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< Product >
LuminosityBlock.h
edm::EDPutTokenT< DQMToken >
EDMtoMEConverter::convertOnEndLumi
bool convertOnEndLumi
Definition: EDMtoMEConverter.h:82
EDMtoMEConverter::Tokens::set
void set(const edm::InputTag &runInputTag, const edm::InputTag &lumiInputTag, edm::ConsumesCollector &iC)
Definition: EDMtoMEConverter.cc:20
EDMtoMEConverter::Tokens::getData
void getData(const edm::Run &iRun, edm::Handle< Product > &handle) const
Definition: EDMtoMEConverter.cc:28
EDMtoMEConverter::Tokens::runToken
edm::EDGetTokenT< Product > runToken
Definition: EDMtoMEConverter.h:100
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
edm::one::EDProducer
Definition: EDProducer.h:30
EDMtoMEConverter::verbosity
int verbosity
Definition: EDMtoMEConverter.h:79
EDMtoMEConverter::Tokens::type
T type
Definition: EDMtoMEConverter.h:89
edm::Handle
Definition: AssociativeIterator.h:50
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
EDMtoMEConverter::convertOnEndRun
bool convertOnEndRun
Definition: EDMtoMEConverter.h:83
EDMtoMEConverter::frequency
int frequency
Definition: EDMtoMEConverter.h:80
MakerMacros.h
EDMtoMEConverter::reScope
MonitorElementData::Scope reScope
Definition: EDMtoMEConverter.h:84
EDMtoMEConverter::TagList
std::vector< uint32_t > TagList
Definition: EDMtoMEConverter.h:75
dqm::legacy::DQMStore
Definition: DQMStore.h:728
DQMToken.h
EDMtoMEConverter::name
std::string name
Definition: EDMtoMEConverter.h:78
Service.h
EDMtoMEConverter::Tokens::lumiToken
edm::EDGetTokenT< Product > lumiToken
Definition: EDMtoMEConverter.h:101
Run.h
MonitorElementData::Scope
Scope
Definition: MonitorElementCollection.h:152
EDMtoMEConverter::getData
void getData(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, T &iGetFrom)
Definition: EDMtoMEConverter.cc:329
MEtoEDMFormat.h
EDMtoMEConverter::EDMtoMEConverter
EDMtoMEConverter(const edm::ParameterSet &)
Definition: EDMtoMEConverter.cc:264
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
EDMtoMEConverter::beginLuminosityBlock
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
Definition: EDMtoMEConverter.h:65
EDPutToken.h
EDMtoMEConverter_cfi.runInputTag
runInputTag
Definition: EDMtoMEConverter_cfi.py:12
EDMtoMEConverter::Tokens::Tokens
Tokens()=default
edm::EventSetup
Definition: EventSetup.h:58
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EDMtoMEConverter::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: EDMtoMEConverter.h:57
InputTag.h
FileBlock.h
writedatasetfile.run
run
Definition: writedatasetfile.py:27
EDMtoMEConverter::endLuminosityBlockProduce
void endLuminosityBlockProduce(edm::LuminosityBlock &, edm::EventSetup const &) override
Definition: EDMtoMEConverter.cc:319
Frameworkfwd.h
T
long double T
Definition: Basic3DVectorLD.h:48
dqm::implementation::IGetter
Definition: DQMStore.h:484
EDMtoMEConverter::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) final
Definition: EDMtoMEConverter.h:63
EDMtoMEConverter::~EDMtoMEConverter
~EDMtoMEConverter() override
EventSetup.h
EDMtoMEConverter::dqmRunToken_
edm::EDPutTokenT< DQMToken > dqmRunToken_
Definition: EDMtoMEConverter.h:120
dqm::implementation::IBooker
Definition: DQMStore.h:43
EDMtoMEConverter::endRun
void endRun(const edm::Run &, const edm::EventSetup &) final
Definition: EDMtoMEConverter.h:64
ParameterSet.h
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
EDMtoMEConverter
Definition: EDMtoMEConverter.h:51
EDMtoMEConverter::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: EDMtoMEConverter.h:58
EDMtoMEConverter_cfi.lumiInputTag
lumiInputTag
Definition: EDMtoMEConverter_cfi.py:13