CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LHCInfoESAnalyzer.cc
Go to the documentation of this file.
1 #include <string>
2 #include <iostream>
3 #include <map>
10 
11 namespace edmtest {
13  private:
15 
16  public:
18  edm::LogPrint("LHCInfoESAnalyzer") << "LHCInfoESAnalyzer" << std::endl;
19  }
20  explicit LHCInfoESAnalyzer(int i) { edm::LogPrint("LHCInfoESAnalyzer") << "LHCInfoESAnalyzer " << i << std::endl; }
21  ~LHCInfoESAnalyzer() override { edm::LogPrint("LHCInfoESAnalyzer") << "~LHCInfoESAnalyzer " << std::endl; }
22  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
23  };
24 
26  edm::LogPrint("LHCInfoESAnalyzer") << "###LHCInfoESAnalyzer::analyze" << std::endl;
27  edm::LogPrint("LHCInfoESAnalyzer") << " I AM IN RUN NUMBER " << e.id().run() << std::endl;
28  edm::LogPrint("LHCInfoESAnalyzer") << " ---EVENT NUMBER " << e.id().event() << std::endl;
32  //record not found
33  edm::LogPrint("LHCInfoESAnalyzer") << "Record \"LHCInfoRcd"
34  << "\" does not exist " << std::endl;
35  }
36  edm::LogPrint("LHCInfoESAnalyzer") << "got eshandle" << std::endl;
38  edm::LogPrint("LHCInfoESAnalyzer") << "got context" << std::endl;
39  const LHCInfo* summary = sum.product();
40  edm::LogPrint("LHCInfoESAnalyzer") << "got LHCInfo* " << std::endl;
41  edm::LogPrint("LHCInfoESAnalyzer") << "print result" << std::endl;
42  edm::LogPrint("LHCInfoESAnalyzer") << *summary;
43  }
45 } // namespace edmtest
RunNumber_t run() const
Definition: EventID.h:38
EventNumber_t event() const
Definition: EventID.h:40
const edm::EventSetup & c
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
LHCInfoESAnalyzer(edm::ParameterSet const &p)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Log< level::Warning, true > LogPrint
T const * product() const
Definition: ESHandle.h:86
heterocontainer::HCTypeTag TypeTag
edm::EventID id() const
Definition: EventBase.h:59
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
const edm::ESGetToken< LHCInfo, LHCInfoRcd > m_LHCInfoToken
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:121