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 <stdlib.h>
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  virtual ~EDMtoMEConverter();
57  virtual void beginJob();
58  virtual void endJob();
59  virtual void analyze(const edm::Event&, const edm::EventSetup&);
60  virtual void beginRun(const edm::Run&, const edm::EventSetup&);
61  virtual void endRun(const edm::Run&, const edm::EventSetup&);
62  virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
63  virtual void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
64  virtual void respondToOpenInputFile(const edm::FileBlock&);
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
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< uint32_t > TagList
EDMtoMEConverter(const edm::ParameterSet &)
virtual void endRun(const edm::Run &, const edm::EventSetup &)
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
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
virtual void endJob()
virtual void beginJob()
virtual void respondToOpenInputFile(const edm::FileBlock &)
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
virtual ~EDMtoMEConverter()
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:42
std::map< int, int > iCount