Belle II Software development
KLMPackerModule.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/* KLM headers. */
12#include <klm/dataobjects/KLMDigit.h>
13#include <klm/dataobjects/KLMElementNumbers.h>
14#include <klm/dbobjects/KLMElectronicsMap.h>
15
16/* Basf2 headers. */
17#include <framework/core/Module.h>
18#include <framework/database/DBObjPtr.h>
19#include <framework/dataobjects/EventMetaData.h>
20#include <framework/datastore/StoreArray.h>
21#include <framework/datastore/StoreObjPtr.h>
22#include <rawdata/dataobjects/RawKLM.h>
23
24/* C++ headers. */
25#include <cstdint>
26
27namespace Belle2 {
36 class KLMPackerModule : public Module {
37
38 public:
39
44
49
53 void initialize() override;
54
58 void beginRun() override;
59
63 void event() override;
64
68 void endRun() override;
69
73 void terminate() override;
74
75 private:
76
91 void formatData(int flag, int lane, int plane, int strip, int charge, uint16_t ctime, uint16_t tdc,
92 uint16_t& bword1, uint16_t& bword2, uint16_t& bword3, uint16_t& bword4);
93
94 /* Common objects. */
95
98
101
104
107
110
111 };
112
114}
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
KLM element numbers.
StoreArray< KLMDigit > m_Digits
KLM digits.
void initialize() override
Initializer.
void event() override
This method is called for each event.
const KLMElementNumbers * m_ElementNumbers
Element numbers.
void endRun() override
This method is called if the current run ends.
void terminate() override
This method is called at the end of the event processing.
void formatData(int flag, int lane, int plane, int strip, int charge, uint16_t ctime, uint16_t tdc, uint16_t &bword1, uint16_t &bword2, uint16_t &bword3, uint16_t &bword4)
Creation of raw data.
void beginRun() override
Called when entering a new run.
DBObjPtr< KLMElectronicsMap > m_ElectronicsMap
Electronics map.
StoreArray< RawKLM > m_RawKLMs
Raw data.
KLMPackerModule()
Constructor.
StoreObjPtr< EventMetaData > m_EventMetaData
Event meta data.
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.