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
26 
27 //DQM services
31 
32 // data format
34 
35 // helper files
36 #include <iostream>
37 #include <cstdlib>
38 #include <string>
39 #include <memory>
40 #include <vector>
41 #include <map>
42 #include <tuple>
43 
44 #include "TString.h"
45 #include "TList.h"
46 
47 #include "classlib/utils/StringList.h"
48 #include "classlib/utils/StringOps.h"
49 
51 {
52 
53  public:
54 
55  explicit EDMtoMEConverter(const edm::ParameterSet&);
56  ~EDMtoMEConverter() override;
57  void beginJob() override;
58  void endJob() override;
59  void analyze(const edm::Event&, const edm::EventSetup&) override;
60  void beginRun(const edm::Run&, const edm::EventSetup&) override;
61  void endRun(const edm::Run&, const edm::EventSetup&) override;
62  void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override;
63  void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override;
64  void respondToOpenInputFile(const edm::FileBlock&) override;
65 
66  template <class T>
67  void getData(T& iGetFrom);
68 
69  typedef std::vector<uint32_t> TagList;
70 
71  private:
72 
74  int verbosity;
75  int frequency;
76 
79 
81 
82  // private statistics information
83  unsigned int iCountf;
84  std::map<int,int> iCount;
85 
86  template <typename T>
87  class Tokens {
88  public:
89  using type = T;
91 
92  Tokens() {}
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<
105  Tokens<TH1F>,
106  Tokens<TH1S>,
107  Tokens<TH1D>,
108  Tokens<TH2F>,
109  Tokens<TH2S>,
110  Tokens<TH2D>,
111  Tokens<TH3F>,
115  Tokens<int>,
119 }; // end class declaration
120 
121 #endif
std::vector< uint32_t > TagList
void beginRun(const edm::Run &, const edm::EventSetup &) override
void analyze(const edm::Event &, const edm::EventSetup &) override
void endRun(const edm::Run &, const edm::EventSetup &) override
void respondToOpenInputFile(const edm::FileBlock &) override
EDMtoMEConverter(const edm::ParameterSet &)
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
~EDMtoMEConverter() override
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::EDGetTokenT< Product > runToken
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void beginJob() override
void endJob() override
void getData(const edm::Run &iRun, edm::Handle< Product > &handle) const
long double T
unsigned int iCountf
void getData(T &iGetFrom)
edm::EDGetTokenT< Product > lumiToken
Definition: Run.h:43
std::map< int, int > iCount