Belle II Software  release-06-02-00
PXDdigiFilterModule.h
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 #pragma once
10 
11 #include <framework/core/Module.h>
12 #include <framework/datastore/SelectSubset.h>
13 #include <pxd/dataobjects/PXDDigit.h>
14 #include <framework/database/DBObjPtr.h>
15 #include <simulation/dbobjects/ROIParameters.h>
16 
17 namespace Belle2 {
31  class PXDdigiFilterModule : public Module {
32 
33  public:
34 
39 
40  private:
41 
45  void initialize() override final;
46 
50  void beginRun() override final;
51 
55  void event() override final;
56 
58  void filterDigits();
59 
61  void copyDigits();
62 
63 
64  bool m_CreateOutside = false;
65  std::string m_PXDDigitsName;
68  std::string m_ROIidsName;
69  bool m_overrideDB = false;
70  bool m_usePXDDataReduction = false;
73  int m_countNthEvent = 0;
75  int m_skipEveryNth = -1;
80  };
82 }
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Base class for Modules.
Definition: Module.h:72
The module produce a StoreArray of PXDDigit inside the ROIs.
void initialize() override final
Initializer.
bool m_overrideDB
if set, overwrites ROI-finding settings in DB
SelectSubset< PXDDigit > m_selectorIN
selector of the subset of PXDDigits contained in the ROIs
int m_countNthEvent
Event counter to be able to disable data reduction for every Nth event.
int m_skipEveryNth
Parameter from DB for how many events to skip data reduction.
void copyDigits()
all the actual work is done here
DBObjPtr< ROIParameters > m_roiParameters
Configuration parameters for ROIs.
SelectSubset< PXDDigit > m_selectorOUT
selector of the subset of PXDDigits NOT contained in the ROIs
bool m_usePXDDataReduction
enables/disables ROI-finding if overwriteDB=True
void event() override final
This method is called for each event.
std::string m_PXDDigitsOutsideROIName
The name of the StoreArray of Filtered PXDDigits.
std::string m_ROIidsName
The name of the StoreArray of ROIs.
void beginRun() override final
Called when entering a new run.
std::string m_PXDDigitsName
The name of the StoreArray of PXDDigits to be filtered.
void filterDigits()
all the actual work is done here
PXDdigiFilterModule()
Constructor: Sets the description, the properties and the parameters of the module.
bool m_CreateOutside
if set, create list of outside pixels, too
std::string m_PXDDigitsInsideROIName
The name of the StoreArray of Filtered PXDDigits.
Class to create a subset of a given StoreArray together with the relations with other StoreArrays.
Definition: SelectSubset.h:193
Abstract base class for different kinds of events.