CMS 3D CMS Logo

FillInfoESAnalyzer.cc
Go to the documentation of this file.
1 #include <string>
2 #include <iostream>
3 #include <map>
11 
12 namespace edmtest
13 {
15  {
16  public:
18  std::cout<<"FillInfoESAnalyzer"<<std::endl;
19  }
20  explicit FillInfoESAnalyzer(int i) {
21  std::cout<<"FillInfoESAnalyzer "<<i<<std::endl;
22  }
23  ~FillInfoESAnalyzer() override {
24  std::cout<<"~FillInfoESAnalyzer "<<std::endl;
25  }
26  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
27  };
28 
29  void
31  std::cout<<"###FillInfoESAnalyzer::analyze"<<std::endl;
32  std::cout <<" I AM IN RUN NUMBER "<<e.id().run() <<std::endl;
33  std::cout <<" ---EVENT NUMBER "<<e.id().event() <<std::endl;
36  //record not found
37  std::cout <<"Record \"FillInfoRcd"<<"\" does not exist "<<std::endl;
38  }
40  std::cout<<"got eshandle"<<std::endl;
41  context.get<FillInfoRcd>().get(sum);
42  std::cout<<"got context"<<std::endl;
43  const FillInfo* summary=sum.product();
44  std::cout<<"got FillInfo* "<< std::endl;
45  std::cout<< "print result" << std::endl;
46  std::cout << *summary;
47  }
49 }
50 
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
FillInfoESAnalyzer(edm::ParameterSet const &p)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
const T & get() const
Definition: EventSetup.h:55
heterocontainer::HCTypeTag TypeTag
edm::EventID id() const
Definition: EventBase.h:60
T const * product() const
Definition: ESHandle.h:86