ATLAS Offline Software
|
Functions | |
SG::sgkey_t | hash (const std::string &name) |
This function provides a hashed version of the key (branch) names used in the xAOD file, similar to how Athena saves hashed numbers in persistent ElementLinks. More... | |
std::string | dynBranchPrefix (const std::string &key) |
This function is used to figure out what to name dynamic auxiliary branches coming from a container called key . More... | |
const std::type_info & | getTypeInfo (EDataType type) |
This function is used when reading a primitive branch from an input file without the user explicitly asking for it. More... | |
char | rootType (char typeidType) |
This function is used internally in the code when creating primitive dynamic auxiliary branches. More... | |
std::string | getTypeName (const std::type_info &ti) |
This function is necessary in order to create type names that ROOT can understand. More... | |
std::string | getFirstBranchMatch (TTree *tree, const std::string &pre) |
Search for branches, returns search term on no result. More... | |
std::string | timeToString (::Double_t secs) |
Function creating a human-readable elapsed time printout. More... | |
std::string | sizeToString (::Long64_t bytes) |
Function for printing data sizes in human-readable format. More... | |
std::string | speedToString (::Double_t bytespersec) |
Function for printing data processing speeds in a human-readable format. More... | |
std::string xAOD::Utils::dynBranchPrefix | ( | const std::string & | key | ) |
This function is used to figure out what to name dynamic auxiliary branches coming from a container called key
.
Get the dynamic auxiliary variable prefix based on a container name.
It needs to work in sync wiht how it is done in the offline code, so will eventually probably end up in another package.
key | The key/branch name of the auxiliary container |
Definition at line 144 of file Control/xAODRootAccess/Root/Utils.cxx.
std::string xAOD::Utils::getFirstBranchMatch | ( | TTree * | tree, |
const std::string & | pre | ||
) |
Search for branches, returns search term on no result.
Definition at line 318 of file Control/xAODRootAccess/Root/Utils.cxx.
const std::type_info & xAOD::Utils::getTypeInfo | ( | EDataType | type | ) |
This function is used when reading a primitive branch from an input file without the user explicitly asking for it.
Get the type info of a primitive variable, as declared by ROOT.
type | The type taken from ROOT |
Definition at line 169 of file Control/xAODRootAccess/Root/Utils.cxx.
std::string xAOD::Utils::getTypeName | ( | const std::type_info & | ti | ) |
This function is necessary in order to create type names that ROOT can understand.
Get the type name as it is known to ROOT, based on std::type_info.
For instance, a type name like std::vector<ElementLink<DataVector<xAOD::IParticle, DataModel_detail::NoBase> >, std::allocator<ElementLink<DataVector<xAOD::IParticle, DataModel_detail::NoBase> > > >
as seen by the compiler, needs to become std::vector<ElementLink<DataVector<xAOD::IParticle> > >
for ROOT to find a dictionary for it.
This function executes the string manipulation necessary to do this.
ti | The type for which we want to find a string type name |
Definition at line 285 of file Control/xAODRootAccess/Root/Utils.cxx.
SG::sgkey_t xAOD::Utils::hash | ( | const std::string & | name | ) |
This function provides a hashed version of the key (branch) names used in the xAOD file, similar to how Athena saves hashed numbers in persistent ElementLinks.
Function creating a hash out of a "key name".
Since Athena uses the top 2 bits in a hashed key to save additional state information about the link, the top 2 bits of the hash are always set to 0.
name | The name that we want to create a unique hash for |
Definition at line 125 of file Control/xAODRootAccess/Root/Utils.cxx.
This function is used internally in the code when creating primitive dynamic auxiliary branches.
Get the character describing a given primitive type for ROOT.
I just took the code from SFrame to be honest...
typeidType | The type name coming from typeid(...).name() |
Definition at line 226 of file Control/xAODRootAccess/Root/Utils.cxx.
std::string xAOD::Utils::sizeToString | ( | ::Long64_t | bytes | ) |
Function for printing data sizes in human-readable format.
This function is used to produce nicely readable printouts for amounts of data.
bytes | The amount of data expressed in bytes |
Definition at line 129 of file Event/xAOD/xAODCore/Root/Utils.cxx.
std::string xAOD::Utils::speedToString | ( | ::Double_t | bytespersec | ) |
Function for printing data processing speeds in a human-readable format.
bytespersec | The speed expressed in bytes / seconds |
Definition at line 151 of file Event/xAOD/xAODCore/Root/Utils.cxx.
std::string xAOD::Utils::timeToString | ( | ::Double_t | secs | ) |
Function creating a human-readable elapsed time printout.
Since I wasn't able to find a nice function printing elapsed times in a human-readable format, I ended up writing one.
This function is used in printing the statistics about an analysis.
secs | An amount of time passed, expressed in seconds |
Definition at line 99 of file Event/xAOD/xAODCore/Root/Utils.cxx.