1 #ifndef PandaTree_Framework_CollectionBase_h 2 #define PandaTree_Framework_CollectionBase_h 4 #include "ContainerBase.h" 28 Int_t
getEntry(UInt_t, Long64_t entry, Bool_t localEntry = kFALSE)
final;
29 Int_t
fill(TTree&)
final;
31 void print(std::ostream& = std::cout, UInt_t level = 1)
const override;
32 void dump(std::ostream& = std::cout)
const override;
34 UInt_t size()
const final {
return size_; }
36 Bool_t empty()
const {
return size_ == 0; }
64 virtual void reallocate_(UInt_t) = 0;
67 void doSetAddress_(TTree&,
utils::BranchList const&, Bool_t setStatus, Bool_t asInput);
81 std::vector<Bool_t> inputInSynch_{};
88 std::vector<std::pair<TTree*, Bool_t>> outputs_{};
void prepareFill(TTree &)
Check for address change before fill.
Definition: CollectionBase.cc:230
void unlink(TTree &) final
Unlink from a tree.
Definition: CollectionBase.cc:179
Base class for dynamic-size containers.
Definition: CollectionBase.h:16
Int_t getEntry(TTree &tree, Long64_t entry, Bool_t localEntry=kFALSE) final
Read an entry from an input tree.
Definition: ReaderObject.cc:21
void reserve(UInt_t size)
Pre-allocate space for the container.
Definition: CollectionBase.cc:217
void book(TTree &, utils::BranchList const &blist={"*"}) final
Book new branches bound to this object on the tree.
Definition: CollectionBase.cc:85
virtual void resizeVectors_(UInt_t)
Override when there are vector members.
Definition: Element.h:64
List of branch names.
Definition: IOUtils.h:64
utils::BranchList getBranchNames(Bool_t fullName=kTRUE, Bool_t=kFALSE) const final
Get the full list of branch names.
Definition: CollectionBase.cc:50
Int_t getEntry(UInt_t, Long64_t entry, Bool_t localEntry=kFALSE) final
Read an entry from an input tree.
Definition: CollectionBase.cc:107
void init() final
Reset the object state.
Definition: CollectionBase.h:30
utils::BranchList getStatus(TTree &) const final
Get status of branches in the tree.
Definition: CollectionBase.cc:35
void dump(std::ostream &=std::cout) const override
Dump the object content.
Definition: CollectionBase.cc:171
Base class for all containers.
Definition: ContainerBase.h:18
Int_t fill(TTree &) final
Fill a tree.
Definition: CollectionBase.cc:156
void print(std::ostream &=std::cout, UInt_t level=1) const override
Print the object content.
Definition: CollectionBase.cc:164
void setStatus(TTree &, utils::BranchList const &blist) final
Set status of branches to true (matching branch) or false (vetoed branch)
Definition: CollectionBase.cc:18
void clear()
Clear the container (set size = 0)
Definition: CollectionBase.h:56
void resize(UInt_t size)
Resize the container.
Definition: CollectionBase.cc:192
UInt_t setAddress(TTree &, utils::BranchList const &blist={"*"}, Bool_t setStatus=kTRUE) final
Bind the tree branches to the elements of this object.
Definition: CollectionBase.cc:71