|
PandaTree
|
Base class for dynamic-size containers. More...
#include <CollectionBase.h>
Public Member Functions | |
| CollectionBase (CollectionBase const &src)=delete | |
| 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 fullName=kTRUE, Bool_t=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. | |
| void | print (std::ostream &=std::cout, UInt_t level=1) const override |
| Print the object content. | |
| void | dump (std::ostream &=std::cout) const override |
| Dump the object content. | |
| void | unlink (TTree &) final |
| Unlink from a tree. | |
| UInt_t | size () const final |
| Bool_t | empty () const |
| void | resize (UInt_t size) |
| Resize the container. More... | |
| void | reserve (UInt_t size) |
| Pre-allocate space for the container. More... | |
| void | clear () |
| Clear the container (set size = 0) | |
| void | prepareFill (TTree &) |
| Check for address change before fill. | |
Public Member Functions inherited from panda::ContainerBase | |
| ContainerBase (ContainerBase const &)=delete | |
| ContainerBase & | operator= (ContainerBase const &)=delete |
| char const * | getName () const final |
| Name of this object. | |
| void | setName (char const *name) final |
| Set object name. | |
| void | print (std::ostream &=std::cout, UInt_t level=1) const override |
| Print the object content. | |
| void | dump (std::ostream &=std::cout) const override |
| Dump the object content. | |
| virtual Element::datastore & | getData ()=0 |
| virtual Element::datastore const & | getData () const =0 |
| virtual Element & | elemAt (UInt_t)=0 |
| virtual Element const & | elemAt (UInt_t) const =0 |
| virtual std::vector< UInt_t > | sort (Comparison const &fct)=0 |
| Sort the contents using a comparison function and returns an array of pre-sort indices. More... | |
Public Member Functions inherited from panda::ReaderObject | |
| 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... | |
| void | updateBranchArray (TTree &) |
Public Member Functions inherited from panda::Object | |
| Object (Object const &) | |
| Object & | operator= (Object const &) |
Protected Member Functions | |
| CollectionBase (char const *name, UInt_t unitSize, Bool_t dummy) | |
| virtual void | reallocate_ (UInt_t)=0 |
Protected Member Functions inherited from panda::ContainerBase | |
| ContainerBase (char const *name, UInt_t unitSize) | |
Protected Member Functions inherited from panda::ReaderObject | |
| UInt_t | registerInput_ (TTree &) |
Additional Inherited Members | |
Public Types inherited from panda::ContainerBase | |
| typedef std::function< bool(Element const &, Element const &)> | Comparison |
Protected Types inherited from panda::ReaderObject | |
| typedef std::vector< TBranch * > | BranchArray |
| typedef std::pair< TTree *, BranchArray > | BranchMapping |
| List of branches linked with this object in the tree. | |
Protected Attributes inherited from panda::ContainerBase | |
| TString | name_ {""} |
| UInt_t const | unitSize_ {0} |
| Char_t * | array_ {0} |
Protected Attributes inherited from panda::ReaderObject | |
| std::vector< BranchMapping > | inputBranches_ |
| List of list of input branches. More... | |
Base class for dynamic-size containers.
Panda containers can be fixed-size (Array) or dynamic-size (Collection). Dynaic-size containers are similar to std::vectors.
|
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::Object.
| void panda::CollectionBase::reserve | ( | UInt_t | size | ) |
Pre-allocate space for the container.
If the new size is greater than nmax, data will be reallocated, making all references invalid.
| size | New collection allocation size. |
| void panda::CollectionBase::resize | ( | UInt_t | size | ) |
Resize the container.
If expanding, init() is invoked on all new elements. If the new size is greater than nmax, data will be reallocated, making all references invalid.
| size | New collection size. |
|
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.
1.8.12