Variable is a wrapper object for Field. In contrary to Field Variable is not bound to the data. It could represent a Field itself or, if specified, a result of operation on two or more fields.
More...
#include <Variable.hpp>
|
| Variable (const Variable &)=default |
|
| Variable (Variable &&)=default |
|
Variable & | operator= (Variable &&)=default |
|
Variable & | operator= (const Variable &)=default |
|
| Variable (const Field &field) |
|
| Variable (std::string name, std::vector< Field > fields, std::function< double(std::vector< double > &)> lambda) |
|
| Variable (const std::string &branch, const std::string &field) |
|
void | Init (const Configuration &conf) |
|
ANALYSISTREE_ATTR_NODISCARD const std::string & | GetName () const |
|
ANALYSISTREE_ATTR_NODISCARD const std::vector< Field > & | GetFields () const |
|
ANALYSISTREE_ATTR_NODISCARD short | GetNumberOfBranches () const |
|
ANALYSISTREE_ATTR_NODISCARD std::set< std::string > | GetBranches () const |
|
ANALYSISTREE_ATTR_NODISCARD std::string | GetBranchName () const |
|
double | GetValue (std::vector< const BranchChannel * > &bch, std::vector< size_t > &id) const |
|
double | GetValue (const BranchChannel &a, size_t a_id, const BranchChannel &b, size_t b_id) const |
|
template<class T > |
double | GetValue (const T &object) const |
|
double | GetValue (const BranchChannel &object) const |
|
void | SetName (std::string name) |
|
void | Print () const |
|
void | IfEmptyVariableConvertToOnes (const Variable &var) |
|
|
std::string | name_ |
|
std::vector< Field > | fields_ {} |
|
std::vector< double > | vars_ {} |
|
std::function< double(std::vector< double > &)> | lambda_ {[](std::vector<double>& var) { return var.at(0); }} |
|
short | n_branches_ {0} |
|
bool | is_init_ {false} |
|
Variable is a wrapper object for Field. In contrary to Field Variable is not bound to the data. It could represent a Field itself or, if specified, a result of operation on two or more fields.
◆ Variable()
AnalysisTree::Variable::Variable |
( |
std::string | name, |
|
|
std::vector< Field > | fields, |
|
|
std::function< double(std::vector< double > &)> | lambda ) |
Generic constructor for complicated variables
- Parameters
-
fields | vector of Fields |
lambda | function to calculate variable TODO maybe move to Variable::FromFunction() |
◆ FromString()
Variable AnalysisTree::Variable::FromString |
( |
const std::string & | full_name | ) |
|
|
static |
The documentation for this class was generated from the following files: