CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PerformanceAnalyzer Class Reference

#include <PerformanceAnalyzer.h>

Inheritance diagram for PerformanceAnalyzer:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 PerformanceAnalyzer (const edm::ParameterSet &)
 
 ~PerformanceAnalyzer () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Private Attributes

edm::EDGetTokenT< edm::EventTimeeventTime_Token_
 
MonitorElementfEcalUnsuppDigis
 
MonitorElementfEcalZeroSuppDigis
 
MonitorElementfg4SimHits
 
MonitorElementfHcalUnsuppDigis
 
MonitorElementfMixing
 
MonitorElementfMuonCSCDigis
 
MonitorElementfMuonDTDigis
 
MonitorElementfMuonRPCDigis
 
std::string fOutputFile
 
MonitorElementfPreShwZeroSuppDigis
 
MonitorElementfSiPixelDigis
 
MonitorElementfSiStripDigis
 
MonitorElementfVtxSmeared
 

Detailed Description

Definition at line 12 of file PerformanceAnalyzer.h.

Constructor & Destructor Documentation

PerformanceAnalyzer::PerformanceAnalyzer ( const edm::ParameterSet ps)
explicit

Definition at line 16 of file PerfomanceAnalyzer.cc.

References eventTime_Token_.

17  : fOutputFile( ps.getUntrackedParameter<std::string>("outputFile", "") )
18 {
19  eventTime_Token_ = consumes<edm::EventTime> (edm::InputTag("cputest"));
20 }
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::EventTime > eventTime_Token_
PerformanceAnalyzer::~PerformanceAnalyzer ( )
override

Definition at line 22 of file PerfomanceAnalyzer.cc.

23 {
24  // don't try to delete any pointers - they're handled by DQM machinery
25 }

Member Function Documentation

void PerformanceAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup eventSetup 
)
override

Definition at line 45 of file PerfomanceAnalyzer.cc.

References DEFINE_FWK_MODULE, edm::EventID::event(), eventTime_Token_, fEcalUnsuppDigis, fEcalZeroSuppDigis, fg4SimHits, fHcalUnsuppDigis, MonitorElement::Fill(), fMixing, fMuonCSCDigis, fMuonDTDigis, fMuonRPCDigis, fPreShwZeroSuppDigis, fSiPixelDigis, fSiStripDigis, fVtxSmeared, edm::Event::getByToken(), mps_fire::i, edm::EventBase::id(), edm::EventTime::name(), mathSSE::return(), edm::EventTime::size(), and edm::EventTime::time().

46 {
47  if ( e.id().event() == 1) return ; // skip 1st event
48 
50  e.getByToken(eventTime_Token_, EvtTime ) ;
51 
52  for ( unsigned int i=0; i<EvtTime->size(); ++i )
53  {
54  if ( EvtTime->name(i) == "VtxSmeared" ) fVtxSmeared->Fill( EvtTime->time(i) ) ;
55  if ( EvtTime->name(i) == "g4SimHits" ) fg4SimHits->Fill( EvtTime->time(i) ) ;
56  if ( EvtTime->name(i) == "mix" ) fMixing->Fill( EvtTime->time(i) ) ;
57  if ( EvtTime->name(i) == "siPixelDigis" ) fSiPixelDigis->Fill( EvtTime->time(i) ) ;
58  if ( EvtTime->name(i) == "siStripDigis" ) fSiStripDigis->Fill( EvtTime->time(i) ) ;
59  if ( EvtTime->name(i) == "ecalUnsuppressedDigis" ) fEcalUnsuppDigis->Fill( EvtTime->time(i) ) ;
60  if ( EvtTime->name(i) == "ecalDigis") fEcalZeroSuppDigis->Fill( EvtTime->time(i) ) ;
61  if ( EvtTime->name(i) == "ecalPreshowerDigis") fPreShwZeroSuppDigis->Fill( EvtTime->time(i) ) ;
62  if ( EvtTime->name(i) == "hcalDigis" ) fHcalUnsuppDigis->Fill( EvtTime->time(i) ) ;
63  if ( EvtTime->name(i) == "muonCSCDigis" ) fMuonCSCDigis->Fill( EvtTime->time(i) ) ;
64  if ( EvtTime->name(i) == "muonDTDigis" ) fMuonDTDigis->Fill( EvtTime->time(i) ) ;
65  if ( EvtTime->name(i) == "muonRPCDigis" ) fMuonRPCDigis->Fill( EvtTime->time(i) ) ;
66  }
67  return ;
68 }
EventNumber_t event() const
Definition: EventID.h:41
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
unsigned size() const
Definition: ModuleTiming.h:39
MonitorElement * fHcalUnsuppDigis
double time(unsigned i) const
Definition: ModuleTiming.h:53
return((rh^lh)&mask)
void Fill(long long x)
MonitorElement * fMuonRPCDigis
MonitorElement * fEcalUnsuppDigis
MonitorElement * fg4SimHits
edm::EDGetTokenT< edm::EventTime > eventTime_Token_
MonitorElement * fSiStripDigis
MonitorElement * fSiPixelDigis
MonitorElement * fMuonCSCDigis
MonitorElement * fVtxSmeared
MonitorElement * fEcalZeroSuppDigis
edm::EventID id() const
Definition: EventBase.h:59
MonitorElement * fMuonDTDigis
std::string name(unsigned i) const
Definition: ModuleTiming.h:48
MonitorElement * fMixing
MonitorElement * fPreShwZeroSuppDigis
void PerformanceAnalyzer::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
override

