Belle II Software development
TOPPackerModule.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 <top/geometry/TOPGeometryPar.h>
13#include <top/RawDataTypes.h>
14#include <string>
15
16namespace Belle2 {
25 class TOPPackerModule : public Module {
26
27 public:
28
33
37 virtual ~TOPPackerModule();
38
43 virtual void initialize() override;
44
49 virtual void beginRun() override;
50
54 virtual void event() override;
55
60 virtual void endRun() override;
61
66 virtual void terminate() override;
67
68 private:
69
75
80 void packType0Ver16();
81
86
90 unsigned short sumShorts(unsigned int x) const
91 {
92 return x + (x >> 16);
93 }
94
95 std::string m_inputDigitsName;
97 std::string m_outputRawDataName;
98 std::string m_format;
99 TOP::RawDataType m_dataType = TOP::RawDataType::c_Draft;
103 };
104
106} // Belle2 namespace
107
Base class for Modules.
Definition: Module.h:72
std::string m_format
data format
std::string m_inputDigitsName
name of TOPDigit store array
unsigned short sumShorts(unsigned int x) const
sum both 16-bit words of 32-bit integer
TOP::RawDataType m_dataType
enum for data format
std::string m_outputRawDataName
name of RawTOP store array
std::string m_inputRawDigitsName
name of TOPRawDigit store array
TOP::TOPGeometryPar * m_topgp
geometry
Singleton class for TOP Geometry Parameters.
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
virtual void initialize() override
Initialize the Module.
void packProductionDraft()
Pack in format: c_Draft (tentative production format) this format was never implemented in firmware!
void packProductionDebug()
Pack in format: Production Debugging Data Format 01.
virtual void event() override
Event processor.
virtual ~TOPPackerModule()
Destructor.
virtual void endRun() override
End-of-run action.
virtual void terminate() override
Termination action.
virtual void beginRun() override
Called when entering a new run.
TOPPackerModule()
Constructor.
void packType0Ver16()
Pack in format: c_Type0Ver16 (Feature-extracted data) this format was never implemented in firmware!
Abstract base class for different kinds of events.