1 #ifndef PandaTree_Framework_Element_h 2 #define PandaTree_Framework_Element_h 49 virtual void allocate(UInt_t n) { nmax_ = n; }
50 virtual void deallocate() {}
54 virtual void setAddress(TTree&, TString
const&,
utils::BranchList const& = {
"*"}, Bool_t setStatus = kTRUE) {}
55 virtual void book(TTree&, TString
const&,
utils::BranchList const& = {
"*"}, Bool_t dynamic = kTRUE) {}
56 virtual void releaseTree(TTree&, TString
const&) {}
58 UInt_t nmax()
const {
return nmax_; }
85 static char const* typeName() {
return "Element"; }
89 utils::BranchList getBranchNames(Bool_t fullName = kTRUE, Bool_t = kFALSE)
const final;
90 UInt_t setAddress(TTree&,
utils::BranchList const& blist = {
"*"}, Bool_t setStatus = kTRUE)
final;
92 Int_t
getEntry(TTree& tree, Long64_t entry, Bool_t localEntry = kFALSE)
final;
93 Int_t
getEntry(UInt_t treeId, Long64_t entry, Bool_t localEntry = kFALSE)
final;
94 void init() final { doInit_(); }
95 char const*
getName()
const final;
96 void setName(
char const*)
final;
108 virtual void doInit_() = 0;
120 template<
class O>
typename O::datastore& getData(O
const*)
const;
128 typename O::datastore&
129 Element::StoreManager::getData(O
const* _obj)
const 131 return static_cast<typename O::datastore&
>(getArray(_obj).getData());
Base class for fixed-size containers.
Definition: ArrayBase.h:13
Base class for dynamic-size containers.
Definition: CollectionBase.h:16
Object base class.
Definition: Object.h:22
void setName(char const *) final
Set object name.
Definition: Element.cc:30
virtual void resizeVectors_(UInt_t)
Override when there are vector members.
Definition: Element.h:64
Element(datastore &, UInt_t)
Standard constructor.
Definition: Element.h:76
List of branch names.
Definition: IOUtils.h:64
Element(Element const &src)
Copy constructor.
Definition: Element.h:81
Base class for elements of containers.
Definition: Element.h:32
void init() final
Reset the object state.
Definition: Element.h:94
Int_t getEntry(TTree &tree, Long64_t entry, Bool_t localEntry=kFALSE) final
Read an entry from an input tree.
Definition: Element.cc:72
Singleton class for bookkeeping of Elements constructed as singlets.
Definition: Element.h:117
Element()=delete
Disabled default constructor.
char const * getName() const final
Name of this object.
Definition: Element.cc:19