10#include <tracking/trackFindingCDC/findlets/base/Findlet.h>
11#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
12#include <tracking/trackFindingCDC/rootification/StoreWrappedObjPtr.h>
14#include <framework/core/ModuleParamList.h>
23 namespace TrackFindingCDC {
29 template<
class IOType,
bool a_alwaysWrite = false>
40 const std::string& classMnemomicName =
"",
41 const std::string& classMnemomicDescription =
"")
65 classMnemomicCapitalName[0] = ::toupper(classMnemomicCapitalName.at(0));
67 if (not a_alwaysWrite) {
68 moduleParamList->
addParameter(prefixed(prefix,
"Write" + classMnemomicCapitalName +
"s"),
71 "s shall be written to the DataStore",
75 moduleParamList->
addParameter(prefixed(prefix, classMnemomicCapitalName +
"sStoreObjName"),
78 "s generated within this module.",
108 if (not storeVector.
isValid()) {
116 void apply(std::vector<IOType>& input)
final
121 std::vector<IOType>& sink = *storeVector;
@ c_DontWriteOut
Object/array should be NOT saved by output modules.
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
The Module parameter list class.
bool isValid() const
Check whether the object was created.
bool construct(Args &&... params)
Construct an object of type T in this StoreObjPtr, using the provided constructor arguments.
void initialize() override
void beginEvent() override
Interface for a minimal algorithm part that wants to expose some parameters to a module.
void apply(std::vector< IOType > &input) final
Swaps the items to the DataStore or to the backup storage location.
std::vector< IOType > m_backup
Backup storage if the vector should not be written to the DataStore.
void initialize() override
Receive signal before the start of the event processing.
std::string getDescription() override
Short description of the findlet.
bool m_param_writeStoreVector
Switch if the store vector should be filled.
std::string m_classMnemomicDescription
Short description for the type of objects to be written out.
Findlet< IOType > Super
Type of the base class.
void beginEvent() override
Receive signal for the start of a new event.
std::string m_classMnemomicName
Short name for the type of objects to be written out.
StoreVectorSwapper(const std::string &storeVectorName, const std::string &classMnemomicName="", const std::string &classMnemomicDescription="")
Constructor taking the default name of the store vector which is the target of the swap.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters to a module.
std::string m_param_storeVectorName
Name of the store vector to be used.
This class is for convenience access and registration of objects, that are stored inside the StoreWra...
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_DontWriteOut|DataStore::c_ErrorIfAlreadyRegistered)
Register the object/array in the DataStore.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.
std::string getClassMnemomicParameterName(const CDCWireHit *dispatchTag)
Returns a short name for class CDCWireHit to be used in names of parameters.
std::string getClassMnemomicParameterDescription(const CDCWireHit *dispatchTag)
Returns a short description for class CDCWireHit to be used in descriptions of parameters.