Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
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
int
setIdentifier
(
const
int
newid);
70
71
// getting decoded values
72
int
iValue
(
const
int
);
73
int
iValue
(
const
int
,
const
char
*);
74
int
iValue
(
const
int
,
const
int
);
75
int
iValue
(
const
int
,
const
int
,
const
char
*){
return
0;};
76
int
iValue
(
const
int
channel
,
const
int
iy,
const
int
iz) {
return
0;};
77
int
iValue
(
const
int
channel
,
const
int
iy,
const
int
iz,
const
char
*what) {
return
0;};
78
79
float
rValue
(
const
int
);
80
float
rValue
(
const
int
,
const
char
*);
81
float
rValue
(
const
int
,
const
int
);
82
83
int
getArraylength
(
const
char
*);
84
int
fillIntArray
(
int
[],
const
int
,
int
*,
const
char
* what=
""
);
85
int
fillFloatArray
(
float
[],
const
int
,
int
*,
const
char
* what=
""
);
86
int
*
getIntArray
(
int
*,
const
char
* what=
""
);
87
float
*
getFloatArray
(
int
*,
const
char
*what=
""
);
88
89
// pointer or data based handling
90
virtual
int
is_pointer_type
()
const
;
91
virtual
int
convert
();
92
93
int
getCheckSumStatus
()
const
;
94
95
int
copyMe
(
int
dest
[],
const
int
maxlength)
const
;
96
97
int
setInternalParameter
(
const
int
p1=0,
const
int
p2=0,
const
char
*what =
""
) {
return
0;};
98
99
protected
:
100
101
// PACKETHDR_ptr packetHdr;
102
103
int
standardIntArray
(
int
[],
const
int
,
int
*,
const
char
* what=
""
);
104
105
PACKET_ptr
packet
;
// storage for the packet
106
107
108
int
is_data_type
;
// 0 is pointer based -- 1 is data based
109
110
int
data1_length
;
111
int
data2_length
;
112
int
data3_length
;
113
int
data4_length
;
114
int
data5_length
;
115
int
data6_length
;
116
int
data7_length
;
117
int
data8_length
;
118
int
data9_length
;
119
int
data10_length
;
120
121
int
*
decoded_data1
;
122
int
*
decoded_data2
;
123
int
*
decoded_data3
;
124
int
*
decoded_data4
;
125
int
*
decoded_data5
;
126
int
*
decoded_data6
;
127
int
*
decoded_data7
;
128
int
*
decoded_data8
;
129
int
*
decoded_data9
;
130
int
*
decoded_data10
;
131
132
virtual
int
*
decode
(
int
*) =0;
133
134
#ifdef LVL2_WINNT
135
static
void
fix_endianess
( LONGLONG *
x
);
136
#else
137
static
void
fix_endianess
(
long
long
*
x
);
138
#endif
139
140
static
void
fix_endianess
(
double
*
x
);
141
static
void
fix_endianess
(
char
*
str
,
const
int
length
);
142
143
};
144
145
146
147
struct
cdevIrData
148
{
149
char
m_irState
[256];
150
double
m_tripletTrimCurrents
[12];
151
double
m_irVacuum
;
152
double
m_estBeamSizeYellowVert
;
153
double
m_estBeamSizeYellowHorz
;
154
double
m_estBeamSizeBlueVert
;
155
double
m_estBeamSizeBlueHorz
;
156
double
m_estimatedLuminosity
;
157
double
m_betaStarYellowHorz
;
158
double
m_betaStarBlueHorz
;
159
double
m_betaStarYellowVert
;
160
double
m_betaStarBlueVert
;
161
double
m_polarPerBunchYellowX
[360];
162
double
m_polarPerBunchYellowY
[360];
163
double
m_polarPerBunchYellowZ
[360];
164
double
m_polarPerBunchBlueX
[360];
165
double
m_polarPerBunchBlueY
[360];
166
double
m_polarPerBunchBlueZ
[360];
167
int
m_avgOrbitDXBpmYellowHorzOdd
;
168
int
m_avgOrbitDXBpmYellowHorzEven
;
169
int
m_avgOrbitDXBpmYellowVertOdd
;
170
int
m_avgOrbitDXBpmYellowVertEven
;
171
int
m_avgOrbitDXBpmBlueHorzOdd
;
172
int
m_avgOrbitDXBpmBlueHorzEven
;
173
int
m_avgOrbitDXBpmBlueVertOdd
;
174
int
m_avgOrbitDXBpmBlueVertEven
;
175
int
m_experimentVertexX
[100];
176
int
m_experimentVertexY
[100];
177
int
m_experimentVertexZ
[100];
178
int
m_vertexStartTime
;
179
int
m_vertexEndTime
;
180
unsigned
int
m_datavalidMask
;
181
182
};
183
184
struct
cdevRingData
185
{
186
187
char
m_ringState
[256];
// ejd91801
188
char
m_ionSpecies
[1024] ;
189
double
m_beamEnergy
;
190
double
m_gamma
;
191
int
m_stoneType
;
192
double
m_momentumSpread
;
193
double
m_bunchLength
;
194
int
m_intendedFillPattern
[360];
195
int
m_measuredFillPattern
[360];
196
double
m_bunchOneRelativePhase
;
197
double
m_synchrotronTune
;
198
double
m_chromaticityVertical
;
199
double
m_chromaticityHorizontal
;
200
int
m_polarizationFillPattern
[360];
201
int
m_timeOfFillStart
;
202
int
m_timeOfLuminosityStart
;
203
double
m_emittanceVertical
;
204
double
m_emittanceHorizontal
;
205
double
m_betaIPMHorizontal
;
206
double
m_betaIPMVertical
;
207
int
m_measuredPolarizationUp
[360];
208
int
m_measuredPolarizationDown
[360];
209
int
m_fillNumber
;
210
unsigned
int
m_datavalidMask
;
// bit mask for data validity
211
212
};
213
214
215
216
struct
cdevRingNoPolData
217
{
218
219
char
m_ringState
[256];
// ejd91801
220
char
m_ionSpecies
[1024] ;
221
double
m_beamEnergy
;
222
double
m_gamma
;
223
int
m_stoneType
;
224
double
m_momentumSpread
;
225
double
m_synchrotronTune
;
226
double
m_chromaticityVertical
;
227
double
m_chromaticityHorizontal
;
228
int
m_timeOfFillStart
;
229
int
m_timeOfLuminosityStart
;
230
double
m_emittanceVertical
;
231
double
m_emittanceHorizontal
;
232
double
m_betaIPMHorizontal
;
233
double
m_betaIPMVertical
;
234
int
m_fillNumber
;
235
unsigned
int
m_datavalidMask
;
// bit mask for data validity
236
237
};
238
239
struct
cdevBucketsData
240
{
241
double
m_bunchLength
;
242
double
m_bunchOneRelativePhase
;
243
double
m_fillPatternThreshold
;
244
int
m_intendedFillPattern
[360];
245
int
m_measuredFillPattern
[360];
246
int
m_polarizationFillPattern
[360];
247
unsigned
int
m_datavalidMask
;
// bit mask for data validity
248
};
249
250
struct
cdevRingPolData
251
{
252
char
m_ringState
[256];
// ejd91801
253
char
m_ionSpecies
[1024] ;
254
double
m_beamEnergy
;
255
double
m_gamma
;
256
int
m_stoneType
;
257
double
m_momentumSpread
;
258
double
m_bunchLength
;
259
int
m_intendedFillPattern
[360];
260
int
m_measuredFillPattern
[360];
261
double
m_bunchOneRelativePhase
;
262
double
m_synchrotronTune
;
263
double
m_chromaticityVertical
;
264
double
m_chromaticityHorizontal
;
265
int
m_polarizationFillPattern
[360];
266
int
m_timeOfFillStart
;
267
int
m_timeOfLuminosityStart
;
268
double
m_emittanceVertical
;
269
double
m_emittanceHorizontal
;
270
double
m_betaIPMHorizontal
;
271
double
m_betaIPMVertical
;
272
int
m_measuredPolarizationUp
[360];
273
int
m_measuredPolarization
[360];
274
unsigned
int
m_datavalidMask
;
// bit mask for data validity
275
};
276
277
struct
cdevWCMData
278
{
279
int
cdevCaptureTimeStamp
;
280
//int dummy; //?
281
double
beamcurrent
;
282
float
bunchcurrent
[360];
283
284
};
285
286
struct
cdevDvmData
287
{
288
double
beamCurrent
;
289
double
beamLifeTime
;
290
};
291
292
struct
cdevBPMData
293
{
294
long
avgOrbTimeStamp
;
295
float
avgOrbPosition
;
296
float
avgOrbVariance
;
297
float
avgOrbStat
;
298
long
datavalidMask
;
299
};
300
301
struct
cdevMadchData
302
{
303
int
cdevCaptureTimeStamp
;
//ejd 4/30/03 long to int
304
double
current
;
305
};
306
307
struct
cdevWCMHistory
308
{
309
int
counts
;
310
struct
cdevWCMData
reading
[1];
311
312
};
313
314
struct
cdevSISData
315
{
316
317
int
countRate
;
318
int
totalCount
;
319
320
};
321
322
struct
cdevPolTargetData
323
{
324
int
positionEncLinear
;
325
int
positionEncRot
;
326
};
327
328
struct
cdevPolarimeterData
329
{
330
331
int
m_cdevCaptureTimeStamp
;
332
double
runIdS
;
// FILL.XXX --- where XXX is the run number
333
int
startTimeS
;
// Unix time
334
int
stopTimeS
;
// Unix time
335
char
daqVersionS
[80];
336
char
cutIdS
[80];
337
char
targetIdS
[80];
// "Horz.tagret3" or "Vert.target6" etc.
338
int
encoderPositionS
[2];
339
int
statusS
;
// bit pattern if <0 data is not usable
340
char
statusStringS
[80];
341
int
totalCountsS
;
342
int
upCountsS
;
343
int
downCountsS
;
344
int
unpolCountsS
;
345
int
countsUpLeftS
[360];
346
int
countsLeftS
[360];
347
int
countsDownLeftS
[360];
348
int
countsDownRightS
[360];
349
int
countsRightS
[360];
350
int
countsUpRightS
[360];
351
float
avgAsymXS
;
352
float
avgAsymX45S
;
353
float
avgAsymX90S
;
354
float
avgAsymYS
;
355
float
avgAsymErrorXS
;
356
float
avgAsymErrorX45S
;
357
float
avgAsymErrorX90S
;
358
float
avgAsymErrorYS
;
359
float
bunchAsymXS
[360];
360
float
bunchAsymYS
[360];
361
float
bunchAsymErrorXS
[360];
362
float
bunchAsymErrorYS
[360];
363
float
beamEnergyS
;
// the same as ringSpec.color:beamEnergyM just for reference
364
float
analyzingPowerS
;
365
float
analyzingPowerErrorS
;
366
int
numberEventsS
;
// provided by MCR before measurement
367
int
maxTimeS
;
368
float
polarizationM
;
369
};
370
371
372
373
struct
cdevPolarimeterZData
374
{
375
376
int
m_cdevCaptureTimeStamp
;
377
double
runIdS
;
// FILL.XXX --- where XXX is the run number
378
int
startTimeS
;
// Unix time
379
int
stopTimeS
;
// Unix time
380
char
daqVersionS
[80];
381
char
cutIdS
[80];
382
char
targetIdS
[80];
// "Horz.tagret3" or "Vert.target6" etc.
383
int
encoderPositionS
[2];
384
int
statusS
;
// bit pattern if <0 data is not usable
385
char
statusStringS
[80];
386
int
totalCountsS
;
387
int
upCountsS
;
388
int
downCountsS
;
389
int
unpolCountsS
;
390
int
countsUpLeftS
[360];
391
int
countsLeftS
[360];
392
int
countsDownLeftS
[360];
393
int
countsDownRightS
[360];
394
int
countsRightS
[360];
395
int
countsUpRightS
[360];
396
float
avgAsymXS
;
397
float
avgAsymX45S
;
398
float
avgAsymX90S
;
399
float
avgAsymYS
;
400
float
avgAsymErrorXS
;
401
float
avgAsymErrorX45S
;
402
float
avgAsymErrorX90S
;
403
float
avgAsymErrorYS
;
404
float
bunchAsymXS
[360];
405
float
bunchAsymYS
[360];
406
float
bunchAsymErrorXS
[360];
407
float
bunchAsymErrorYS
[360];
408
float
beamEnergyS
;
// the same as ringSpec.color:beamEnergyM just for reference
409
float
analyzingPowerS
;
410
float
analyzingPowerErrorS
;
411
int
numberEventsS
;
// provided by MCR before measurement
412
int
maxTimeS
;
413
float
polarizationM
;
414
};
415
#endif
/* __PACKET_A_H__ */
416
417
online_distribution
blob
master
newbasic
packet_A.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:27
using
1.8.2 with
sPHENIX GitHub integration