|
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef MUONTESTER_MUONVECTORBRANCH_H
5 #define MUONTESTER_MUONVECTORBRANCH_H
28 bool fill(
const EventContext& ctx)
override;
33 inline size_t size()
const;
virtual TTree * tree()=0
Returns the pointer to the underlying TTree object.
VectorBranch(TTree *tree, const std::string &name, const T &def)
Constructor with assigned default value.
void setDefault(const T &def)
VectorBranch(MuonTesterTree &tree, const std::string &name)
virtual ~VectorBranch()=default
const T & getDefault() const
std::vector< T > m_variable
bool fill(const EventContext &ctx) override
Clears vector in cases that it has not been updated in this event Retursn falls if the vector has not...
T & operator[](size_t idx)
Accesses the idx-th element.
void push_back(const T &value)
Adds a new element at the end of the vector.
Class to store array like branches into the n-tuples.
virtual std::string name() const =0
Returns the name of the branch.
VectorBranch(MuonTesterTree &tree, const std::string &name, const T &def)
bool init() override
Initialized the Branch.
size_t size() const
Returns the number of actual saved elements.
void operator+=(const T &value)
Most basic interface class used by the MuonTester tree.
VectorBranch(TTree *tree, const std::string &name)
Standard constructor.