|
RAPIDO
Repeatable Analysis Programming for Interpretability, Durability, and Organization
|
#include <arbol.h>
Public Member Functions | |
| Arbol () | |
| Arbol (TFile *tfile, TString ttree_name="tree") | |
| Arbol (TString tfile_name, TString ttree_name="tree") | |
| Arbol (HEPCLI &cli) | |
| virtual | ~Arbol () |
| template<typename Type > | |
| void | newBranch (TString new_branch_name) |
| template<typename Type > | |
| void | newBranch (TString new_branch_name, Type new_reset_value) |
| template<typename Type > | |
| void | setBranchResetValue (TString branch_name, Type new_reset_value) |
| template<typename Type > | |
| Type | getLeaf (TString branch_name) |
| template<typename Type > | |
| void | setLeaf (TString branch_name, Type new_value) |
| template<typename Type > | |
| void | newVecBranch (TString new_branch_name) |
| template<typename Type > | |
| void | newVecBranch (TString new_branch_name, std::vector< Type > new_reset_vector) |
| template<typename Type > | |
| void | setVecBranchResetValue (TString branch_name, std::vector< Type > new_reset_vector) |
| template<typename Type > | |
| std::vector< Type > | getVecLeaf (TString branch_name) |
| template<typename Type > | |
| void | setVecLeaf (TString branch_name, std::vector< Type > new_vector) |
| template<typename Type > | |
| void | appendToVecLeaf (TString branch_name, Type new_value) |
| template<typename Type > | |
| void | prependToVecLeaf (TString branch_name, Type new_value) |
| template<typename Type > | |
| void | insertIntoVecLeaf (TString branch_name, Type new_value, int index) |
| template<typename Type > | |
| void | sortVecLeaf (TString branch_name, std::function< bool(Type, Type)> &lambda) |
| void | resetBranches () |
| virtual void | fill () |
| virtual void | write (bool close=true) |
Public Attributes | |
| TTree * | ttree |
| TFile * | tfile |
Protected Member Functions | |
| template<typename Type > | |
| Branch< Type > * | getBranch (TString branch_name) |
Protected Attributes | |
| std::map< TString, Utilities::Dynamic * > | branches |
| std::map< TString, std::function< void()> > | branch_resetters |
Wraps TTree object with functionality for making branches dynamically
| Arbol::Arbol | ( | ) |
Arbol object constructor
| Arbol::Arbol | ( | TFile * | tfile, |
| TString | ttree_name = "tree" ) |
Arbol object overload constructor
| tfile | pointer to an existing TFile |
| ttree_name | name of output TTree (default: 'tree') |
| Arbol::Arbol | ( | TString | tfile_name, |
| TString | ttree_name = "tree" ) |
Arbol object overload constructor
| tfile_name | name of output TFile |
| ttree_name | name of output TTree (default: 'tree') |
| Arbol::Arbol | ( | HEPCLI & | cli | ) |
|
virtual |
Arbol object destructor
| void Arbol::appendToVecLeaf | ( | TString | branch_name, |
| Type | new_value ) |
Append given value to leaf (vector)
| Type | type of branch value |
| branch_name | branch name |
| new_value | new value to append |
|
virtual |
Fill TTree with all current leaves
|
protected |
(PROTECTED) Get pointer to branch object if it exists
| Type | type of branch value |
| branch_name | branch name |
| Type Arbol::getLeaf | ( | TString | branch_name | ) |
Get current leaf value
| Type | type of branch value |
| branch_name | branch name |
| std::vector< Type > Arbol::getVecLeaf | ( | TString | branch_name | ) |
Calls Arbol::getLeaf, but supplies std::vector<Type> for tparam
| Type | type of branch value |
| branch_name | branch name |
| void Arbol::insertIntoVecLeaf | ( | TString | branch_name, |
| Type | new_value, | ||
| int | index ) |
Insert value into leaf (vector) at a particular index
| Type | type of branch value |
| branch_name | branch name |
| new_value | new value to insert |
| index | target index |
| void Arbol::newBranch | ( | TString | new_branch_name | ) |
Add a new branch to TTree
| Type | type of branch value |
| new_branch_name | new branch name |
| void Arbol::newBranch | ( | TString | new_branch_name, |
| Type | new_reset_value ) |
Add a new branch to TTree and set reset value
| Type | type of branch value |
| new_branch_name | new branch name |
| new_reset_value | new branch reset value |
| void Arbol::newVecBranch | ( | TString | new_branch_name | ) |
Calls Arbol::newBranch, but supplies std::vector<Type> for tparam
| Type | type of vector branch value |
| new_branch_name | branch name |
| void Arbol::newVecBranch | ( | TString | new_branch_name, |
| std::vector< Type > | new_reset_vector ) |
Calls Arbol::newBranch, but supplies std::vector<Type> for tparam
| Type | type of vector branch value |
| new_branch_name | new branch name |
| new_reset_vector | new branch reset value (vector) |
| void Arbol::prependToVecLeaf | ( | TString | branch_name, |
| Type | new_value ) |
Prepend given value to leaf (vector)
| Type | type of branch value |
| branch_name | branch name |
| new_value | new value to prepend |
| void Arbol::resetBranches | ( | ) |
Set value of each branch to its respective reset value Uses a map of "resetters" for the same reason as Utilities::Variables.
| void Arbol::setBranchResetValue | ( | TString | branch_name, |
| Type | new_reset_value ) |
Set reset value for the branch
| Type | type of branch value |
| branch_name | branch name |
| new_reset_value | new reset value |
| void Arbol::setLeaf | ( | TString | branch_name, |
| Type | new_value ) |
Set current leaf value
| Type | type of branch value |
| branch_name | branch name |
| new_value | new value |
| void Arbol::setVecBranchResetValue | ( | TString | branch_name, |
| std::vector< Type > | new_reset_vector ) |
Calls Arbol::setBranchResetValue, but supplies std::vector<Type> for tparam
| Type | type of vector branch value |
| branch_name | branch name |
| new_reset_vector | new branch reset value (vector) |
| void Arbol::setVecLeaf | ( | TString | branch_name, |
| std::vector< Type > | new_vector ) |
Calls Arbol::setLeaf, but supplies std::vector<Type> for tparam
| Type | type of branch value |
| branch_name | branch name |
| new_vector | new branch value (vector) |
| void Arbol::sortVecLeaf | ( | TString | branch_name, |
| std::function< bool(Type, Type)> & | lambda ) |
Sort leaf (vector) using a given lambda function
| Type | type of branch value |
| branch_name | branch name |
| lambda | lambda function to use for sorting |
|
virtual |
Write TTree to TFile
| close | toggles whether TFile::Close is called after writing (default: true) |
|
protected |
Map of reset function for each dynamically typed TBranch
|
protected |
Map of dynamically typed TBranches
| TFile* Arbol::tfile |
Pointer to ROOT TFile object
| TTree* Arbol::ttree |
Pointer to ROOT TTree object