ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
packet_A.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file packet_A.h
1
#ifndef __PACKET_A_H__
2
#define __PACKET_A_H__
3
4
5
#include "
packet.h
"
6
#include "
packetPublic.h
"
7
#include "
packetConstants.h
"
8
#include "
packetRoutines.h
"
9
#include "
decoding_routines.h
"
10
11
const
char
*
get_mnemonic
(
const
int
structure,
const
int
format);
12
const
char
*
get_type_mnemonic
(
const
int
id
);
13
20
#ifndef __CINT__
21
class
WINDOWSEXPORT
Packet_A
:
public
Packet
22
#else
23
class
Packet_A
:
public
Packet
24
#endif
25
{
26
27
public
:
28
29
Packet_A
(
PACKET_ptr
packet_ptr);
30
Packet_A
();
31
~Packet_A
();
32
33
// access to envelope information
34
int
getLength
()
const
;
35
// int getType() const;
36
// int getDecoding() const;
37
38
// some more header fields which are not yet implemented, marked "//*"
39
//* int gethdrVersion() const; // Version of header definition
40
//* int getHdrLength() const; // inclusive of alignment data
41
//* int getStatus() const; // Status bits describe frame errors/other
42
int
getErrorLength
()
const
;
// Length of error block in Dwords
43
int
getDebugLength
()
const
;
// Length of debug block in Dwords
44
45
int
getIdentifier
()
const
;
// Identifier
46
//* int getEndianism() const; // Big/little endian indicator
47
int
getPadding
()
const
;
// number of padding units
48
49
int
getStructure
()
const
;
// Structure of packet
50
//* int getWordSize() const; // "Word" size used to store packet data
51
//* int getAddrLength() const; // number of bytes used for channel address
52
//* int getHitLength() const; // Length of a single "hit" in bytes
53
54
int
getHitFormat
()
const
;
// Format of a single hit
55
//* int getNumEntries() const; // Number of "objects" stored in packet
56
57
int
getDataLength
()
const
;
// Format of a single hit
58
59
60
// debugging-type information
61
62
63
void
identify
(
OSTREAM
& =
COUT
)
const
;
64
void
fullIdentify
(
OSTREAM
& =
COUT
)
const
;
65
66
void
dumpErrorBlock
(
OSTREAM
& =
COUT
) ;
67
void
dumpDebugBlock
(
OSTREAM
& =
COUT
) ;
68
69
70
// getting decoded values
71
int
iValue
(
const
int
);
72
int
iValue
(
const
int
,
const
char
*);
73
int
iValue
(
const
int
,
const
int
);
74
int
iValue
(
const
int
,
const
int
,
const
char
*){
return
0;};
75
int
iValue
(
const
int
channel,
const
int
iy,
const
int
iz) {
return
0;};
76
int
iValue
(
const
int
channel,
const
int
iy,
const
int
iz,
const
char
*what) {
return
0;};
77
78
float
rValue
(
const
int
);
79
float
rValue
(
const
int
,
const
char
*);
80
float
rValue
(
const
int
,
const
int
);
81
82
int
getArraylength
(
const
char
*);
83
int
fillIntArray
(
int
[],
const
int
,
int
*,
const
char
* what=
""
);
84
int
fillFloatArray
(
float
[],
const
int
,
int
*,
const
char
* what=
""
);
85
int
*
getIntArray
(
int
*,
const
char
* what=
""
);
86
float
*
getFloatArray
(
int
*,
const
char
*what=
""
);
87
88
// pointer or data based handling
89
virtual
int
is_pointer_type
()
const
;
90
virtual
int
convert
();
91
92
int
getCheckSumStatus
()
const
;
93
94
int
copyMe
(
int
dest [],
const
int
maxlength)
const
;
95
96
int
setInternalParameter
(
const
int
p1=0,
const
int
p2=0,
const
char
*what =
""
) {
return
0;};
97
98
protected
:
99
100
// PACKETHDR_ptr packetHdr;
101
102
int
standardIntArray
(
int
[],
const
int
,
int
*,
const
char
* what=
""
);
103
104
PACKET_ptr
packet
;
// storage for the packet
105
106
107
int
is_data_type
;
// 0 is pointer based -- 1 is data based
108
109
int
data1_length
;
110
int
data2_length
;
111
int
data3_length
;
112
int
data4_length
;
113
int
data5_length
;
114
int
data6_length
;
115
int
data7_length
;
116
int
data8_length
;
117
int
data9_length
;
118
int
data10_length
;
119
120
int
*
decoded_data1
;
121
int
*
decoded_data2
;
122
int
*
decoded_data3
;
123
int
*
decoded_data4
;
124
int
*
decoded_data5
;
125
int
*
decoded_data6
;
126
int
*
decoded_data7
;
127
int
*
decoded_data8
;
128
int
*
decoded_data9
;
129
int
*
decoded_data10
;
130
131
virtual
int
*
decode
(
int
*) =0;
132
133
#ifdef LVL2_WINNT
134
static
void
fix_endianess
( LONGLONG *
x
);
135
#else
136
static
void
fix_endianess
(
long
long
*
x
);
137
#endif
138
139
static
void
fix_endianess
(
double
*
x
);
140
static
void
fix_endianess
(
char
*str,
const
int
length
);
141
142
};
143
144
145
146
struct
cdevIrData
147
{
148
char
m_irState
[256];
149
double
m_tripletTrimCurrents
[12];
150
double
m_irVacuum
;
151
double
m_estBeamSizeYellowVert
;
152
double
m_estBeamSizeYellowHorz
;
153
double
m_estBeamSizeBlueVert
;
154
double
m_estBeamSizeBlueHorz
;
155
double
m_estimatedLuminosity
;
156
double
m_betaStarYellowHorz
;
157
double
m_betaStarBlueHorz
;
158
double
m_betaStarYellowVert
;
159
double
m_betaStarBlueVert
;
160
double
m_polarPerBunchYellowX
[360];
161
double
m_polarPerBunchYellowY
[360];
162
double
m_polarPerBunchYellowZ
[360];
163
double
m_polarPerBunchBlueX
[360];
164
double
m_polarPerBunchBlueY
[360];
165
double
m_polarPerBunchBlueZ
[360];
166
int
m_avgOrbitDXBpmYellowHorzOdd
;
167
int
m_avgOrbitDXBpmYellowHorzEven
;
168
int
m_avgOrbitDXBpmYellowVertOdd
;
169
int
m_avgOrbitDXBpmYellowVertEven
;
170
int
m_avgOrbitDXBpmBlueHorzOdd
;
171
int
m_avgOrbitDXBpmBlueHorzEven
;
172
int
m_avgOrbitDXBpmBlueVertOdd
;
173
int
m_avgOrbitDXBpmBlueVertEven
;
174
int
m_experimentVertexX
[100];
175
int
m_experimentVertexY
[100];
176
int
m_experimentVertexZ
[100];
177
int
m_vertexStartTime
;
178
int
m_vertexEndTime
;
179
unsigned
int
m_datavalidMask
;
180
181
};
182
183
struct
cdevRingData
184
{
185
186
char
m_ringState
[256];
// ejd91801
187
char
m_ionSpecies
[1024] ;
188
double
m_beamEnergy
;
189
double
m_gamma
;
190
int
m_stoneType
;
191
double
m_momentumSpread
;
192
double
m_bunchLength
;
193
int
m_intendedFillPattern
[360];
194
int
m_measuredFillPattern
[360];
195
double
m_bunchOneRelativePhase
;
196
double
m_synchrotronTune
;
197
double
m_chromaticityVertical
;
198
double
m_chromaticityHorizontal
;
199
int
m_polarizationFillPattern
[360];
200
int
m_timeOfFillStart
;
201
int
m_timeOfLuminosityStart
;
202
double
m_emittanceVertical
;
203
double
m_emittanceHorizontal
;
204
double
m_betaIPMHorizontal
;
205
double
m_betaIPMVertical
;
206
int
m_measuredPolarizationUp
[360];
207
int
m_measuredPolarizationDown
[360];
208
int
m_fillNumber
;
209
unsigned
int
m_datavalidMask
;
// bit mask for data validity
210
211
};
212
213
214
215
struct
cdevRingNoPolData
216
{
217
218
char
m_ringState
[256];
// ejd91801
219
char
m_ionSpecies
[1024] ;
220
double
m_beamEnergy
;
221
double
m_gamma
;
222
int
m_stoneType
;
223
double
m_momentumSpread
;
224
double
m_synchrotronTune
;
225
double
m_chromaticityVertical
;
226
double
m_chromaticityHorizontal
;
227
int
m_timeOfFillStart
;
228
int
m_timeOfLuminosityStart
;
229
double
m_emittanceVertical
;
230
double
m_emittanceHorizontal
;
231
double
m_betaIPMHorizontal
;
232
double
m_betaIPMVertical
;
233
int
m_fillNumber
;
234
unsigned
int
m_datavalidMask
;
// bit mask for data validity
235
236
};
237
238
struct
cdevBucketsData
239
{
240
double
m_bunchLength
;
241
double
m_bunchOneRelativePhase
;
242
double
m_fillPatternThreshold
;
243
int
m_intendedFillPattern
[360];
244
int
m_measuredFillPattern
[360];
245
int
m_polarizationFillPattern
[360];
246
unsigned
int
m_datavalidMask
;
// bit mask for data validity
247
};
248
249
struct
cdevRingPolData
250
{
251
char
m_ringState
[256];
// ejd91801
252
char
m_ionSpecies
[1024] ;
253
double
m_beamEnergy
;
254
double
m_gamma
;
255
int
m_stoneType
;
256
double
m_momentumSpread
;
257
double
m_bunchLength
;
258
int
m_intendedFillPattern
[360];
259
int
m_measuredFillPattern
[360];
260
double
m_bunchOneRelativePhase
;
261
double
m_synchrotronTune
;
262
double
m_chromaticityVertical
;
263
double
m_chromaticityHorizontal
;
264
int
m_polarizationFillPattern
[360];
265
int
m_timeOfFillStart
;
266
int
m_timeOfLuminosityStart
;
267
double
m_emittanceVertical
;
268
double
m_emittanceHorizontal
;
269
double
m_betaIPMHorizontal
;
270
double
m_betaIPMVertical
;
271
int
m_measuredPolarizationUp
[360];
272
int
m_measuredPolarization
[360];
273
unsigned
int
m_datavalidMask
;
// bit mask for data validity
274
};
275
276
struct
cdevWCMData
277
{
278
int
cdevCaptureTimeStamp
;
279
//int dummy; //?
280
double
beamcurrent
;
281
float
bunchcurrent
[360];
282
283
};
284
285
struct
cdevDvmData
286
{
287
double
beamCurrent
;
288
double
beamLifeTime
;
289
};
290
291
struct
cdevBPMData
292
{
293
long
avgOrbTimeStamp
;
294
float
avgOrbPosition
;
295
float
avgOrbVariance
;
296
float
avgOrbStat
;
297
long
datavalidMask
;
298
};
299
300
struct
cdevMadchData
301
{
302
int
cdevCaptureTimeStamp
;
//ejd 4/30/03 long to int
303
double
current
;
304
};
305
306
struct
cdevWCMHistory
307
{
308
int
counts
;
309
struct
cdevWCMData
reading
[1];
310
311
};
312
313
struct
cdevSISData
314
{
315
316
int
countRate
;
317
int
totalCount
;
318
319
};
320
321
struct
cdevPolTargetData
322
{
323
int
positionEncLinear
;
324
int
positionEncRot
;
325
};
326
327
struct
cdevPolarimeterData
328
{
329
330
int
m_cdevCaptureTimeStamp
;
331
double
runIdS
;
// FILL.XXX --- where XXX is the run number
332
int
startTimeS
;
// Unix time
333
int
stopTimeS
;
// Unix time
334
char
daqVersionS
[80];
335
char
cutIdS
[80];
336
char
targetIdS
[80];
// "Horz.tagret3" or "Vert.target6" etc.
337
int
encoderPositionS
[2];
338
int
statusS
;
// bit pattern if <0 data is not usable
339
char
statusStringS
[80];
340
int
totalCountsS
;
341
int
upCountsS
;
342
int
downCountsS
;
343
int
unpolCountsS
;
344
int
countsUpLeftS
[360];
345
int
countsLeftS
[360];
346
int
countsDownLeftS
[360];
347
int
countsDownRightS
[360];
348
int
countsRightS
[360];
349
int
countsUpRightS
[360];
350
float
avgAsymXS
;
351
float
avgAsymX45S
;
352
float
avgAsymX90S
;
353
float
avgAsymYS
;
354
float
avgAsymErrorXS
;
355
float
avgAsymErrorX45S
;
356
float
avgAsymErrorX90S
;
357
float
avgAsymErrorYS
;
358
float
bunchAsymXS
[360];
359
float
bunchAsymYS
[360];
360
float
bunchAsymErrorXS
[360];
361
float
bunchAsymErrorYS
[360];
362
float
beamEnergyS
;
// the same as ringSpec.color:beamEnergyM just for reference
363
float
analyzingPowerS
;
364
float
analyzingPowerErrorS
;
365
int
numberEventsS
;
// provided by MCR before measurement
366
int
maxTimeS
;
367
float
polarizationM
;
368
};
369
370
371
372
struct
cdevPolarimeterZData
373
{
374
375
int
m_cdevCaptureTimeStamp
;
376
double
runIdS
;
// FILL.XXX --- where XXX is the run number
377
int
startTimeS
;
// Unix time
378
int
stopTimeS
;
// Unix time
379
char
daqVersionS
[80];
380
char
cutIdS
[80];
381
char
targetIdS
[80];
// "Horz.tagret3" or "Vert.target6" etc.
382
int
encoderPositionS
[2];
383
int
statusS
;
// bit pattern if <0 data is not usable
384
char
statusStringS
[80];
385
int
totalCountsS
;
386
int
upCountsS
;
387
int
downCountsS
;
388
int
unpolCountsS
;
389
int
countsUpLeftS
[360];
390
int
countsLeftS
[360];
391
int
countsDownLeftS
[360];
392
int
countsDownRightS
[360];
393
int
countsRightS
[360];
394
int
countsUpRightS
[360];
395
float
avgAsymXS
;
396
float
avgAsymX45S
;
397
float
avgAsymX90S
;
398
float
avgAsymYS
;
399
float
avgAsymErrorXS
;
400
float
avgAsymErrorX45S
;
401
float
avgAsymErrorX90S
;
402
float
avgAsymErrorYS
;
403
float
bunchAsymXS
[360];
404
float
bunchAsymYS
[360];
405
float
bunchAsymErrorXS
[360];
406
float
bunchAsymErrorYS
[360];
407
float
beamEnergyS
;
// the same as ringSpec.color:beamEnergyM just for reference
408
float
analyzingPowerS
;
409
float
analyzingPowerErrorS
;
410
int
numberEventsS
;
// provided by MCR before measurement
411
int
maxTimeS
;
412
float
polarizationM
;
413
};
414
#endif
/* __PACKET_A_H__ */
415
416
online_distribution
blob
master
newbasic
packet_A.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:59
using
1.8.2 with
ECCE GitHub integration