|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef XAODCORE_TOOLS_READSTATS_H
9 #define XAODCORE_TOOLS_READSTATS_H
23 #endif // not __ROOTCLING__
24 #endif // not __MAKECINT__
48 const char*
type =
"Int_t",
49 ::Int_t nTreesAccessed = 0, ::Long64_t nReadEntries = 0,
50 ::Long64_t nUnzippedBytes = 0, ::Long64_t nZippedBytes = 0 );
91 ::Int_t
Merge( ::TCollection* coll );
94 void Print( ::Option_t* option =
"" )
const;
129 typedef std::map< std::string, Vector_t >
Map_t;
132 typedef std::map< std::string, BranchStats >
MapC_t;
136 const char*
title =
"xAOD reading statistics" );
192 #ifndef __ROOTCLING__
199 #endif // not __ROOTCLING__
200 #endif // not __MAKECINT__
225 ::Int_t
Merge( ::TCollection* coll );
236 ::Long64_t minEntries )
const;
240 ::Double_t minEvFraction )
const;
247 ::Double_t minByteFraction )
const;
255 std::vector< std::string >
258 std::vector< std::string >
261 std::vector< std::string >
265 std::vector< std::string >
285 void Print( ::Option_t* option =
"" )
const;
299 #ifndef __ROOTCLING__
303 #endif // not __ROOTCLING__
304 #endif // not __MAKECINT__
341 #endif // XAODCORE_TOOLS_READSTATS_H
::Long64_t unzippedBytesRead() const
Get how many unzipped bytes were read from this branch in total.
::Long64_t m_bytesRead
Total number of bytes read.
void addToTreeCacheByEntries(::TTree *tree, ::Long64_t minEntries) const
Add the branches accessed more than n times to the TTreeCache.
void Clear(::Option_t *opt="")
Clear the statistics information (inherited from TNamed...)
::Int_t fileReads() const
Get the total number of file read calls.
::Long64_t bytesRead() const
Get how many bytes were read in total during the analysis.
::Int_t cacheSize() const
Get the TTreeCache size used.
MapC_t m_containers
Statistics about the containers.
BranchStats & operator=(const BranchStats &parent)
Assignment operator.
::Long64_t m_zippedBytes
Number of zipped bytes read from this branch.
::Long64_t m_nEventsProcessed
Total processed events.
ReadStats(const ReadStats &parent)
Copy constructor.
bool isCompatible(const ReadStats &rh) const
Function checking if two objects are "compatible".
::Double_t unzipTime() const
Get the time spent in unzipping the data.
Map_t m_branches
Full Statistics about the branches.
::Double_t m_processTime
Time spent in processing the events.
void setZippedBytesRead(::Long64_t nZippedBytes)
Set how many zipped bytes were read from this branch in total.
void addToTreeCacheByEntryFrac(::TTree *tree, ::Double_t minEvFraction) const
Add the branches accessed more than a given fraction of times to the TTreeCache.
void Print(::Option_t *option="") const
Print information about the collected statistics.
std::map< std::string, Vector_t > Map_t
Type of the internal object gathering information on aux branches.
void addToTreeCache(::TTree *tree) const
Add all branches that were ever accessed, to the TTreeCache.
::Int_t Merge(::TCollection *coll)
Function merging the information from multiple objects.
ReadStats & operator+=(const ReadStats &rh)
Operator merging two objects.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
BranchStats * container(const std::string &name)
Access the description of a container. Creating it if necessary.
::TH1 * treeAccessStat() const
Get a histogram with the TTree access statistics.
::TH1 * zippedByteReadStat() const
Get a histogram with the zipped byte reading statistics.
ReadStats & operator=(const ReadStats &parent)
Assignment operator.
::Double_t processTime() const
Get the time spent in processing events.
::Long64_t nEvents() const
Function getting the total number of input event.
BranchStats * branch(const std::string &prefix, SG::auxid_t auxid)
Access the description of a branch. Creating it if necessary.
std::vector< std::string > branchesByEntries(::Long64_t minEntries) const
Get the branches accessed more than n times.
void nextEvent()
Function incrementing the processed event counter.
void Print(::Option_t *option="") const
Print information about the collected statistics.
std::vector< std::string > branchesByEntryFrac(::Double_t minEvFraction) const
Get the branches accessed more than a given fraction of times.
std::vector< BranchStats * > Vector_t
Type of the internal vectors describing one auxiliary store.
::Int_t Merge(::TCollection *coll)
Function merging the information from multiple objects.
void setUnzippedBytesRead(::Long64_t nUnzippedBytes)
Set how many unzipped bytes were read from this branch in total.
std::vector< std::string > branchesByBytes(::Long64_t minBytes) const
Get the branches from which more than x bytes were read.
::TH1 * unzippedByteReadStat() const
Get a histogram with the unzipped byte reading statistics.
void setNEvents(::Long64_t nevents)
Function setting the total number of input events.
size_t auxid_t
Identifier for a particular aux data item.
::Long64_t readEntries() const
Get how many entries were read from this branch.
void setTreesAccessed(::Int_t nTreesAccessed)
Set how many trees were accessed to read this branch.
std::map< std::string, BranchStats > MapC_t
Type of the internal object gathering information on containers.
ReadStats(const char *name="xAODReadStats", const char *title="xAOD reading statistics")
Constructor just specifying the name of the object.
const MapC_t & containers() const
Get information about all the containers.
void setReadEntries(::Long64_t nReadEntries)
Set how many entries were read from this branch.
Class describing the access statistics of one (sub-)branch.
void setBranchNum(::Int_t num)
Set the total number of branches on the input.
BranchStats(const char *name="xAODBranch", const char *type="Int_t", ::Int_t nTreesAccessed=0, ::Long64_t nReadEntries=0, ::Long64_t nUnzippedBytes=0, ::Long64_t nZippedBytes=0)
Constructor specifying all parameters.
void printSmartSlimmingBranchList(bool autoIncludeLinks=false) const
Print the accessed variables, formatted for smart slimming.
void setBytesRead(::Long64_t num)
Set how many bytes were read in total during the analysis.
BranchStats(const BranchStats &parent)
Copy constructor.
::Int_t branchNum() const
Get the total number of branches on the input.
void setUnzipTime(::Double_t time)
Set the time spent in unzipping the data.
::TH1 * entryReadStat() const
Get a histogram with the entry reading statistics.
void setReadTime(::Double_t time)
Set the time spent in reading the data.
void readContainer(const std::string &name)
Function incrementing the read counter on a specific container.
::Long64_t m_unzippedBytes
Number of unzipped bytes read from this branch.
void setProcessTime(::Double_t time)
Set the time spent in processing events.
void readBranch(const std::string &prefix, SG::auxid_t auxid)
Function incrementing the read counter on a specific branch.
BranchStats & operator+=(const BranchStats &rh)
Operator merging two objects.
Basic definitions for auxiliary types.
::Long64_t m_nEvents
Total num events.
::Double_t m_readTime
Time spent reading the events.
const BranchStats * container(const std::string &name) const
Access the description of a container.
std::vector< std::string > branchesByByteFrac(::Double_t minByteFraction) const
Get the branches from which more than a given fraction of bytes were read.
::Int_t m_fileReads
Total number of file reading operations during the analysis.
void setCacheSize(::Int_t size)
Set the TTreeCache size used.
::Int_t m_treesAccessed
Number of trees/files accessed for this branch.
::Double_t readTime() const
Get the time spent in reading the data.
::Int_t m_branchNum
Total number of branches in the input xAOD TTree.
Class describing the access statistics of a collection of branches.
const BranchStats * branch(const std::string &prefix, SG::auxid_t auxid) const
Get information about a specific variable.
::Int_t treesAccessed() const
Get how many trees/files were accessed to read this branch.
void setFileReads(::Int_t num)
Set the total number of file read calls.
BranchStats & add(const BranchStats &rh)
Function merging two objects.
const Map_t & branches() const
Get all variable information.
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.
::Long64_t m_readEntries
Number of entries read from this branch.
::Int_t m_cacheSize
Cache size used in the analysis.
::Long64_t zippedBytesRead() const
Get how many zipped bytes were read from this branch in total.
::Double_t m_unzipTime
Time spent unzipping the events.
void addToTreeCacheByBytes(::TTree *tree, ::Long64_t minBytes) const
Add the branches from which more than x bytes were read, to the TTreeCache.
ReadStats & add(const ReadStats &rh)
Function merging two objects.