PandaTree
|
Base class for objects representing one full entry of a tree (e.g. Event). More...
#include <TreeEntry.h>
Public Member Functions | |
TreeEntry (TreeEntry const &src) | |
TreeEntry & | operator= (TreeEntry const &) |
void | setStatus (TTree &, utils::BranchList const &blist) final |
Set status of branches to true (matching branch) or false (vetoed branch) More... | |
utils::BranchList | getStatus (TTree &) const final |
Get status of branches in the tree. | |
utils::BranchList | getBranchNames (Bool_t=kTRUE, Bool_t direct=kFALSE) const final |
Get the full list of branch names. More... | |
UInt_t | setAddress (TTree &, utils::BranchList const &blist={"*"}, Bool_t setStatus=kTRUE) final |
Bind the tree branches to the elements of this object. More... | |
void | book (TTree &, utils::BranchList const &blist={"*"}) final |
Book new branches bound to this object on the tree. More... | |
Int_t | getEntry (UInt_t, Long64_t entry, Bool_t localEntry=kFALSE) final |
Read an entry from an input tree. More... | |
Int_t | fill (TTree &) final |
Fill a tree. More... | |
void | init () final |
Reset the object state. | |
char const * | getName () const final |
Name of this object. | |
void | setName (char const *) final |
Set object name. | |
void | unlink (TTree &) final |
Unlink from a tree. | |
![]() | |
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... | |
void | updateBranchArray (TTree &) |
![]() | |
Object (Object const &) | |
Object & | operator= (Object const &) |
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 Member Functions | |
virtual void | doSetStatus_ (TTree &, utils::BranchList const &)=0 |
virtual utils::BranchList | doGetStatus_ (TTree &) const =0 |
virtual utils::BranchList | doGetBranchNames_ () const =0 |
virtual void | doSetAddress_ (TTree &tree, utils::BranchList const &, Bool_t setStatus)=0 |
virtual void | doBook_ (TTree &, utils::BranchList const &)=0 |
virtual void | doGetEntry_ (TTree &)=0 |
virtual void | doInit_ ()=0 |
virtual void | doUnlink_ (TTree &)=0 |
![]() | |
UInt_t | registerInput_ (TTree &) |
Protected Attributes | |
std::vector< Object * > | objects_ {} |
list of object branches (containers and singlets) | |
std::vector< CollectionBase * > | collections_ {} |
list of collections (overlaps with objects_) | |
![]() | |
std::vector< BranchMapping > | inputBranches_ |
List of list of input branches. More... | |
Additional Inherited Members | |
![]() | |
typedef std::vector< TBranch * > | BranchArray |
typedef std::pair< TTree *, BranchArray > | BranchMapping |
List of branches linked with this object in the tree. | |
Base class for objects representing one full entry of a tree (e.g. Event).
A derived class of TreeEntry typically owns multiple Singlets, Containers, as well as its own primitive branches.
|
finalvirtual |
Book new branches bound to this object on the tree.
tree | |
blist | List of branches to book. Vetoed or unmentioned branches are not booked. |
Reimplemented from panda::Object.
|
finalvirtual |
Fill a tree.
In most of the objects this will just call tree.Fill(). The function takes care of the case with e.g. Collection where internal address can change after the call to book().
tree |
Reimplemented from panda::Object.
|
finalvirtual |
Get the full list of branch names.
fullName | If true, prepend "(object name)." |
direct | If true, return only direct branches of this object (relevant only for TreeEntry) |
Reimplemented from panda::Object.
|
finalvirtual |
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::ReaderObject.
|
finalvirtual |
Bind the tree branches to the elements of this object.
tree | |
blist | List of branches to bind. Vetoed or unmentioned branches are not bound. |
setStatus | If true, set the status of the branch to true before binding. |
Reimplemented from panda::Object.
|
finalvirtual |
Set status of branches to true (matching branch) or false (vetoed branch)
Sets the status of the branch to true (branch is in the list) or false (branch is vetoed in the list). Branches not mentioned in the branch list are untouched.
tree | |
blist | List of branches. The status of a branch is set to true (false) if BranchName::in(blist) (BranchName::vetoed(blist)) evaluates to true for the branch. |
Reimplemented from panda::Object.