ATLAS Offline Software
|
Class for collecting information about the xAOD file access pattern. More...
#include <PerfStats.h>
Public Member Functions | |
~PerfStats () | |
Destructor, sometimes called by PROOF. More... | |
void | start (bool clear=true) |
Start the statistics collection. More... | |
void | stop () |
Stop the statistics collection. More... | |
Functions inherited from TVirtualPerfStats: | |
virtual void | SimpleEvent (EEventType type) |
Generic function called when a specified event happens. More... | |
virtual void | PacketEvent (const char *slave, const char *slavename, const char *filename, ::Long64_t eventsprocessed, ::Double_t latency, ::Double_t proctime, ::Double_t cputime, ::Long64_t bytesRead) |
PROOF specific function, not implemented here. More... | |
virtual void | FileEvent (const char *slave, const char *slavename, const char *nodename, const char *filename, ::Bool_t isStart) |
PROOF specific function, not implemented here. More... | |
virtual void | FileOpenEvent (::TFile *file, const char *filename, ::Double_t start) |
Function called by PROOF when a file is opened. More... | |
virtual void | FileReadEvent (::TFile *file, ::Int_t len, ::Double_t start) |
Function called in general when a file reading operation happens. More... | |
virtual void | UnzipEvent (::TObject *tree, ::Long64_t pos, ::Double_t start, ::Int_t complen, ::Int_t objlen) |
Function called in general when a file unzipping operation happens. More... | |
virtual void | RateEvent (::Double_t proctime, ::Double_t deltatime, ::Long64_t eventsprocessed, ::Long64_t bytesRead) |
PROOF specific function, not implemented here. More... | |
virtual void | SetBytesRead (::Long64_t num) |
Function used by PROOF to set the read bytes correctly on the master. More... | |
virtual ::Long64_t | GetBytesRead () const |
Function used by PROOF to set the read bytes correctly on the master. More... | |
virtual void | SetNumEvents (::Long64_t num) |
Function used by PROOF to set the number of processed events correctly. More... | |
virtual ::Long64_t | GetNumEvents () const |
Function used by PROOF to set the number of processed events correctly. More... | |
virtual void | PrintBasketInfo (Option_t *option="") const |
Print the TTree basket read caching statistics. More... | |
virtual void | SetLoaded (TBranch *b, size_t basketNumber) |
Increase by 1 the counter of how many times a basket was cached. More... | |
virtual void | SetLoaded (size_t bi, size_t basketNumber) |
virtual void | SetLoadedMiss (TBranch *b, size_t basketNumber) |
Increase by 1 the counter of how many times a basket was cached on access. More... | |
virtual void | SetLoadedMiss (size_t bi, size_t basketNumber) |
virtual void | SetMissed (TBranch *b, size_t basketNumber) |
Increase count (by 1) of not cached basket reads. More... | |
virtual void | SetMissed (size_t bi, size_t basketNumber) |
virtual void | SetUsed (TBranch *b, size_t basketNumber) |
Mark a basket as accessed. More... | |
virtual void | SetUsed (size_t bi, size_t basketNumber) |
virtual void | UpdateBranchIndices (TObjArray *branches) |
Update the fBranchIndexCache collection to match the current TTree given the ordered list of branch names. More... | |
Static Public Member Functions | |
static PerfStats & | instance () |
Function accessing the singleton instance. More... | |
Protected Member Functions | |
PerfStats () | |
The constructor is protected, as it's a singleton. More... | |
Private Types | |
typedef std::lock_guard< std::mutex > | lock_t |
Private Member Functions | |
virtual void | SetFile (TFile *file) |
Function letting us know that a new file was opened. More... | |
Private Attributes | |
::TVirtualPerfStats * | m_otherPerfStats |
Another performance monitoring object. More... | |
bool | m_running |
Flag showing whether the statistic collection is ongoing or not. More... | |
::Double_t | m_startTime |
Time when the statistics collection was started. More... | |
::TTree * | m_tree |
The tree we're currently investigating. More... | |
::TFile * | m_file |
The currently open xAOD file. More... | |
bool | m_treeWarningPrinted |
Flag showing whether some information message has already been printed. More... | |
Static Private Attributes | |
static PerfStats *s_instance | ATLAS_THREAD_SAFE |
The single instance of the object. More... | |
static std::mutex | s_mutex |
Lock controlling access to the singleton. More... | |
Class for collecting information about the xAOD file access pattern.
This class is used for collecting the basic information about the file access during an xAOD analysis. It was first developed for the D3PDReader code, and was later adopted to be used with xAOD files.
Note: One can't use override
on the virtual functions of this class, as it generates a lot of warnings because of how ClassDef(...)
is implemented. :-(
Definition at line 34 of file PerfStats.h.
|
private |
Definition at line 126 of file PerfStats.h.
xAOD::PerfStats::~PerfStats | ( | ) |
Destructor, sometimes called by PROOF.
|
protected |
The constructor is protected, as it's a singleton.
|
virtual |
PROOF specific function, not implemented here.
|
virtual |
Function called by PROOF when a file is opened.
|
virtual |
Function called in general when a file reading operation happens.
virtual ::Long64_t xAOD::PerfStats::GetBytesRead | ( | ) | const |
Function used by PROOF to set the read bytes correctly on the master.
virtual ::Long64_t xAOD::PerfStats::GetNumEvents | ( | ) | const |
Function used by PROOF to set the number of processed events correctly.
|
static |
Function accessing the singleton instance.
|
virtual |
PROOF specific function, not implemented here.
|
virtual |
Print the TTree basket read caching statistics.
|
virtual |
PROOF specific function, not implemented here.
|
virtual |
Function used by PROOF to set the read bytes correctly on the master.
|
privatevirtual |
Function letting us know that a new file was opened.
|
virtual |
|
virtual |
Increase by 1 the counter of how many times a basket was cached.
|
virtual |
|
virtual |
Increase by 1 the counter of how many times a basket was cached on access.
|
virtual |
|
virtual |
Increase count (by 1) of not cached basket reads.
|
virtual |
Function used by PROOF to set the number of processed events correctly.
|
virtual |
|
virtual |
Mark a basket as accessed.
|
virtual |
Generic function called when a specified event happens.
void xAOD::PerfStats::start | ( | bool | clear = true | ) |
Start the statistics collection.
void xAOD::PerfStats::stop | ( | ) |
Stop the statistics collection.
|
virtual |
Function called in general when a file unzipping operation happens.
|
virtual |
Update the fBranchIndexCache collection to match the current TTree given the ordered list of branch names.
|
staticprivate |
The single instance of the object.
Definition at line 122 of file PerfStats.h.
|
private |
The currently open xAOD file.
Definition at line 139 of file PerfStats.h.
|
private |
Another performance monitoring object.
Definition at line 129 of file PerfStats.h.
|
private |
Flag showing whether the statistic collection is ongoing or not.
Definition at line 132 of file PerfStats.h.
|
private |
Time when the statistics collection was started.
Definition at line 134 of file PerfStats.h.
|
private |
The tree we're currently investigating.
Definition at line 137 of file PerfStats.h.
|
private |
Flag showing whether some information message has already been printed.
Definition at line 142 of file PerfStats.h.
|
staticprivate |
Lock controlling access to the singleton.
Definition at line 125 of file PerfStats.h.