PandaTree
|
Base class for objects that can be linked to an input tree directly. More...
#include <ReaderObject.h>
Public Member Functions | |
ReaderObject (ReaderObject const &src) | |
ReaderObject & | operator= (ReaderObject const &) |
Int_t | getEntry (TTree &tree, Long64_t entry, Bool_t localEntry=kFALSE) final |
Read an entry from an input tree. More... | |
Int_t | getEntry (UInt_t treeId, Long64_t entry, Bool_t localEntry=kFALSE) override |
Read an entry from an input tree. More... | |
virtual void | unlink (TTree &) |
Unlink from a tree. | |
void | updateBranchArray (TTree &) |
![]() | |
Object (Object const &) | |
Object & | operator= (Object const &) |
virtual void | setStatus (TTree &tree, utils::BranchList const &) |
Set status of branches to true (matching branch) or false (vetoed branch) More... | |
virtual utils::BranchList | getStatus (TTree &) const |
Get status of branches in the tree. | |
virtual utils::BranchList | getBranchNames (Bool_t fullName=kTRUE, Bool_t direct=kFALSE) const |
Get the full list of branch names. More... | |
virtual UInt_t | setAddress (TTree &tree, utils::BranchList const &={"*"}, Bool_t setStatus=kTRUE) |
Bind the tree branches to the elements of this object. More... | |
virtual void | book (TTree &tree, utils::BranchList const &={"*"}) |
Book new branches bound to this object on the tree. More... | |
virtual Int_t | fill (TTree &tree) |
Fill a tree. More... | |
virtual void | init () |
Reset the object state. | |
virtual char const * | getName () const |
Name of this object. | |
virtual void | setName (char const *) |
Set object name. | |
virtual void | print (std::ostream &out=std::cout, UInt_t level=1) const |
Print the object content. | |
virtual void | dump (std::ostream &=std::cout) const |
Dump the object content. | |
Protected Types | |
typedef std::vector< TBranch * > | BranchArray |
typedef std::pair< TTree *, BranchArray > | BranchMapping |
List of branches linked with this object in the tree. | |
Protected Member Functions | |
UInt_t | registerInput_ (TTree &) |
Protected Attributes | |
std::vector< BranchMapping > | inputBranches_ |
List of list of input branches. More... | |
Base class for objects that can be linked to an input tree directly.
|
finalvirtual |
Read an entry from an input tree.
tree | Tree to get the entry from. |
entry | Entry number in the input tree. |
localEntry | If true, entry must be the local entry number of the current tree (i.e. return value of LoadTree) |
If localEntry is false, calls tree.LoadEntry(entry).
Reimplemented from panda::Object.
|
overridevirtual |
Read an entry from an input tree.
treeId | Index of the tree in the inputBranches_ vector. |
entry | Entry number in the input tree. |
localEntry | If true, entry must be the local entry number of the current tree (i.e. return value of LoadTree) |
If localEntry is false, calls tree.LoadEntry(entry).
Reimplemented from panda::Object.
Reimplemented in panda::TreeEntry.
|
protected |
List of list of input branches.
With vector<BranchMapping> implementation, we will be serially searching for a tree whenever getEntry(tree, entry) is called. Alternative would be to use a map<TTree*, BranchArray> to make use of binary-tree lookup. However most of the time we will be dealing with one input tree, and at most a few input trees, that the map implementation actually won't make sense.