#include <PerformanceAnalyzer.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
PerformanceAnalyzer (const edm::ParameterSet &) | |
~PerformanceAnalyzer () | |
Private Attributes | |
DQMStore * | fDBE |
MonitorElement * | fEcalUnsuppDigis |
MonitorElement * | fEcalZeroSuppDigis |
MonitorElement * | fg4SimHits |
MonitorElement * | fHcalUnsuppDigis |
MonitorElement * | fMixing |
MonitorElement * | fMuonCSCDigis |
MonitorElement * | fMuonDTDigis |
MonitorElement * | fMuonRPCDigis |
std::string | fOutputFile |
MonitorElement * | fPreShwZeroSuppDigis |
MonitorElement * | fSiPixelDigis |
MonitorElement * | fSiStripDigis |
MonitorElement * | fVtxSmeared |
Definition at line 11 of file PerformanceAnalyzer.h.
PerformanceAnalyzer::PerformanceAnalyzer | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 18 of file PerfomanceAnalyzer.cc.
References DQMStore::book1D(), fDBE, fEcalUnsuppDigis, fEcalZeroSuppDigis, fg4SimHits, fHcalUnsuppDigis, fMixing, fMuonCSCDigis, fMuonDTDigis, fMuonRPCDigis, fPreShwZeroSuppDigis, fSiPixelDigis, fSiStripDigis, fVtxSmeared, NULL, and DQMStore::setCurrentFolder().
: fDBE( edm::Service<DQMStore>().operator->() ), fOutputFile( ps.getUntrackedParameter<std::string>("outputFile", "") ) { if ( fDBE != NULL ) { fDBE->setCurrentFolder("PerformanceV/CPUPerformanceTask"); // is there any way to record CPU Info ??? // if so, it can be done once - via beginJob() fVtxSmeared = fDBE->book1D( "VtxSmeared", "VtxSmeared", 100, 0., 0.1 ) ; fg4SimHits = fDBE->book1D( "g4SimHits", "g4SimHits", 100, 0., 500. ) ; fMixing = fDBE->book1D( "Mixing", "Mixing", 100, 0., 0.5 ) ; fSiPixelDigis = fDBE->book1D( "SiPixelDigis","SiPixelDigis", 100, 0., 0.5 ) ; fSiStripDigis = fDBE->book1D( "SiStripDigis","SiStripDigis", 100, 0., 2. ) ; fEcalUnsuppDigis = fDBE->book1D( "EcalUnsuppDigis","EcalUnsuppDigis", 100, 0., 2. ) ; fEcalZeroSuppDigis = fDBE->book1D( "EcalZeroSuppDigis","EcalZeroSuppDigis", 100, 0., 2. ) ; fPreShwZeroSuppDigis = fDBE->book1D( "PreShwZeroSuppDigis","PreShwZeroSuppDigis", 100, 0., 0.1 ) ; fHcalUnsuppDigis = fDBE->book1D( "HcalUnsuppDigis","HcalUnsuppDigis", 100, 0., 0.5 ) ; fMuonCSCDigis = fDBE->book1D( "MuonCSCDigis", "MuonCSCDigis", 100, 0., 0.1 ) ; fMuonDTDigis = fDBE->book1D( "MuonDTDigis", "MuonDTDigis", 100, 0., 0.1 ) ; fMuonRPCDigis = fDBE->book1D( "MuonRPCDigis", "MuonRPCDigis", 100, 0., 0.1 ) ; } }
PerformanceAnalyzer::~PerformanceAnalyzer | ( | ) |
Definition at line 46 of file PerfomanceAnalyzer.cc.
{
// don't try to delete any pointers - they're handled by DQM machinery
}
void PerformanceAnalyzer::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | eventSetup | ||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 62 of file PerfomanceAnalyzer.cc.
References edm::EventID::event(), fEcalUnsuppDigis, fEcalZeroSuppDigis, fg4SimHits, fHcalUnsuppDigis, MonitorElement::Fill(), fMixing, fMuonCSCDigis, fMuonDTDigis, fMuonRPCDigis, fPreShwZeroSuppDigis, fSiPixelDigis, fSiStripDigis, fVtxSmeared, edm::Event::getByLabel(), i, and edm::EventBase::id().
{ if ( e.id().event() == 1) return ; // skip 1st event edm::Handle<edm::EventTime> EvtTime; e.getByLabel( "cputest", EvtTime ) ; for ( unsigned int i=0; i<EvtTime->size(); ++i ) { if ( EvtTime->name(i) == "VtxSmeared" ) fVtxSmeared->Fill( EvtTime->time(i) ) ; if ( EvtTime->name(i) == "g4SimHits" ) fg4SimHits->Fill( EvtTime->time(i) ) ; if ( EvtTime->name(i) == "mix" ) fMixing->Fill( EvtTime->time(i) ) ; if ( EvtTime->name(i) == "siPixelDigis" ) fSiPixelDigis->Fill( EvtTime->time(i) ) ; if ( EvtTime->name(i) == "siStripDigis" ) fSiStripDigis->Fill( EvtTime->time(i) ) ; if ( EvtTime->name(i) == "ecalUnsuppressedDigis" ) fEcalUnsuppDigis->Fill( EvtTime->time(i) ) ; if ( EvtTime->name(i) == "ecalDigis") fEcalZeroSuppDigis->Fill( EvtTime->time(i) ) ; if ( EvtTime->name(i) == "ecalPreshowerDigis") fPreShwZeroSuppDigis->Fill( EvtTime->time(i) ) ; if ( EvtTime->name(i) == "hcalDigis" ) fHcalUnsuppDigis->Fill( EvtTime->time(i) ) ; if ( EvtTime->name(i) == "muonCSCDigis" ) fMuonCSCDigis->Fill( EvtTime->time(i) ) ; if ( EvtTime->name(i) == "muonDTDigis" ) fMuonDTDigis->Fill( EvtTime->time(i) ) ; if ( EvtTime->name(i) == "muonRPCDigis" ) fMuonRPCDigis->Fill( EvtTime->time(i) ) ; } return ; }
virtual void PerformanceAnalyzer::beginJob | ( | void | ) | [inline, virtual] |
void PerformanceAnalyzer::endJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 52 of file PerfomanceAnalyzer.cc.
References fDBE, fOutputFile, and DQMStore::save().
{ if ( fOutputFile.size() != 0 && fDBE ) fDBE->save(fOutputFile); return ; }
DQMStore* PerformanceAnalyzer::fDBE [private] |
Definition at line 23 of file PerformanceAnalyzer.h.
Referenced by endJob(), and PerformanceAnalyzer().
Definition at line 30 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().
Definition at line 31 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().
MonitorElement* PerformanceAnalyzer::fg4SimHits [private] |
Definition at line 26 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().
Definition at line 33 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().
MonitorElement* PerformanceAnalyzer::fMixing [private] |
Definition at line 27 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().
MonitorElement* PerformanceAnalyzer::fMuonCSCDigis [private] |
Definition at line 34 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().
MonitorElement* PerformanceAnalyzer::fMuonDTDigis [private] |
Definition at line 35 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().
MonitorElement* PerformanceAnalyzer::fMuonRPCDigis [private] |
Definition at line 36 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().
std::string PerformanceAnalyzer::fOutputFile [private] |
Definition at line 24 of file PerformanceAnalyzer.h.
Referenced by endJob().
Definition at line 32 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().
MonitorElement* PerformanceAnalyzer::fSiPixelDigis [private] |
Definition at line 28 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().
MonitorElement* PerformanceAnalyzer::fSiStripDigis [private] |
Definition at line 29 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().
MonitorElement* PerformanceAnalyzer::fVtxSmeared [private] |
Definition at line 25 of file PerformanceAnalyzer.h.
Referenced by analyze(), and PerformanceAnalyzer().