CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
94  void set(const edm::InputTag& runInputTag, const edm::InputTag& lumiInputTag, edm::ConsumesCollector& iC);
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
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_
tuple handle
Definition: patZpeak.py:25
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 set(const edm::InputTag &runInputTag, const edm::InputTag &lumiInputTag, edm::ConsumesCollector &iC)
std::vector< uint32_t > TagList
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
MonitorElementData::Scope reScope