LCIO
02.17
|
BenchmarkListener class Simple event/run listener getting memory/proc statistics on callback. More...
Public Member Functions | |
BenchmarkListener (const BenchmarkListener &)=delete | |
BenchmarkListener & | operator= (const BenchmarkListener &)=delete |
BenchmarkListener (const std::string &fname) | |
Constructor. More... | |
~BenchmarkListener () | |
Destructor. More... | |
void | processEvent (EVENT::LCEvent *evt) |
Extract and fill benchmark variables. More... | |
void | getVariables (EVENT::LCEvent *event) |
Extract benchmark variables. More... | |
void | write () |
Write benchmarks to ROOT file. More... | |
![]() | |
virtual | ~LCEventListener () |
Destructor. More... | |
![]() | |
virtual | ~LCRunListener () |
Destructor. More... | |
Private Member Functions | |
void | modifyEvent (EVENT::LCEvent *) |
Call back for updating an LCEvent. More... | |
void | processRunHeader (EVENT::LCRunHeader *) |
Call back for processing an LCRunHeader. More... | |
void | modifyRunHeader (EVENT::LCRunHeader *) |
Call back for modifying an existing LCRunHeader. More... | |
Private Attributes | |
std::shared_ptr< TFile > | m_pTFile {nullptr} |
Output root file with benchmarking info. More... | |
TTree * | m_pTTree {nullptr} |
Output ROOT tree. More... | |
IO::LCWriter * | m_lcWriter {nullptr} |
LCIO output file writer. More... | |
std::stringstream | m_lcioOutputFileName {} |
The LCIO output file name. More... | |
Float_t | m_readTime {0} |
Event reading time. More... | |
clock_t | m_firstClock {0} |
The first clock measurement on instance creation. More... | |
clock_t | m_lastClock {0} |
The last clock measurement on processEvent() More... | |
Long_t | m_residentMemoryReference {0} |
The resident set size on instance creation (reference) More... | |
Long_t | m_readResidentMemory {0} |
The resident set size after reading an event (minus reference) More... | |
Int_t | m_entry {0} |
The current entry id while filling the tree (for easy plotting) More... | |
Float_t | m_writeTime {0} |
The event write time. More... | |
Long_t | m_writeRSS {0} |
The resisdent set size after writing. More... | |
Long_t | m_procRSS {0} |
The process resident set size taken in processEvent callback. More... | |
BenchmarkListener class Simple event/run listener getting memory/proc statistics on callback.
Definition at line 24 of file lcio_io_benchmark.cc.
|
delete |
|
inline |
Constructor.
fname | the ROOT output file with statistics |
Definition at line 34 of file lcio_io_benchmark.cc.
References std::string::c_str(), std::clock(), and std::endl().
|
inline |
|
inline |
Extract benchmark variables.
event | the event to process |
Definition at line 86 of file lcio_io_benchmark.cc.
References std::clock().
|
inlineprivatevirtual |
Call back for updating an LCEvent.
Here all modifications are allowed. Only use this method if you need to remove a collection from the event or you need to modify (fix) exisiting data.
Implements IO::LCEventListener.
Definition at line 118 of file lcio_io_benchmark.cc.
|
inlineprivatevirtual |
Call back for modifying an existing LCRunHeader.
Implements IO::LCRunListener.
Definition at line 120 of file lcio_io_benchmark.cc.
|
delete |
|
inlinevirtual |
Extract and fill benchmark variables.
evt | the event to process |
Implements IO::LCEventListener.
Definition at line 76 of file lcio_io_benchmark.cc.
|
inlineprivatevirtual |
Call back for processing an LCRunHeader.
Access is 'read only'.
Implements IO::LCRunListener.
Definition at line 119 of file lcio_io_benchmark.cc.
|
inline |
Write benchmarks to ROOT file.
Definition at line 110 of file lcio_io_benchmark.cc.
Referenced by main().
|
private |
The current entry id while filling the tree (for easy plotting)
Definition at line 142 of file lcio_io_benchmark.cc.
|
private |
The first clock measurement on instance creation.
Definition at line 134 of file lcio_io_benchmark.cc.
|
private |
The last clock measurement on processEvent()
Definition at line 136 of file lcio_io_benchmark.cc.
|
private |
The LCIO output file name.
Definition at line 130 of file lcio_io_benchmark.cc.
|
private |
LCIO output file writer.
Definition at line 128 of file lcio_io_benchmark.cc.
|
private |
The process resident set size taken in processEvent callback.
Definition at line 148 of file lcio_io_benchmark.cc.
|
private |
Output root file with benchmarking info.
Definition at line 124 of file lcio_io_benchmark.cc.
|
private |
Output ROOT tree.
Definition at line 126 of file lcio_io_benchmark.cc.
|
private |
The resident set size after reading an event (minus reference)
Definition at line 140 of file lcio_io_benchmark.cc.
|
private |
Event reading time.
Definition at line 132 of file lcio_io_benchmark.cc.
|
private |
The resident set size on instance creation (reference)
Definition at line 138 of file lcio_io_benchmark.cc.
|
private |
The resisdent set size after writing.
Definition at line 146 of file lcio_io_benchmark.cc.
|
private |
The event write time.
Definition at line 144 of file lcio_io_benchmark.cc.