Belle II Software development
trgtopUnpackerModule.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#ifndef TRGTOPUNPACKER_H
9#define TRGTOPUNPACKER_H
10
11#include <string>
12#include <algorithm>
13
14#include "rawdata/dataobjects/RawTRG.h"
15//#include "trg/top/dataobjects/TRGTOPUnpackerStore.h"
16#include "trg/top/dataobjects/TRGTOPCombinedT0Decision.h"
17
18#include "trg/top/dataobjects/TRGTOPSlotTiming.h"
19
20#include <framework/datastore/StoreArray.h>
21#include <framework/core/Module.h>
22
23#define NUMBER_OF_SLOTS 16
24
25namespace Belle2 {
39
40 public:
41
42 static constexpr double clkTo1ns = 0.5 / 0.508877;
43
48
50 virtual ~TRGTOPUnpackerModule() override;
51
53 virtual void initialize() override;
54
56 virtual void beginRun() override;
57
59 virtual void event() override;
60
62 virtual void endRun() override;
63
65 virtual void terminate() override;
66
68 std::string version() const;
69
71 virtual void readDAQEvent(RawTRG*, int, int);
72
74 virtual void unpackT0Decisions(int*, int);
75
76 protected:
77
78 int m_eventNumber;
85 bool m_reportedAlreadyRun_2;
86
87 bool m_overrideControlBits;
88
89 private:
90
91 // time period of revo strobe in "ns" (assuming the clock of "125MHz")
92 static constexpr int revoToNS = 1280 * 8;
93
94 // StoreArray<TRGTOPUnpackerStore> m_TRGTOPCombinedTimingArray;
95 StoreArray<TRGTOPCombinedT0Decision> m_TRGTOPCombinedT0DecisionArray;
96 StoreArray<TRGTOPSlotTiming> m_TRGTOPSlotTimingArray;
97
98 };
100}
101
102#endif
Base class for Modules.
Definition: Module.h:72
The Raw TOP class Class for RawCOPPER class data taken by TOP Currently, this class is almost same as...
Definition: RawTRG.h:27
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
virtual void readDAQEvent(RawTRG *, int, int)
Read data from TRG DAQ.
bool m_reportedAlreadyRun_1
PCIe40 data or copper data.
bool m_pciedata
N words in raw data.
virtual void initialize() override
Initialize the Module.
virtual void event() override
This method is the core of the module.
virtual void endRun() override
This method is called if the current run ends.
virtual void terminate() override
This method is called at the end of the event processing.
virtual void beginRun() override
Called when entering a new run.
virtual void unpackT0Decisions(int *, int)
Unpacker main function.
TRGTOPUnpackerModule()
Constructor: Sets the description, the properties and the parameters of the module.
int m_trigType
Event number (according to L1/global)
std::string version() const
returns version of TRGGDLUnpackerModule.
Abstract base class for different kinds of events.