 |
Belle II Software
release-05-02-19
|
11 #include <analysis/modules/VariableToReturnValue/VariableToReturnValueModule.h>
13 #include <analysis/dataobjects/EventExtraInfo.h>
14 #include <framework/datastore/StoreObjPtr.h>
15 #include <framework/logging/Logger.h>
26 Module(), m_function(
nullptr)
29 setDescription(
"Calculate event-based variable specified by the user and sets return value of the module accordingly.");
30 setPropertyFlags(c_ParallelProcessingCertified);
32 addParam(
"variable", m_variable,
33 "Variable taken from Variable::Manager, see output of 'basf2 variables.py'.", std::string(
""));
40 B2ERROR(
"Variable '" <<
m_variable <<
"' is not available in Variable::Manager!");
Module to calculate variable specified by the user and set return value accordingly.
A variable returning a floating-point value for a given Particle.
const Var * getVariable(std::string name)
Get the variable belonging to the given key.
std::string m_variable
variable name (module parameter)
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
virtual void initialize() override
Initialize.
Variable::Manager::FunctionPtr m_function
function pointer corresponding to given variable.
Abstract base class for different kinds of events.
void setReturnValue(int value)
Sets the return value for this module as integer.
virtual void event() override
Method called for each event.
static Manager & Instance()
get singleton instance.