19 #include <momemta/Module.h> 23 #include <momemta/ParameterSet.h> 24 #include <momemta/Solution.h> 25 #include <momemta/Types.h> 37 auto tag = parameters.get<
InputTag>(
"input");
38 input = pool->get<T>(tag);
39 name = parameters.get<std::string>(
"name", tag.toString());
42 virtual Status
work()
override {
43 LOG(info) << name <<
": " << *input;
63 auto tag = parameters.get<
InputTag>(
"input");
64 input = pool->get<std::vector<T>>(tag);
65 name = parameters.get<std::string>(
"name", tag.toString());
68 virtual Status
work()
override {
69 std::stringstream str;
73 for (
const auto& i: *input) {
75 if (count < input->size())
79 LOG(info) << str.str() <<
"}";
93 .OptionalAttr(
"name:string")
97 .OptionalAttr(
"name:string")
101 .OptionalAttr(
"name:string")
105 .OptionalAttr(
"name:string")
108 REGISTER_MODULE_NAME(
"IntVectorPrinter",
Printer<std::vector<int64_t>>)
110 .OptionalAttr(
"name:string")
112 REGISTER_MODULE_NAME(
"DoubleVectorPrinter",
Printer<std::vector<double>>)
114 .OptionalAttr(
"name:string")
116 REGISTER_MODULE_NAME(
"P4VectorPrinter",
Printer<std::vector<LorentzVector>>)
118 .OptionalAttr(
"name:string")
122 .OptionalAttr(
"name:string")
A module printing the value of an input.
virtual Status work() override
Main function.
Parent class for all the modules.
virtual Status work() override
Main function.
A class encapsulating a lua table.
A class representing a value produced by a module.
Module(PoolPtr pool, const std::string &name)
Constructor.