Belle II Software  release-08-01-10
PruneGenfitTracksModule.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <tracking/modules/pruneGenfitTracks/PruneGenfitTracksModule.h>
10 #include <framework/datastore/StoreArray.h>
11 #include <genfit/Track.h>
12 
13 using namespace Belle2;
14 
15 REG_MODULE(PruneGenfitTracks);
16 
18  Module()
19 {
20  setDescription("Prunes genfit tracks");
22 
23  addParam("pruneFlags", m_pruneFlags,
24  "Pruning options passed on to genfit. See genfit::Track class for a detailed description",
25  std::string("FL"));
26 
27  addParam("storeArrayName", m_storeArrayName,
28  "Name of the StoreArray which is pruned",
29  std::string("GF2Tracks"));
30 
31 }
32 
34 {
36  for (auto& t : tracks) {
37  t.prune(m_pruneFlags.c_str());
38  }
39 }
40 
Base class for Modules.
Definition: Module.h:72
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
PruneGenfitTracksModule()
Constructor of the module. Setting up parameters and description.
void event() override
Event processing, prunes the genfit tracks contained in each event.
std::string m_storeArrayName
name of the StoreArray to prune
std::string m_pruneFlags
flags used for pruning, See genfit::Track class for possible settings
REG_MODULE(arichBtest)
Register the Module.
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
Abstract base class for different kinds of events.