Belle II Software development
PruneRecoHitsModule.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/pruneRecoTracks/PruneRecoHitsModule.h>
10#include <framework/datastore/StoreArray.h>
11
12using namespace Belle2;
13
14REG_MODULE(PruneRecoHits);
15
17 Module()
18{
19 setDescription("Prunes RecoHits, which are marked to be pruned.");
21
22}
23
25{
26 StoreArray<RecoHitInformation> recoHitInformation;
27 recoHitInformation.isRequired();
28
29 m_subsetOfUnprunedRecoHitInformation.registerSubset(recoHitInformation, DataStore::c_DontWriteOut);
30}
31
33{
34 m_subsetOfUnprunedRecoHitInformation.select([](const RecoHitInformation * recoHitInformation) {
35 return recoHitInformation->getFlag() != RecoHitInformation::RecoHitFlag::c_pruned;
36 });
37}
38
@ c_DontWriteOut
Object/array should be NOT saved by output modules.
Definition: DataStore.h:71
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
void initialize() override
Declare required StoreArray.
void event() override
Event processing, prunes the RecoTracks contained in each event.
SelectSubset< RecoHitInformation > m_subsetOfUnprunedRecoHitInformation
We use SelectSubset here to delete all pruned RecoHitInformation.
PruneRecoHitsModule()
Constructor of the module. Setting up parameters and description.
This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack.
RecoHitFlag getFlag() const
Get the additional flag.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
Abstract base class for different kinds of events.