4#ifndef MUONTESTER_MUONSCALARBRANCH_H
5#define MUONTESTER_MUONSCALARBRANCH_H
27 bool fill(
const EventContext& ctx)
override;
Most basic interface class used by the MuonTester tree.
virtual std::string name() const =0
Returns the name of the branch.
virtual TTree * tree()=0
Returns the pointer to the underlying TTree object.
MuonTesterBranch(MuonTesterTree &tree, const std::string &br_name)
ScalarBranch(MuonTesterTree &tree, const std::string &name, const T &default_value)
bool mustBeUpdated() const
const T & getVariable() const
bool fill(const EventContext &ctx) override
The fill method checks if enough information is provided such that the branch is cleared from the inf...
const T & operator=(const T &value)
Setter methods.
virtual ~ScalarBranch()=default
const T & setValue(const T &value)
const T & getDefault() const
bool init() override
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
ScalarBranch(TTree *tree, const std::string &name, const T &default_value)
Constructor providing a default_value which is inserted when the information in the branch is not upd...
ScalarBranch(TTree *tree, const std::string &name)
Default constructor passing the TTree object and the name of the branch in the tree.
void setDefault(const T &def)
ScalarBranch(MuonTesterTree &tree, const std::string &name)
Class to store array like branches into the n-tuples.
std::ostream & operator<<(std::ostream &out, const ScalarBranch< T > &B)