Belle II Software  release-06-00-14
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 
43  void initialize() override final;
44 
46  void beginRun() override final;
47 
49  void event() override final;
50 
52  void filterDigits();
53 
55  void copyDigits();
56 
57 
58  bool m_CreateOutside = false;
59  std::string m_PXDDigitsName;
62  std::string m_ROIidsName;
63  bool m_overrideDB = false;
64  bool m_usePXDDataReduction = false;
67  int m_countNthEvent = 0;
69  int m_skipEveryNth = -1;
74  };
76 }
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
Initialize the Module.
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 the core of the module.
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.