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 {
14  public:
15  explicit FillInfoESAnalyzer(edm::ParameterSet const& p) { std::cout << "FillInfoESAnalyzer" << std::endl; }
16  explicit FillInfoESAnalyzer(int i) { std::cout << "FillInfoESAnalyzer " << i << std::endl; }
17  ~FillInfoESAnalyzer() override { std::cout << "~FillInfoESAnalyzer " << std::endl; }
18  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
19  };
20 
22  std::cout << "###FillInfoESAnalyzer::analyze" << std::endl;
23  std::cout << " I AM IN RUN NUMBER " << e.id().run() << std::endl;
24  std::cout << " ---EVENT NUMBER " << e.id().event() << std::endl;
28  //record not found
29  std::cout << "Record \"FillInfoRcd"
30  << "\" does not exist " << std::endl;
31  }
33  std::cout << "got eshandle" << std::endl;
34  context.get<FillInfoRcd>().get(sum);
35  std::cout << "got context" << std::endl;
36  const FillInfo* summary = sum.product();
37  std::cout << "got FillInfo* " << std::endl;
38  std::cout << "print result" << std::endl;
39  std::cout << *summary;
40  }
42 } // namespace edmtest
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
edm::eventsetup::heterocontainer::HCTypeTag::findType
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
mps_fire.i
i
Definition: mps_fire.py:428
ESHandle.h
edmtest
Definition: AlignPCLThresholdsReader.cc:12
FillInfo
Definition: FillInfo.h:13
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
FillInfoRcd
Definition: FillInfoRcd.h:24
EDAnalyzer.h
edmtest::FillInfoESAnalyzer::FillInfoESAnalyzer
FillInfoESAnalyzer(int i)
Definition: FillInfoESAnalyzer.cc:16
edm::eventsetup::EventSetupRecordKey
Definition: EventSetupRecordKey.h:30
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
MakerMacros.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ESHandle
Definition: DTSurvey.h:22
edm::eventsetup::EventSetupRecordKey::TypeTag
heterocontainer::HCTypeTag TypeTag
Definition: EventSetupRecordKey.h:32
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
edm::eventsetup::EventSetupRecordKey::type
const TypeTag & type() const
Definition: EventSetupRecordKey.h:40
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
get
#define get
edmtest::FillInfoESAnalyzer
Definition: FillInfoESAnalyzer.cc:13
EventSetup.h
edmtest::FillInfoESAnalyzer::~FillInfoESAnalyzer
~FillInfoESAnalyzer() override
Definition: FillInfoESAnalyzer.cc:17
FillInfo.h
edm::Event
Definition: Event.h:73
FillInfoRcd.h
edmtest::FillInfoESAnalyzer::FillInfoESAnalyzer
FillInfoESAnalyzer(edm::ParameterSet const &p)
Definition: FillInfoESAnalyzer.cc:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
edmtest::FillInfoESAnalyzer::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: FillInfoESAnalyzer.cc:21