PandaTree
Public Member Functions | List of all members
panda::Object Class Reference

Object base class. More...

#include <Object.h>

Inheritance diagram for panda::Object:
panda::Element panda::ReaderObject panda::PackedTrack panda::Particle panda::Proton panda::SuperCluster panda::TPPair panda::Vertex panda::ContainerBase panda::Singlet panda::TreeEntry

Public Member Functions

 Object (Object const &)
 
Objectoperator= (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 getEntry (TTree &tree, Long64_t entry, Bool_t localEntry=kFALSE)
 Read an entry from an input tree. More...
 
virtual Int_t getEntry (UInt_t treeId, Long64_t entry, Bool_t localEntry=kFALSE)
 Read an entry from an input 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.
 

Detailed Description

Object base class.

Object is the base of all panda types. Its mere function is to define the interfaces of derived classes. Four different types of classes inherit from Object. Element is the base class of objects that are elements of containers (Array = fixed size and Collection = dynamic size). Singlet is the base class of all objects that are not in containers. The containers themselves also inherit from Object. The fourth derived class is TreeEntry, which represents one full entry in a TTree (e.g. Event).

Member Function Documentation

§ book()

virtual void panda::Object::book ( TTree &  tree,
utils::BranchList const &  = {"*"} 
)
inlinevirtual

Book new branches bound to this object on the tree.

Parameters
tree
blistList of branches to book. Vetoed or unmentioned branches are not booked.

Reimplemented in panda::Element, panda::TreeEntry, panda::Singlet, panda::ArrayBase, and panda::CollectionBase.

§ fill()

virtual Int_t panda::Object::fill ( TTree &  tree)
inlinevirtual

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().

Parameters
tree

Reimplemented in panda::TreeEntry, and panda::CollectionBase.

§ getBranchNames()

virtual utils::BranchList panda::Object::getBranchNames ( Bool_t  fullName = kTRUE,
Bool_t  direct = kFALSE 
) const
inlinevirtual

Get the full list of branch names.

Parameters
fullNameIf true, prepend "(object name)."
directIf true, return only direct branches of this object (relevant only for TreeEntry)

Reimplemented in panda::Element, panda::TreeEntry, panda::Singlet, panda::ArrayBase, and panda::CollectionBase.

§ getEntry() [1/2]

virtual Int_t panda::Object::getEntry ( TTree &  tree,
Long64_t  entry,
Bool_t  localEntry = kFALSE 
)
inlinevirtual

Read an entry from an input tree.

Parameters
treeTree to get the entry from.
entryEntry number in the input tree.
localEntryIf 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).

Returns
Number of bytes read.

Reimplemented in panda::Element, and panda::ReaderObject.

§ getEntry() [2/2]

virtual Int_t panda::Object::getEntry ( UInt_t  treeId,
Long64_t  entry,
Bool_t  localEntry = kFALSE 
)
inlinevirtual

Read an entry from an input tree.

Parameters
treeIdIndex of the tree in the inputBranches_ vector.
entryEntry number in the input tree.
localEntryIf 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).

Returns
Number of bytes read.

Reimplemented in panda::Element, panda::TreeEntry, panda::CollectionBase, and panda::ReaderObject.

§ setAddress()

virtual UInt_t panda::Object::setAddress ( TTree &  tree,
utils::BranchList const &  = {"*"},
Bool_t  setStatus = kTRUE 
)
inlinevirtual

Bind the tree branches to the elements of this object.

Parameters
tree
blistList of branches to bind. Vetoed or unmentioned branches are not bound.
setStatusIf true, set the status of the branch to true before binding.
Returns
Index of the bound tree in the inputBranches_ vector.

Reimplemented in panda::Element, panda::TreeEntry, panda::Singlet, panda::ArrayBase, and panda::CollectionBase.

§ setStatus()

virtual void panda::Object::setStatus ( TTree &  tree,
utils::BranchList const &   
)
inlinevirtual

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.

Parameters
tree
blistList 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 in panda::Element, panda::TreeEntry, panda::Singlet, panda::ArrayBase, and panda::CollectionBase.


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