Definition at line 27 of file PerfomanceAnalyzer.cc.

References DQMStore::IBooker::book1D(), fEcalUnsuppDigis, fEcalZeroSuppDigis, fg4SimHits, fHcalUnsuppDigis, fMixing, fMuonCSCDigis, fMuonDTDigis, fMuonRPCDigis, fPreShwZeroSuppDigis, fSiPixelDigis, fSiStripDigis, fVtxSmeared, and DQMStore::IBooker::setCurrentFolder().

28 {
29  iBooker.setCurrentFolder("PerformanceV/CPUPerformanceTask");
30 
31  fVtxSmeared = iBooker.book1D("VtxSmeared", "VtxSmeared", 100, 0., 0.1 );
32  fg4SimHits = iBooker.book1D("g4SimHits", "g4SimHits", 100, 0., 500.);
33  fMixing = iBooker.book1D("Mixing", "Mixing", 100, 0., 0.5 );
34  fSiPixelDigis = iBooker.book1D("SiPixelDigis", "SiPixelDigis", 100, 0., 0.5 );
35  fSiStripDigis = iBooker.book1D("SiStripDigis", "SiStripDigis", 100, 0., 2. );
36  fEcalUnsuppDigis = iBooker.book1D("EcalUnsuppDigis", "EcalUnsuppDigis", 100, 0., 2. );
37  fEcalZeroSuppDigis = iBooker.book1D("EcalZeroSuppDigis", "EcalZeroSuppDigis", 100, 0., 2. );
38  fPreShwZeroSuppDigis = iBooker.book1D("PreShwZeroSuppDigis", "PreShwZeroSuppDigis", 100, 0., 0.1 );
39  fHcalUnsuppDigis = iBooker.book1D("HcalUnsuppDigis", "HcalUnsuppDigis", 100, 0., 0.5 );
40  fMuonCSCDigis = iBooker.book1D("MuonCSCDigis", "MuonCSCDigis", 100, 0., 0.1 );
41  fMuonDTDigis = iBooker.book1D("MuonDTDigis", "MuonDTDigis", 100, 0., 0.1 );
42  fMuonRPCDigis = iBooker.book1D("MuonRPCDigis", "MuonRPCDigis", 100, 0., 0.1 );
43 }
MonitorElement * fHcalUnsuppDigis
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * fMuonRPCDigis
MonitorElement * fEcalUnsuppDigis
MonitorElement * fg4SimHits
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * fSiStripDigis
MonitorElement * fSiPixelDigis
MonitorElement * fMuonCSCDigis
MonitorElement * fVtxSmeared
MonitorElement * fEcalZeroSuppDigis
MonitorElement * fMuonDTDigis
MonitorElement * fMixing
MonitorElement * fPreShwZeroSuppDigis

Member Data Documentation

edm::EDGetTokenT<edm::EventTime> PerformanceAnalyzer::eventTime_Token_
private

Definition at line 22 of file PerformanceAnalyzer.h.

Referenced by analyze(), and PerformanceAnalyzer().

MonitorElement* PerformanceAnalyzer::fEcalUnsuppDigis
private

Definition at line 29 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PerformanceAnalyzer::fEcalZeroSuppDigis
private

Definition at line 30 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PerformanceAnalyzer::fg4SimHits
private

Definition at line 25 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PerformanceAnalyzer::fHcalUnsuppDigis
private

Definition at line 32 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PerformanceAnalyzer::fMixing
private

Definition at line 26 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PerformanceAnalyzer::fMuonCSCDigis
private

Definition at line 33 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PerformanceAnalyzer::fMuonDTDigis
private

Definition at line 34 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PerformanceAnalyzer::fMuonRPCDigis
private

Definition at line 35 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().

std::string PerformanceAnalyzer::fOutputFile
private

Definition at line 23 of file PerformanceAnalyzer.h.

MonitorElement* PerformanceAnalyzer::fPreShwZeroSuppDigis
private

Definition at line 31 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PerformanceAnalyzer::fSiPixelDigis
private

Definition at line 27 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PerformanceAnalyzer::fSiStripDigis
private

Definition at line 28 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PerformanceAnalyzer::fVtxSmeared
private

Definition at line 24 of file PerformanceAnalyzer.h.

Referenced by analyze(), and bookHistograms().