CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
PerformanceAnalyzer Class Reference

#include <PerformanceAnalyzer.h>

Inheritance diagram for PerformanceAnalyzer:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 PerformanceAnalyzer (const edm::ParameterSet &)
 
 ~PerformanceAnalyzer ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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_, and HLT_FULL_cff::InputTag.

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 ( )

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 
)
virtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 45 of file PerfomanceAnalyzer.cc.

References edm::EventID::event(), eventTime_Token_, fEcalUnsuppDigis, fEcalZeroSuppDigis, fg4SimHits, fHcalUnsuppDigis, MonitorElement::Fill(), fMixing, fMuonCSCDigis, fMuonDTDigis, fMuonRPCDigis, fPreShwZeroSuppDigis, fSiPixelDigis, fSiStripDigis, fVtxSmeared, edm::Event::getByToken(), i, edm::EventBase::id(), and reco::return().

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
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
MonitorElement * fHcalUnsuppDigis
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
return(e1-e2)*(e1-e2)+dp *dp
edm::EventID id() const
Definition: EventBase.h:59
MonitorElement * fMuonDTDigis
MonitorElement * fMixing
MonitorElement * fPreShwZeroSuppDigis
void PerformanceAnalyzer::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

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
MonitorElement * fMuonRPCDigis
MonitorElement * fEcalUnsuppDigis
MonitorElement * fg4SimHits
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * fSiStripDigis
MonitorElement * fSiPixelDigis
MonitorElement * fMuonCSCDigis
MonitorElement * fVtxSmeared
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
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().