Belle II Software  release-05-01-25
TRGGDLDBUnpacker.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Benjamin Schwenker *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <TObject.h>
13 
14 namespace Belle2 {
30  class TRGGDLDBUnpacker: public TObject {
31  public:
32 
36 
38  TRGGDLDBUnpacker(const TRGGDLDBUnpacker& b): TObject(b)
39  {
40  m_nLeafs = b.m_nLeafs;
41  m_nLeafsExtra = b.m_nLeafsExtra;
42  m_nClks = b.m_nClks;
43  for (int i = 0; i < 320; i++) {
44  strcpy(m_LeafNames[i], b.m_LeafNames[i]);
45  m_LeafMap[i] = b.m_LeafMap[i];
46  }
47  for (int i = 0; i < 320; i++) {
48  for (int j = 0; j < 2; j++) {
49  m_BitMap[i][j] = b.m_BitMap[i][j];
50  }
51  }
52  for (int i = 0; i < 320; i++) {
53  for (int j = 0; j < 3; j++) {
54  m_BitMap_extra[i][j] = b.m_BitMap_extra[i][j];
55  }
56  }
57  m_nword_header = b.m_nword_header;
58  m_nword_input = b.m_nword_input;
59  m_nword_output = b.m_nword_output;
60  }
63  {
64  m_nLeafs = b.m_nLeafs;
65  m_nLeafsExtra = b.m_nLeafsExtra;
66  m_nClks = b.m_nClks;
67  m_nBits = b.m_nBits;
68  m_conf = b.m_conf;
69  for (int i = 0; i < 320; i++) {
70  strcpy(m_LeafNames[i], b.m_LeafNames[i]);
71  m_LeafMap[i] = b.m_LeafMap[i];
72  }
73  for (int i = 0; i < 320; i++) {
74  for (int j = 0; j < 2; j++) {
75  m_BitMap[i][j] = b.m_BitMap[i][j];
76  }
77  }
78  for (int i = 0; i < 320; i++) {
79  for (int j = 0; j < 3; j++) {
80  m_BitMap_extra[i][j] = b.m_BitMap_extra[i][j];
81  }
82  }
83  m_nword_header = b.m_nword_header;
84  m_nword_input = b.m_nword_input;
85  m_nword_output = b.m_nword_output;
86  return *this;
87  }
88 
89  void setnLeafs(int i)
90  {
91  m_nLeafs = i;
92  }
93  void setnLeafsExtra(int i)
94  {
95  m_nLeafsExtra = i;
96  }
97  void setnClks(int i)
98  {
99  m_nClks = i;
100  }
101  void setnBits(int i)
102  {
103  m_nBits = i;
104  }
105  void setconf(int i)
106  {
107  m_conf = i;
108  }
109  void setLeafName(int i, const char* c)
110  {
111  strcpy(m_LeafNames[i], c);
112  }
113  void setLeafMap(int i, int j)
114  {
115  m_LeafMap[i] = j;
116  }
117  void setBitMap(int i, int j, int k)
118  {
119  m_BitMap[i][j] = k;
120  }
121  void set_nword_header(int i)
122  {
123  m_nword_header = i;
124  }
125  void set_nword_input(int i)
126  {
127  m_nword_input = i;
128  }
129  void set_nword_output(int i)
130  {
131  m_nword_output = i;
132  }
133  void setBitMap_extra(int i, int j, int k)
134  {
135  m_BitMap_extra[i][j] = k;
136  }
137 
138  int getnLeafs() const
139  {
140  return m_nLeafs;
141  }
142  int getnLeafsExtra() const
143  {
144  return m_nLeafsExtra;
145  }
146  int getnClks() const
147  {
148  return m_nClks;
149  }
150  int getnBits() const
151  {
152  return m_nBits;
153  }
154  int getconf() const
155  {
156  return m_conf;
157  }
158  const char* getLeafnames(int i) const
159  {
160  return m_LeafNames[i];
161  }
162  int getLeafMap(int i) const
163  {
164  return m_LeafMap[i];
165  }
166  int getBitMap(int i, int j) const
167  {
168  return m_BitMap[i][j];
169  }
170  int get_nword_header() const
171  {
172  return m_nword_header;
173  }
174  int get_nword_input() const
175  {
176  return m_nword_input;
177  }
178  int get_nword_output() const
179  {
180  return m_nword_output;
181  }
182  int getBitMap_extra(int i, int j) const
183  {
184  return m_BitMap_extra[i][j];
185  }
186 
187 
188 
189  private:
190 
192  int m_nLeafs;
193 
195  int m_nLeafsExtra;
196 
198  int m_nClks;
199 
201  int m_nBits = 0;
202 
204  int m_conf = 0;
205 
207  char m_LeafNames[320][100];
208 
210  int m_LeafMap[320];
211 
213  int m_BitMap[320][2];
214 
216  int m_nword_header;
217 
219  int m_nword_input;
220 
222  int m_nword_output;
223 
225  int m_BitMap_extra[320][3];
226 
227 
229  };
230 
232 } // end of namespace Belle2
Belle2::TRGGDLDBUnpacker::m_LeafMap
int m_LeafMap[320]
leaf map
Definition: TRGGDLDBUnpacker.h:218
Belle2::TRGGDLDBUnpacker::TRGGDLDBUnpacker
TRGGDLDBUnpacker()
Default constructor.
Definition: TRGGDLDBUnpacker.h:42
Belle2::TRGGDLDBUnpacker::m_conf
int m_conf
conf
Definition: TRGGDLDBUnpacker.h:212
Belle2::TRGGDLDBUnpacker
The payload class for PXD cluster charge calibrations.
Definition: TRGGDLDBUnpacker.h:38
Belle2::TRGGDLDBUnpacker::m_nword_input
int m_nword_input
DAM input word size.
Definition: TRGGDLDBUnpacker.h:227
Belle2::TRGGDLDBUnpacker::m_nword_output
int m_nword_output
DAM output word size.
Definition: TRGGDLDBUnpacker.h:230
Belle2::TRGGDLDBUnpacker::operator=
TRGGDLDBUnpacker & operator=(const TRGGDLDBUnpacker &b)
assignment operator
Definition: TRGGDLDBUnpacker.h:70
Belle2::TRGGDLDBUnpacker::m_BitMap
int m_BitMap[320][2]
data bit map
Definition: TRGGDLDBUnpacker.h:221
Belle2::TRGGDLDBUnpacker::m_nLeafs
int m_nLeafs
num of leafs in data_b2l
Definition: TRGGDLDBUnpacker.h:200
Belle2::TRGGDLDBUnpacker::m_nword_header
int m_nword_header
header size
Definition: TRGGDLDBUnpacker.h:224
Belle2::TRGGDLDBUnpacker::m_nBits
int m_nBits
num of Bit
Definition: TRGGDLDBUnpacker.h:209
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TRGGDLDBUnpacker::m_nClks
int m_nClks
num of clk time window
Definition: TRGGDLDBUnpacker.h:206
Belle2::TRGGDLDBUnpacker::m_nLeafsExtra
int m_nLeafsExtra
num of leafs for others
Definition: TRGGDLDBUnpacker.h:203
Belle2::TRGGDLDBUnpacker::m_LeafNames
char m_LeafNames[320][100]
leaf names
Definition: TRGGDLDBUnpacker.h:215
Belle2::TRGGDLDBUnpacker::ClassDef
ClassDef(TRGGDLDBUnpacker, 1)
ClassDef, must be the last term before the closing {}.
Belle2::TRGGDLDBUnpacker::m_BitMap_extra
int m_BitMap_extra[320][3]
extra leaf bit map
Definition: TRGGDLDBUnpacker.h:233