CMS 3D CMS Logo

LHCInfoESAnalyzer.cc
Go to the documentation of this file.
1 #include <string>
2 #include <iostream>
3 #include <map>
11 
12 namespace edmtest {
14  private:
16 
17  public:
19  edm::LogPrint("LHCInfoESAnalyzer") << "LHCInfoESAnalyzer" << std::endl;
20  }
21  explicit LHCInfoESAnalyzer(int i) { edm::LogPrint("LHCInfoESAnalyzer") << "LHCInfoESAnalyzer " << i << std::endl; }
22  ~LHCInfoESAnalyzer() override { edm::LogPrint("LHCInfoESAnalyzer") << "~LHCInfoESAnalyzer " << std::endl; }
23  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
24  };
25 
27  edm::LogPrint("LHCInfoESAnalyzer") << "###LHCInfoESAnalyzer::analyze" << std::endl;
28  edm::LogPrint("LHCInfoESAnalyzer") << " I AM IN RUN NUMBER " << e.id().run() << std::endl;
29  edm::LogPrint("LHCInfoESAnalyzer") << " ---EVENT NUMBER " << e.id().event() << std::endl;
33  //record not found
34  edm::LogPrint("LHCInfoESAnalyzer") << "Record \"LHCInfoRcd"
35  << "\" does not exist " << std::endl;
36  }
37  edm::LogPrint("LHCInfoESAnalyzer") << "got eshandle" << std::endl;
39  edm::LogPrint("LHCInfoESAnalyzer") << "got context" << std::endl;
40  const LHCInfo* summary = sum.product();
41  edm::LogPrint("LHCInfoESAnalyzer") << "got LHCInfo* " << std::endl;
42  edm::LogPrint("LHCInfoESAnalyzer") << "print result" << std::endl;
43  edm::LogPrint("LHCInfoESAnalyzer") << *summary;
44  }
46 } // namespace edmtest
LHCInfoESAnalyzer(edm::ParameterSet const &p)
T const * product() const
Definition: ESHandle.h:86
void analyze(const edm::Event &e, const edm::EventSetup &c) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Log< level::Warning, true > LogPrint
heterocontainer::HCTypeTag TypeTag
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