AnalysisTree
Loading...
Searching...
No Matches
AnalysisTree::Chain Class Reference
Inheritance diagram for AnalysisTree::Chain:
Inheritance graph
Collaboration diagram for AnalysisTree::Chain:
Collaboration graph

Public Member Functions

 Chain (TTree *tree, Configuration *config, DataHeader *data_header)
 
 Chain (const std::string &filename, const std::string &treename)
 
 Chain (std::vector< std::string > filelists, std::vector< std::string > treenames)
 
ANALYSISTREE_ATTR_NODISCARD ConfigurationGetConfiguration () const
 
ANALYSISTREE_ATTR_NODISCARD DataHeaderGetDataHeader () const
 
ANALYSISTREE_ATTR_NODISCARD const std::map< std::string, BranchPointer > & GetBranchPointers () const
 
ANALYSISTREE_ATTR_NODISCARD const std::map< std::string, Matching * > & GetMatchPointers () const
 
void SetDataHeader (DataHeader *dh)
 
int CheckBranchExistence (const std::string &branchname)
 
BranchPointer GetPointerToBranch (const std::string &name) const
 
void InitPointersToBranches (std::set< std::string > names)
 Loads selected list of branches from TTree.
 
Long64_t Draw (const char *varexp, const char *selection=nullptr, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) override
 
Long64_t Scan (const char *varexp, const char *selection=nullptr, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) override
 
void Print (Option_t *) const override
 
class Branch GetBranch (const std::string &name) const
 
class Branch GetBranchObject (const std::string &name) const
 
MatchingGetMatching (const std::string &br1, const std::string &br2) const
 
TTree * CloneChain (int nentries=0)
 Clones tree without friends.
 
ConfigurationCloneConfiguration () const
 Clones Configuration of input Chain without friends.
 

Protected Member Functions

void InitChain ()
 
void InitConfiguration ()
 
void InitDataHeader ()
 
std::vector< TChain * > GetTChains ()
 
std::string LookupAlias (const std::vector< std::string > &names, const std::string &name, size_t copy=0)
 

Static Protected Member Functions

static TChain * MakeChain (const std::string &filelist, const std::string &treename)
 
template<class T >
static T * GetObjectFromFileList (const std::string &filelist, const std::string &name)
 Loads object of type T from one (first) ROOT file specified in filelist.
 

Protected Attributes

std::vector< std::string > filelists_ {}
 
std::vector< std::string > treenames_ {}
 
Configurationconfiguration_ {nullptr}
 
DataHeaderdata_header_ {nullptr}
 
std::map< std::string, BranchPointer > branches_ {}
 
std::map< std::string, Matching * > matches_ {}
 

Member Function Documentation

◆ GetObjectFromFileList()

template<class T >
T * AnalysisTree::Chain::GetObjectFromFileList ( const std::string & filelist,
const std::string & name )
staticprotected

Loads object of type T from one (first) ROOT file specified in filelist.

Template Parameters
Ttype of object
Parameters
filelist
namename of the object
Returns
pointer to the loaded object

◆ GetTChains()

std::vector< TChain * > AnalysisTree::Chain::GetTChains ( )
protected
Returns
Vector of pointers on all TChains in AT::Chain - main one and friended ones

◆ InitPointersToBranches()

void AnalysisTree::Chain::InitPointersToBranches ( std::set< std::string > names)

Loads selected list of branches from TTree.

Parameters
t
config
namesList of selected branches. If empty, loads all branches found in Configuration

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