CMS 3D CMS Logo

DQMSummaryEventSetupAnalyzer.cc
Go to the documentation of this file.
9 
10 namespace edmtest {
12  public:
14  explicit DQMSummaryEventSetupAnalyzer(int i);
16  void analyze(const edm::Event& event, const edm::EventSetup& setup) override;
17 
18  private:
20  };
21 
23  : dqmSummaryToken_(esConsumes()) {
24  edm::LogPrint("DQMSummaryEventSetupAnalyzer") << "DQMSummaryEventSetupAnalyzer" << std::endl;
25  }
26 
28  edm::LogPrint("DQMSummaryEventSetupAnalyzer") << "DQMSummaryEventSetupAnalyzer" << i << std::endl;
29  }
30 
32  edm::LogPrint("DQMSummaryEventSetupAnalyzer") << "~DQMSummaryEventSetupAnalyzer" << std::endl;
33  }
34 
36  edm::LogPrint("DQMSummaryEventSetupAnalyzer") << "### DQMSummaryEventSetupAnalyzer::analyze" << std::endl;
37  edm::LogPrint("DQMSummaryEventSetupAnalyzer") << "--- RUN NUMBER: " << event.id().run() << std::endl;
38  edm::LogPrint("DQMSummaryEventSetupAnalyzer") << "--- EVENT NUMBER: " << event.id().event() << std::endl;
42  throw cms::Exception("Record not found") << "Record \"DQMSummaryRcd"
43  << "\" does not exist!" << std::endl;
44  }
45 
46  edm::LogPrint("DQMSummaryEventSetupAnalyzer") << "got EShandle" << std::endl;
48  edm::LogPrint("DQMSummaryEventSetupAnalyzer") << "got the Event Setup" << std::endl;
49  const DQMSummary* summary = sum.product();
50  edm::LogPrint("DQMSummaryEventSetupAnalyzer") << "got DQMSummary* " << std::endl;
51  edm::LogPrint("DQMSummaryEventSetupAnalyzer") << "print result" << std::endl;
52  summary->printAllValues();
53  }
54 
56 } // namespace edmtest
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
DQMSummaryEventSetupAnalyzer(const edm::ParameterSet &pset)
T const * product() const
Definition: ESHandle.h:86
const edm::ESGetToken< DQMSummary, DQMSummaryRcd > dqmSummaryToken_
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Log< level::Warning, true > LogPrint
heterocontainer::HCTypeTag TypeTag
Definition: event.py:1
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