ATLAS Offline Software
|
Class describing the access statistics of a collection of branches. More...
#include <ReadStats.h>
Public Types | |
typedef std::vector< BranchStats * > | Vector_t |
Type of the internal vectors describing one auxiliary store. More... | |
typedef std::map< std::string, Vector_t > | Map_t |
Type of the internal object gathering information on aux branches. More... | |
typedef std::map< std::string, BranchStats > | MapC_t |
Type of the internal object gathering information on containers. More... | |
Public Member Functions | |
ReadStats (const char *name="xAODReadStats", const char *title="xAOD reading statistics") | |
Constructor just specifying the name of the object. More... | |
ReadStats (const ReadStats &parent) | |
Copy constructor. More... | |
~ReadStats () | |
Destructor. More... | |
ReadStats & | operator= (const ReadStats &parent) |
Assignment operator. More... | |
void | Clear (::Option_t *opt="") |
Clear the statistics information (inherited from TNamed...) More... | |
void | Print (::Option_t *option="") const |
Print information about the collected statistics. More... | |
void | printSmartSlimmingBranchList (bool autoIncludeLinks=false) const |
Print the accessed variables, formatted for smart slimming. More... | |
void | nextEvent () |
Function incrementing the processed event counter. More... | |
::Long64_t | nEvents () const |
Function getting the total number of input event. More... | |
void | setNEvents (::Long64_t nevents) |
Function setting the total number of input events. More... | |
void | readBranch (const std::string &prefix, SG::auxid_t auxid) |
Function incrementing the read counter on a specific branch. More... | |
void | readContainer (const std::string &name) |
Function incrementing the read counter on a specific container. More... | |
Raw information accessor/setter functions | |
void | setBytesRead (::Long64_t num) |
Set how many bytes were read in total during the analysis. More... | |
::Long64_t | bytesRead () const |
Get how many bytes were read in total during the analysis. More... | |
void | setBranchNum (::Int_t num) |
Set the total number of branches on the input. More... | |
::Int_t | branchNum () const |
Get the total number of branches on the input. More... | |
void | setFileReads (::Int_t num) |
Set the total number of file read calls. More... | |
::Int_t | fileReads () const |
Get the total number of file read calls. More... | |
void | setCacheSize (::Int_t size) |
Set the TTreeCache size used. More... | |
::Int_t | cacheSize () const |
Get the TTreeCache size used. More... | |
void | setReadTime (::Double_t time) |
Set the time spent in reading the data. More... | |
::Double_t | readTime () const |
Get the time spent in reading the data. More... | |
void | setUnzipTime (::Double_t time) |
Set the time spent in unzipping the data. More... | |
::Double_t | unzipTime () const |
Get the time spent in unzipping the data. More... | |
void | setProcessTime (::Double_t time) |
Set the time spent in processing events. More... | |
::Double_t | processTime () const |
Get the time spent in processing events. More... | |
Functions used for filling the object | |
BranchStats * | branch (const std::string &prefix, SG::auxid_t auxid) |
Access the description of a branch. Creating it if necessary. More... | |
const BranchStats * | branch (const std::string &prefix, SG::auxid_t auxid) const |
Get information about a specific variable. More... | |
BranchStats * | container (const std::string &name) |
Access the description of a container. Creating it if necessary. More... | |
const BranchStats * | container (const std::string &name) const |
Access the description of a container. More... | |
const Map_t & | branches () const |
Get all variable information. More... | |
const MapC_t & | containers () const |
Get information about all the containers. More... | |
Function used for merging objects of this type | |
bool | isCompatible (const ReadStats &rh) const |
Function checking if two objects are "compatible". More... | |
ReadStats & | add (const ReadStats &rh) |
Function merging two objects. More... | |
ReadStats & | operator+= (const ReadStats &rh) |
Operator merging two objects. More... | |
::Int_t | Merge (::TCollection *coll) |
Function merging the information from multiple objects. More... | |
Function for setting up a TTreeCache object | |
void | addToTreeCache (::TTree *tree) const |
Add all branches that were ever accessed, to the TTreeCache. More... | |
void | addToTreeCacheByEntries (::TTree *tree, ::Long64_t minEntries) const |
Add the branches accessed more than n times to the TTreeCache. More... | |
void | addToTreeCacheByEntryFrac (::TTree *tree, ::Double_t minEvFraction) const |
Add the branches accessed more than a given fraction of times to the TTreeCache. More... | |
void | addToTreeCacheByBytes (::TTree *tree, ::Long64_t minBytes) const |
Add the branches from which more than x bytes were read, to the TTreeCache. More... | |
void | addToTreeCacheByByteFrac (::TTree *tree, ::Double_t minByteFraction) const |
Add the branches from whith more than a given fraction of the bytes were read, to the TTreeCache. More... | |
Functions accessing branch names according to certain rules | |
std::vector< std::string > | branchesByEntries (::Long64_t minEntries) const |
Get the branches accessed more than n times. More... | |
std::vector< std::string > | branchesByEntryFrac (::Double_t minEvFraction) const |
Get the branches accessed more than a given fraction of times. More... | |
std::vector< std::string > | branchesByBytes (::Long64_t minBytes) const |
Get the branches from which more than x bytes were read. More... | |
std::vector< std::string > | branchesByByteFrac (::Double_t minByteFraction) const |
Get the branches from which more than a given fraction of bytes were read. More... | |
Functions getting the statistics as histograms | |
::TH1 * | treeAccessStat () const |
Get a histogram with the TTree access statistics. More... | |
::TH1 * | entryReadStat () const |
Get a histogram with the entry reading statistics. More... | |
::TH1 * | zippedByteReadStat () const |
Get a histogram with the zipped byte reading statistics. More... | |
::TH1 * | unzippedByteReadStat () const |
Get a histogram with the unzipped byte reading statistics. More... | |
Private Attributes | |
Map_t | m_branches |
Full Statistics about the branches. More... | |
MapC_t | m_containers |
Statistics about the containers. More... | |
::Long64_t | m_bytesRead |
Total number of bytes read. More... | |
::Int_t | m_branchNum |
Total number of branches in the input xAOD TTree. More... | |
::Int_t | m_fileReads |
Total number of file reading operations during the analysis. More... | |
::Int_t | m_cacheSize |
Cache size used in the analysis. More... | |
::Double_t | m_readTime |
Time spent reading the events. More... | |
::Double_t | m_unzipTime |
Time spent unzipping the events. More... | |
::Double_t | m_processTime |
Time spent in processing the events. More... | |
::Long64_t | m_nEvents |
Total num events. More... | |
::Long64_t | m_nEventsProcessed |
Total processed events. More... | |
Class describing the access statistics of a collection of branches.
Objects of this class are used to describe the access pattern of an xAOD analysis. The object can also be used to optimize the caching for the analysis in subsequent runs.
Definition at line 123 of file ReadStats.h.
typedef std::map< std::string, Vector_t > xAOD::ReadStats::Map_t |
Type of the internal object gathering information on aux branches.
Definition at line 129 of file ReadStats.h.
typedef std::map< std::string, BranchStats > xAOD::ReadStats::MapC_t |
Type of the internal object gathering information on containers.
Definition at line 132 of file ReadStats.h.
typedef std::vector< BranchStats* > xAOD::ReadStats::Vector_t |
Type of the internal vectors describing one auxiliary store.
Definition at line 127 of file ReadStats.h.
xAOD::ReadStats::ReadStats | ( | const char * | name = "xAODReadStats" , |
const char * | title = "xAOD reading statistics" |
||
) |
Constructor just specifying the name of the object.
xAOD::ReadStats::~ReadStats | ( | ) |
Destructor.
void xAOD::ReadStats::addToTreeCache | ( | ::TTree * | tree | ) | const |
Add all branches that were ever accessed, to the TTreeCache.
void xAOD::ReadStats::addToTreeCacheByByteFrac | ( | ::TTree * | tree, |
::Double_t | minByteFraction | ||
) | const |
Add the branches from whith more than a given fraction of the bytes were read, to the TTreeCache.
void xAOD::ReadStats::addToTreeCacheByBytes | ( | ::TTree * | tree, |
::Long64_t | minBytes | ||
) | const |
Add the branches from which more than x bytes were read, to the TTreeCache.
void xAOD::ReadStats::addToTreeCacheByEntries | ( | ::TTree * | tree, |
::Long64_t | minEntries | ||
) | const |
Add the branches accessed more than n times to the TTreeCache.
void xAOD::ReadStats::addToTreeCacheByEntryFrac | ( | ::TTree * | tree, |
::Double_t | minEvFraction | ||
) | const |
Add the branches accessed more than a given fraction of times to the TTreeCache.
BranchStats* xAOD::ReadStats::branch | ( | const std::string & | prefix, |
SG::auxid_t | auxid | ||
) |
Access the description of a branch. Creating it if necessary.
const BranchStats* xAOD::ReadStats::branch | ( | const std::string & | prefix, |
SG::auxid_t | auxid | ||
) | const |
Get information about a specific variable.
std::vector< std::string > xAOD::ReadStats::branchesByByteFrac | ( | ::Double_t | minByteFraction | ) | const |
Get the branches from which more than a given fraction of bytes were read.
std::vector< std::string > xAOD::ReadStats::branchesByBytes | ( | ::Long64_t | minBytes | ) | const |
Get the branches from which more than x bytes were read.
std::vector< std::string > xAOD::ReadStats::branchesByEntries | ( | ::Long64_t | minEntries | ) | const |
Get the branches accessed more than n times.
std::vector< std::string > xAOD::ReadStats::branchesByEntryFrac | ( | ::Double_t | minEvFraction | ) | const |
Get the branches accessed more than a given fraction of times.
::Int_t xAOD::ReadStats::branchNum | ( | ) | const |
Get the total number of branches on the input.
::Long64_t xAOD::ReadStats::bytesRead | ( | ) | const |
Get how many bytes were read in total during the analysis.
::Int_t xAOD::ReadStats::cacheSize | ( | ) | const |
Get the TTreeCache size used.
void xAOD::ReadStats::Clear | ( | ::Option_t * | opt = "" | ) |
Clear the statistics information (inherited from TNamed...)
BranchStats* xAOD::ReadStats::container | ( | const std::string & | name | ) |
Access the description of a container. Creating it if necessary.
const BranchStats* xAOD::ReadStats::container | ( | const std::string & | name | ) | const |
Access the description of a container.
::TH1* xAOD::ReadStats::entryReadStat | ( | ) | const |
Get a histogram with the entry reading statistics.
::Int_t xAOD::ReadStats::fileReads | ( | ) | const |
Get the total number of file read calls.
Function checking if two objects are "compatible".
::Int_t xAOD::ReadStats::Merge | ( | ::TCollection * | coll | ) |
Function merging the information from multiple objects.
::Long64_t xAOD::ReadStats::nEvents | ( | ) | const |
Function getting the total number of input event.
void xAOD::ReadStats::nextEvent | ( | ) |
Function incrementing the processed event counter.
void xAOD::ReadStats::Print | ( | ::Option_t * | option = "" | ) | const |
Print information about the collected statistics.
void xAOD::ReadStats::printSmartSlimmingBranchList | ( | bool | autoIncludeLinks = false | ) | const |
Print the accessed variables, formatted for smart slimming.
::Double_t xAOD::ReadStats::processTime | ( | ) | const |
Get the time spent in processing events.
void xAOD::ReadStats::readBranch | ( | const std::string & | prefix, |
SG::auxid_t | auxid | ||
) |
Function incrementing the read counter on a specific branch.
void xAOD::ReadStats::readContainer | ( | const std::string & | name | ) |
Function incrementing the read counter on a specific container.
::Double_t xAOD::ReadStats::readTime | ( | ) | const |
Get the time spent in reading the data.
void xAOD::ReadStats::setBranchNum | ( | ::Int_t | num | ) |
Set the total number of branches on the input.
void xAOD::ReadStats::setBytesRead | ( | ::Long64_t | num | ) |
Set how many bytes were read in total during the analysis.
void xAOD::ReadStats::setCacheSize | ( | ::Int_t | size | ) |
Set the TTreeCache size used.
void xAOD::ReadStats::setFileReads | ( | ::Int_t | num | ) |
Set the total number of file read calls.
void xAOD::ReadStats::setNEvents | ( | ::Long64_t | nevents | ) |
Function setting the total number of input events.
void xAOD::ReadStats::setProcessTime | ( | ::Double_t | time | ) |
Set the time spent in processing events.
void xAOD::ReadStats::setReadTime | ( | ::Double_t | time | ) |
Set the time spent in reading the data.
void xAOD::ReadStats::setUnzipTime | ( | ::Double_t | time | ) |
Set the time spent in unzipping the data.
::TH1* xAOD::ReadStats::treeAccessStat | ( | ) | const |
Get a histogram with the TTree access statistics.
::TH1* xAOD::ReadStats::unzippedByteReadStat | ( | ) | const |
Get a histogram with the unzipped byte reading statistics.
::Double_t xAOD::ReadStats::unzipTime | ( | ) | const |
Get the time spent in unzipping the data.
::TH1* xAOD::ReadStats::zippedByteReadStat | ( | ) | const |
Get a histogram with the zipped byte reading statistics.
|
private |
Full Statistics about the branches.
Definition at line 311 of file ReadStats.h.
|
private |
Total number of branches in the input xAOD TTree.
Definition at line 318 of file ReadStats.h.
|
private |
Total number of bytes read.
Definition at line 316 of file ReadStats.h.
|
private |
Cache size used in the analysis.
Definition at line 322 of file ReadStats.h.
|
private |
Statistics about the containers.
Definition at line 313 of file ReadStats.h.
|
private |
Total number of file reading operations during the analysis.
Definition at line 320 of file ReadStats.h.
|
private |
Total num events.
Definition at line 331 of file ReadStats.h.
|
private |
Total processed events.
Definition at line 333 of file ReadStats.h.
|
private |
Time spent in processing the events.
Definition at line 328 of file ReadStats.h.
|
private |
Time spent reading the events.
Definition at line 324 of file ReadStats.h.
|
private |
Time spent unzipping the events.
Definition at line 326 of file ReadStats.h.