Belle II Software development
trggdlUnpackerModule.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// $Id$
10//---------------------------------------------------------------
11// Filename : trggdlUnpackerModule.h
12// Section : TRG TRG
13// Owner :
14// Email :
15//---------------------------------------------------------------
16// Description : TRG TRG Unpacker Module
17//---------------------------------------------------------------
18// 1.00 : 2017/07/28 : First version
19//---------------------------------------------------------------
20
21#ifndef TRGGDLUNPACKER_H
22#define TRGGDLUNPACKER_H
23
24#include <string>
25#include <vector>
26
27#include "rawdata/dataobjects/RawTRG.h"
28#include "trg/gdl/dataobjects/TRGGDLUnpackerStore.h"
29
30#include <framework/datastore/StoreArray.h>
31#include <framework/core/Module.h>
32#include <framework/database/DBObjPtr.h>
33#include <mdst/dbobjects/TRGGDLDBBadrun.h>
34#include <trg/gdl/dbobjects/TRGGDLDBUnpacker.h>
35
36namespace Belle2 {
42 namespace GDL {
43
45 enum EGDLTimingType {
46 e_tt_non,
47 e_tt_cdc,
48 e_tt_ecl,
49 e_tt_top,
50 e_tt_psnm,
51 e_tt_rand,
52 e_tt_dphy
53 };
54
55
56
59
60 public:
61
64
67
69 virtual void initialize() override;
70
72 virtual void event() override;
73
75 virtual void terminate() override {}
76
78 virtual void beginRun() override {}
79
81 virtual void endRun() override {}
82
84 std::string version() const;
85
86 virtual void fillTreeGDLDB(int* buf, int evt);
87
88 private:
89
92
95
97
98 //condition database for unpacer
99 DBObjPtr<TRGGDLDBUnpacker> m_dbunpacker;
100 //condition database for badrun
101 DBObjPtr<TRGGDLDBBadrun> m_dbbadrun;
102
103 //variables to store database
104 int LeafBitMap[320];
105 char LeafNames[320][100];
106 int nword_header;
107 int n_clocks;
108 int nBits;
109 int n_leafs;
110 int n_leafsExtra;
111 int conf;
112 int bad_flag;
113 int unpack_flag;
114 std::vector<std::vector<int>> BitMap;
115 std::vector<std::vector<int>> BitMap_extra;
116 int conf_map;
117 int evt_map;
118 int clk_map;
121 };
122 }
124} // end namespace Belle2
125
126#endif // TRGGDLUnpackerModule_H
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
A module of TRG TRG Unpacker.
virtual void endRun() override
Called when run ended.
bool m_pciedata
PCIe40 data or copper data.
virtual void terminate() override
Called when processing ended.
virtual void initialize() override
Initilizes TRGGDLUnpackerModuel.
virtual void event() override
Called event by event.
bool m_trgReadoutBoardSearch
flag to select board search mode
bool m_print_dbmap
flag to dump data base map
virtual void beginRun() override
Called when new run started.
virtual ~TRGGDLUnpackerModule()
Destructor.
std::string version() const
returns version of TRGGDLUnpackerModule.
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.