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 beginJob() final{};
64  void endJob() final{};
65  void beginRun(const edm::Run&, const edm::EventSetup&) final{};
66  void endRun(const edm::Run&, const edm::EventSetup&) final{};
69  void produce(edm::Event&, edm::EventSetup const&) final{};
70 
72  void endRunProduce(edm::Run& run, edm::EventSetup const& setup) override;
73 
74  template <class T>
75  void getData(DQMStore::IBooker& iBooker, DQMStore::IGetter& iGetter, T& iGetFrom);
76 
77  using TagList = std::vector<uint32_t>;
78 
79 private:
81  int verbosity;
82  int frequency;
83 
86 
87  template <typename T>
88  class Tokens {
89  public:
90  using type = T;
92 
93  Tokens() = default;
94 
96 
97  void getData(const edm::Run& iRun, edm::Handle<Product>& handle) const;
98  void getData(const edm::LuminosityBlock& iLumi, edm::Handle<Product>& handle) const;
99 
100  private:
103  };
104 
105  std::tuple<Tokens<TH1F>,
106  Tokens<TH1S>,
107  Tokens<TH1D>,
108  Tokens<TH2F>,
109  Tokens<TH2S>,
110  Tokens<TH2D>,
111  Tokens<TH3F>,
115  Tokens<int>,
119 
122 }; // end class declaration
123 
124 #endif
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
void endLuminosityBlockProduce(edm::LuminosityBlock &, edm::EventSetup const &) override
dqm::legacy::DQMStore DQMStore
EDMtoMEConverter(const edm::ParameterSet &)
void beginRun(const edm::Run &, const edm::EventSetup &) final
dqm::legacy::MonitorElement MonitorElement
~EDMtoMEConverter() override
void endRunProduce(edm::Run &run, edm::EventSetup const &setup) override
edm::EDGetTokenT< Product > runToken
void endRun(const edm::Run &, const edm::EventSetup &) final
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
void produce(edm::Event &, edm::EventSetup const &) final
edm::EDPutTokenT< DQMToken > dqmRunToken_
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_
edm::EDPutTokenT< DQMToken > dqmLumiToken_
void beginJob() final
std::vector< uint32_t > TagList
void endJob() final
void getData(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, T &iGetFrom)
void getData(const edm::Run &iRun, edm::Handle< Product > &handle) const
long double T
edm::EDGetTokenT< Product > lumiToken
Definition: Run.h:45