Skip to content
Snippets Groups Projects
Commit 9f7ff9bf authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

added new-style constructor for Multiplier module

parent 910a4aee
No related branches found
No related tags found
No related merge requests found
......@@ -54,14 +54,26 @@ namespace ChimeraTK {
struct Multiplier : public ApplicationModule {
using ApplicationModule::ApplicationModule;
Multiplier(EntityOwner *owner, const std::string &name, const std::string &factorName,
const std::string &unitInput, const std::string &unitOutput,
const std::string &description, const std::unordered_set<std::string> &tagsInput={},
const std::unordered_set<std::string> &tagsOutput={},
const std::unordered_set<std::string> &tagsFactor={})
: ApplicationModule(owner, name, "", true)
{
input.replace(ArrayPushInput<InputType>(this, name, unitInput, NELEMS, description, tagsInput));
output.replace(ArrayOutput<OutputType>(this, name, unitOutput, NELEMS, description, tagsOutput));
factor.replace(ScalarPushInput<double>(this, factorName, "("+unitOutput+")/("+unitInput+")", description, tagsFactor));
}
/** Note: This constructor is deprectated! */
Multiplier(EntityOwner *owner, const std::string &name, const std::string &description)
: ApplicationModule(owner, name, ""),
: ApplicationModule(owner, name, "", true),
input(this, "input", "", NELEMS, description),
factor(this, "factor", "", "Factor to scale the input value with"),
output(this, "output", "", NELEMS, description)
{
setEliminateHierarchy();
}
{}
ArrayPushInput<InputType> input;
ScalarPushInput<double> factor;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment