4#ifndef MUONTESTER_MATRIXBRANCH_H
5#define MUONTESTER_MATRIXBRANCH_H
32 inline T&
get(
size_t i,
size_t j);
41 inline size_t ncols(
size_t row)
const;
MatrixBranch(MuonTesterTree &tree, const std::string &name)
MatrixBranch(MuonTesterTree &tree, const std::string &b_name, const T &def)
size_t nrows() const
Size of the outer vector.
void setDefault(const T &def)
virtual ~MatrixBranch()=default
const T & getDefault() const
Get the default value to fill the empty fields in the vector.
T & get(size_t i, size_t j)
Returns the j-th element of the i-th inner vector.
MatrixBranch(TTree *tree, const std::string &name)
Standard constructor.
size_t ncols(size_t row) const
Size of the i-th inner vector.
void push_back(size_t i, const T &value)
MatrixBranch(TTree *tree, const std::string &b_name, const T &def)
Constructor with default value extending the array.
std::string name() const override final
TTree * tree() override final
VectorBranch(TTree *tree, const std::string &name)
Class to store array like branches into the n-tuples.