RDFAnalysis
0.1.1
Physics analysis with ROOT::RDataFrame
|
Helper functions and classes for adapting function arguments that depend on the systematic being evaluated. More...
Go to the source code of this file.
Data Structures | |
struct | sysvar_traits< T, typename > |
Provide contextual information about a class. More... | |
struct | sysvar_traits< T, std::enable_if_t< std::decay_t< T >::is_rdf_sysvar, void > > |
Provide contextual information about a class. More... | |
class | SysVarBranch |
Class to trigger translation of a single branch name. More... | |
class | SysVarBranchVector |
Class to trigger translation of a vector of branches. More... | |
class | SysVarNewBranch |
Class to trigger translation of a new branch name. More... | |
class | SysVarStringExpression |
Class to trigger translation of a string expression. More... | |
Namespaces | |
RDFAnalysis | |
Functions | |
template<typename T > | |
std::enable_if_t< sysvar_traits< T >::is_sysvar, typename sysvar_traits< T >::value_type > | sysVarTranslate (T &&t, IBranchNamer &namer, const std::string &syst) |
Translate a variable. More... | |
template<typename T > | |
std::enable_if_t<!sysvar_traits< T >::is_sysvar, T > | sysVarTranslate (T &&t, IBranchNamer &, const std::string &) |
Translate a variable. More... | |
Helper functions and classes for adapting function arguments that depend on the systematic being evaluated.
Actions being applied to the Nodes need to be adapted and called for each relevant systematic. Some of the arguments do not change through this process but many do (for example, branch names and string expressions). We call this process of changing arguments for different systematic calls of the same action a translation.
The Node::Act and Node::ActResult functions determine whether or not to translate an argument by using the sysvar_traits struct which in turn looks for a static constexpr bool member of the correspond argument class type called is_rdf_sysvar. If this is present (and true) the argument will be translated.
For most purposes the SysVarBranch, SysVarBranchVector, SysVarNewBranch and SysVarStringExpression classes provided here will be sufficient (in fact most users will never need to even be aware of the existence of any of this), for some actions it may be necessary to define additional argument classes In order to do this, three things are necessary: