CMS 3D CMS Logo

SiPixelPerformanceSummaryReader.cc
Go to the documentation of this file.
1 // system includes
2 #include <cstdio>
3 #include <iostream>
4 #include <sys/time.h>
5 
6 // user includes
17 
18 using namespace cms;
19 using namespace std;
20 
21 namespace cms {
23  public:
26 
27  void analyze(const edm::Event&, const edm::EventSetup&) override;
28 
29  private:
31  const bool printdebug_;
32  };
33 } // namespace cms
34 
36  : perfSummaryToken_(esConsumes()), printdebug_(iConfig.getUntrackedParameter<bool>("printDebug", false)) {}
37 
39 
41  edm::LogInfo("SiPixelPerformanceSummaryReader") << "start reading SiPixelPerformanceSummary" << endl;
42  const SiPixelPerformanceSummary* SiPixelPerformanceSummary_ = &iSetup.getData(perfSummaryToken_);
43  edm::LogInfo("SiPixelPerformanceSummaryReader") << "end reading SiPixelPerformanceSummary" << endl;
44 
45  SiPixelPerformanceSummary_->print();
46  vector<uint32_t> allDetIds = SiPixelPerformanceSummary_->getAllDetIds();
47  if (!allDetIds.empty())
48  SiPixelPerformanceSummary_->print(allDetIds[0]);
49  SiPixelPerformanceSummary_->printAll();
50 }
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const edm::ESGetToken< SiPixelPerformanceSummary, SiPixelPerformanceSummaryRcd > perfSummaryToken_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
bool getData(T &iHolder) const
Definition: EventSetup.h:122
std::vector< uint32_t > getAllDetIds() const
Namespace of DDCMS conversion namespace.
Log< level::Info, false > LogInfo
void analyze(const edm::Event &, const edm::EventSetup &) override