 |
Belle II Software
release-05-02-19
|
12 #include <tracking/trackFindingCDC/findlets/base/Findlet.h>
14 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
16 #include <framework/core/ModuleParamList.h>
17 #include <framework/datastore/StoreArray.h>
26 namespace TrackFindingCDC {
33 template <
class IOType>
34 class StoreArrayLoader :
public Findlet<IOType*> {
37 using Super = Findlet<IOType*>;
42 const std::string& classMnemomicName =
"",
43 const std::string& classMnemomicDescription =
"")
64 void exposeParameters(ModuleParamList* moduleParamList,
const std::string& prefix)
override
67 classMnemomicCapitalName[0] = ::toupper(classMnemomicCapitalName.at(0));
69 moduleParamList->addParameter(prefixed(prefix, classMnemomicCapitalName +
"sStoreArrayName"),
86 storeArray.isRequired();
90 void apply(std::vector<IOType*>& output)
final {
94 output.reserve(output.size() + storeArray.
getEntries());
96 for (
auto& item : storeArray)
99 output.push_back(&item);
Findlet< IOType * > Super
Type of the base class.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters to a module.
std::string m_param_storeArrayName
Name of the store vector to be used.
void initialize() override
Receive signal before the start of the event processing.
void apply(std::vector< IOType * > &output) final
Loads the items from the DataStore.
void initialize() override
Receive and dispatch signal before the start of the event processing.
std::string getClassMnemomicParameterDescription(const RecoTrack *dispatchTag __attribute__((unused)))
Returns a short description for class RecoTrack to be used in descriptions of parameters.
Abstract base class for different kinds of events.
std::string m_classMnemomicDescription
Short description for the type of objects to be written out.
Accessor to arrays stored in the data store.
std::string m_classMnemomicName
Short name for the type of objects to be written out.
StoreArrayLoader(const std::string &storeArrayName="", const std::string &classMnemomicName="", const std::string &classMnemomicDescription="")
Constructor taking the default name of the store vector which is the source for the import.
std::string getClassMnemomicParameterName(const RecoTrack *dispatchTag __attribute__((unused)))
Returns a short name for class RecoTrack to be used in names of parameters.
int getEntries() const
Get the number of objects in the array.
std::string getDescription() override
Short description of the findlet.