1 #ifndef PandaTree_Framework_ContainerBase_h 2 #define PandaTree_Framework_ContainerBase_h 4 #include "ReaderObject.h" 25 char const*
getName() const final {
return name_; }
26 void setName(
char const* name)
final { name_ = name; }
27 void print(std::ostream& = std::cout, UInt_t level = 1)
const override;
28 void dump(std::ostream& = std::cout)
const override;
30 virtual UInt_t size()
const = 0;
33 virtual Element& elemAt(UInt_t) = 0;
34 virtual Element const& elemAt(UInt_t)
const = 0;
36 typedef std::function<bool(Element const&, Element const&)> Comparison;
43 virtual std::vector<UInt_t>
sort(Comparison
const& fct) = 0;
46 ContainerBase(
char const* name, UInt_t unitSize) : name_(name), unitSize_(unitSize) {}
49 UInt_t
const unitSize_{0};
void dump(std::ostream &=std::cout) const override
Dump the object content.
Definition: ContainerBase.cc:23
void print(std::ostream &=std::cout, UInt_t level=1) const override
Print the object content.
Definition: ContainerBase.cc:7
void setName(char const *name) final
Set object name.
Definition: ContainerBase.h:26
char const * getName() const final
Name of this object.
Definition: ContainerBase.h:25
Base class for all containers.
Definition: ContainerBase.h:18
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.
Base class for elements of containers.
Definition: Element.h:32
Base class for objects that can be linked to an input tree directly.
Definition: ReaderObject.h:10