CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
DQMSummaryEventSetupAnalyzer(const edm::ParameterSet &pset)
const edm::ESGetToken< DQMSummary, DQMSummaryRcd > dqmSummaryToken_
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
void printAllValues() const
Definition: DQMSummary.h:39
Log< level::Warning, true > LogPrint
T const * product() const
Definition: ESHandle.h:86
heterocontainer::HCTypeTag TypeTag
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
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