ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
xAOD::ReadStats Class Reference

Class describing the access statistics of a collection of branches. More...

#include <ReadStats.h>

Inheritance diagram for xAOD::ReadStats:
Collaboration diagram for xAOD::ReadStats:

Public Types

typedef std::vector< BranchStats * > Vector_t
 Type of the internal vectors describing one auxiliary store. More...
 
typedef std::map< std::string, Vector_tMap_t
 Type of the internal object gathering information on aux branches. More...
 
typedef std::map< std::string, BranchStatsMapC_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...
 
ReadStatsoperator= (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
BranchStatsbranch (const std::string &prefix, SG::auxid_t auxid)
 Access the description of a branch. Creating it if necessary. More...
 
const BranchStatsbranch (const std::string &prefix, SG::auxid_t auxid) const
 Get information about a specific variable. More...
 
BranchStatscontainer (const std::string &name)
 Access the description of a container. Creating it if necessary. More...
 
const BranchStatscontainer (const std::string &name) const
 Access the description of a container. More...
 
const Map_tbranches () const
 Get all variable information. More...
 
const MapC_tcontainers () 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...
 
ReadStatsadd (const ReadStats &rh)
 Function merging two objects. More...
 
ReadStatsoperator+= (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...
 

Detailed Description

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.

Author
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Revision
642099
Date
2015-01-27 17:43:18 +0100 (Tue, 27 Jan 2015)

Definition at line 123 of file ReadStats.h.

Member Typedef Documentation

◆ Map_t

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.

◆ MapC_t

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.

◆ Vector_t

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.

Constructor & Destructor Documentation

◆ ReadStats() [1/2]

xAOD::ReadStats::ReadStats ( const char name = "xAODReadStats",
const char title = "xAOD reading statistics" 
)

Constructor just specifying the name of the object.

◆ ReadStats() [2/2]

xAOD::ReadStats::ReadStats ( const ReadStats parent)

Copy constructor.

◆ ~ReadStats()

xAOD::ReadStats::~ReadStats ( )

Destructor.

Member Function Documentation

◆ add()

ReadStats& xAOD::ReadStats::add ( const ReadStats rh)

Function merging two objects.

◆ addToTreeCache()

void xAOD::ReadStats::addToTreeCache ( ::TTree *  tree) const

Add all branches that were ever accessed, to the TTreeCache.

◆ addToTreeCacheByByteFrac()

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.

◆ addToTreeCacheByBytes()

void xAOD::ReadStats::addToTreeCacheByBytes ( ::TTree *  tree,
::Long64_t  minBytes 
) const

Add the branches from which more than x bytes were read, to the TTreeCache.

◆ addToTreeCacheByEntries()

void xAOD::ReadStats::addToTreeCacheByEntries ( ::TTree *  tree,
::Long64_t  minEntries 
) const

Add the branches accessed more than n times to the TTreeCache.

◆ addToTreeCacheByEntryFrac()

void xAOD::ReadStats::addToTreeCacheByEntryFrac ( ::TTree *  tree,
::Double_t  minEvFraction 
) const

Add the branches accessed more than a given fraction of times to the TTreeCache.

◆ branch() [1/2]

BranchStats* xAOD::ReadStats::branch ( const std::string &  prefix,
SG::auxid_t  auxid 
)

Access the description of a branch. Creating it if necessary.

◆ branch() [2/2]

const BranchStats* xAOD::ReadStats::branch ( const std::string &  prefix,
SG::auxid_t  auxid 
) const

Get information about a specific variable.

◆ branches()

const Map_t& xAOD::ReadStats::branches ( ) const

Get all variable information.

◆ branchesByByteFrac()

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.

◆ branchesByBytes()

std::vector< std::string > xAOD::ReadStats::branchesByBytes ( ::Long64_t  minBytes) const

Get the branches from which more than x bytes were read.

◆ branchesByEntries()

std::vector< std::string > xAOD::ReadStats::branchesByEntries ( ::Long64_t  minEntries) const

Get the branches accessed more than n times.

◆ branchesByEntryFrac()

std::vector< std::string > xAOD::ReadStats::branchesByEntryFrac ( ::Double_t  minEvFraction) const

Get the branches accessed more than a given fraction of times.

◆ branchNum()

::Int_t xAOD::ReadStats::branchNum ( ) const

Get the total number of branches on the input.

◆ bytesRead()

::Long64_t xAOD::ReadStats::bytesRead ( ) const

Get how many bytes were read in total during the analysis.

◆ cacheSize()

::Int_t xAOD::ReadStats::cacheSize ( ) const

Get the TTreeCache size used.

◆ Clear()

void xAOD::ReadStats::Clear ( ::Option_t *  opt = "")

Clear the statistics information (inherited from TNamed...)

◆ container() [1/2]

BranchStats* xAOD::ReadStats::container ( const std::string &  name)

Access the description of a container. Creating it if necessary.

◆ container() [2/2]

const BranchStats* xAOD::ReadStats::container ( const std::string &  name) const

Access the description of a container.

◆ containers()

const MapC_t& xAOD::ReadStats::containers ( ) const

Get information about all the containers.

◆ entryReadStat()

::TH1* xAOD::ReadStats::entryReadStat ( ) const

Get a histogram with the entry reading statistics.

◆ fileReads()

::Int_t xAOD::ReadStats::fileReads ( ) const

Get the total number of file read calls.

◆ isCompatible()

bool xAOD::ReadStats::isCompatible ( const ReadStats rh) const

Function checking if two objects are "compatible".

◆ Merge()

::Int_t xAOD::ReadStats::Merge ( ::TCollection *  coll)

Function merging the information from multiple objects.

◆ nEvents()

::Long64_t xAOD::ReadStats::nEvents ( ) const

Function getting the total number of input event.

◆ nextEvent()

void xAOD::ReadStats::nextEvent ( )

Function incrementing the processed event counter.

◆ operator+=()

ReadStats& xAOD::ReadStats::operator+= ( const ReadStats rh)

Operator merging two objects.

◆ operator=()

ReadStats& xAOD::ReadStats::operator= ( const ReadStats parent)

Assignment operator.

◆ Print()

void xAOD::ReadStats::Print ( ::Option_t *  option = "") const

Print information about the collected statistics.

◆ printSmartSlimmingBranchList()

void xAOD::ReadStats::printSmartSlimmingBranchList ( bool  autoIncludeLinks = false) const

Print the accessed variables, formatted for smart slimming.

◆ processTime()

::Double_t xAOD::ReadStats::processTime ( ) const

Get the time spent in processing events.

◆ readBranch()

void xAOD::ReadStats::readBranch ( const std::string &  prefix,
SG::auxid_t  auxid 
)

Function incrementing the read counter on a specific branch.

◆ readContainer()

void xAOD::ReadStats::readContainer ( const std::string &  name)

Function incrementing the read counter on a specific container.

◆ readTime()

::Double_t xAOD::ReadStats::readTime ( ) const

Get the time spent in reading the data.

◆ setBranchNum()

void xAOD::ReadStats::setBranchNum ( ::Int_t  num)

Set the total number of branches on the input.

◆ setBytesRead()

void xAOD::ReadStats::setBytesRead ( ::Long64_t  num)

Set how many bytes were read in total during the analysis.

◆ setCacheSize()

void xAOD::ReadStats::setCacheSize ( ::Int_t  size)

Set the TTreeCache size used.

◆ setFileReads()

void xAOD::ReadStats::setFileReads ( ::Int_t  num)

Set the total number of file read calls.

◆ setNEvents()

void xAOD::ReadStats::setNEvents ( ::Long64_t  nevents)

Function setting the total number of input events.

◆ setProcessTime()

void xAOD::ReadStats::setProcessTime ( ::Double_t  time)

Set the time spent in processing events.

◆ setReadTime()

void xAOD::ReadStats::setReadTime ( ::Double_t  time)

Set the time spent in reading the data.

◆ setUnzipTime()

void xAOD::ReadStats::setUnzipTime ( ::Double_t  time)

Set the time spent in unzipping the data.

◆ treeAccessStat()

::TH1* xAOD::ReadStats::treeAccessStat ( ) const

Get a histogram with the TTree access statistics.

◆ unzippedByteReadStat()

::TH1* xAOD::ReadStats::unzippedByteReadStat ( ) const

Get a histogram with the unzipped byte reading statistics.

◆ unzipTime()

::Double_t xAOD::ReadStats::unzipTime ( ) const

Get the time spent in unzipping the data.

◆ zippedByteReadStat()

::TH1* xAOD::ReadStats::zippedByteReadStat ( ) const

Get a histogram with the zipped byte reading statistics.

Member Data Documentation

◆ m_branches

Map_t xAOD::ReadStats::m_branches
private

Full Statistics about the branches.

Definition at line 311 of file ReadStats.h.

◆ m_branchNum

::Int_t xAOD::ReadStats::m_branchNum
private

Total number of branches in the input xAOD TTree.

Definition at line 318 of file ReadStats.h.

◆ m_bytesRead

::Long64_t xAOD::ReadStats::m_bytesRead
private

Total number of bytes read.

Definition at line 316 of file ReadStats.h.

◆ m_cacheSize

::Int_t xAOD::ReadStats::m_cacheSize
private

Cache size used in the analysis.

Definition at line 322 of file ReadStats.h.

◆ m_containers

MapC_t xAOD::ReadStats::m_containers
private

Statistics about the containers.

Definition at line 313 of file ReadStats.h.

◆ m_fileReads

::Int_t xAOD::ReadStats::m_fileReads
private

Total number of file reading operations during the analysis.

Definition at line 320 of file ReadStats.h.

◆ m_nEvents

::Long64_t xAOD::ReadStats::m_nEvents
private

Total num events.

Definition at line 331 of file ReadStats.h.

◆ m_nEventsProcessed

::Long64_t xAOD::ReadStats::m_nEventsProcessed
private

Total processed events.

Definition at line 333 of file ReadStats.h.

◆ m_processTime

::Double_t xAOD::ReadStats::m_processTime
private

Time spent in processing the events.

Definition at line 328 of file ReadStats.h.

◆ m_readTime

::Double_t xAOD::ReadStats::m_readTime
private

Time spent reading the events.

Definition at line 324 of file ReadStats.h.

◆ m_unzipTime

::Double_t xAOD::ReadStats::m_unzipTime
private

Time spent unzipping the events.

Definition at line 326 of file ReadStats.h.


The documentation for this class was generated from the following file: