5#ifndef TRIGCONFDATA_L1TOPOALGORITHM_H
6#define TRIGCONFDATA_L1TOPOALGORITHM_H
54 virtual std::string
className()
const override;
58 const std::string &
category()
const;
61 const std::string &
klass()
const;
66 const std::vector<std::string> &
inputs()
const;
71 const std::vector<std::string> &
outputs()
const;
81 return getAttribute<T>(
"fixedParameters.generics." + parName +
".value");
85 const std::vector<VariableParameter> &
parameters()
const;
88 void print(std::ostream & os = std::cout)
const override;
132 if(flavInt==
int(
FLAV::jXE))
return "jXE";
134 if(flavInt==
int(
FLAV::jTE))
return "jTE";
142 if(flavInt==
int(
FLAV::gTE))
return "gTE";
144 if(flavInt==
int(
FLAV::cXE))
return "cXE";
147 throw std::runtime_error(
"Flavour " + std::to_string(flavInt) +
" for EnergyThreshold algorithm not recongnised!");
150 if(flavStr==
"jXE")
return int(
FLAV::jXE);
152 if(flavStr==
"jTE")
return int(
FLAV::jTE);
162 if(flavStr==
"gTE")
return int(
FLAV::gTE);
164 if(flavStr==
"cXE")
return int(
FLAV::cXE);
167 throw std::runtime_error(
"Flavour " + flavStr +
" for EnergyThreshold algorithm not recongnised!");
const ptree & data() const
Access to the underlying data, if needed.
DataStructure()
Default constructor, leading to an uninitialized configuration object.
T getAttribute(const std::string &key, bool ignoreIfMissing=false, const T &def=T()) const
Access to simple attribute.
boost::property_tree::ptree ptree
virtual std::string className() const override
A string that is the name of the class.
L1TopoAlgorithm()=default
Constructor.
DataStructure generics() const
Accessors to generic parameters.
std::vector< std::string > fullOutputs() const
void print(std::ostream &os=std::cout) const override
print main info
std::string genericParameter(const std::string &parName) const
const std::vector< std::string > & inputs() const
Accessor to input collections Sorting and Multiplicity algorithms have only one input.
L1TopoAlgorithm(L1TopoAlgorithm &&)=default
const std::vector< std::string > & outputs() const
Accessor to output collections Sorting and Multiplicity algorithms have only one output.
L1TopoAlgorithm & operator=(const L1TopoAlgorithm &)=delete
std::vector< VariableParameter > m_parameters
const std::vector< VariableParameter > & parameters() const
Accessor to register parameters which can change for each algorithm instance.
const std::string & category() const
virtual void update() override
Update the internal data after modification of the data object.
void load()
Update the internal data after modification of the data object.
AlgorithmType type() const
L1TopoAlgorithm(const L1TopoAlgorithm &)=delete
virtual ~L1TopoAlgorithm() override=default
Destructor.
std::vector< std::string > m_inputs
std::vector< std::string > m_outputs
T genericParameter(const std::string &parName) const
const std::string & klass() const
Accessor to algorithm class type.
static unsigned int flavourStrToInt(const std::string &flavStr)
static std::string flavourIntToStr(const unsigned int flavInt)
Forward iterator to traverse the main components of the trigger configuration.
unsigned int selection() const
VariableParameter(const std::string &name, int value, std::optional< unsigned int > selection=std::nullopt)
std::optional< unsigned int > selection_optional() const
std::optional< unsigned int > m_selection
const std::string & name() const