StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StDaqLib
TRG
trgStructures2009.h
1
#ifndef trgStructures2009_h
2
#define trgStructures2009_h
3
/******
4
*
5
* Layout of new Trigger Data Block
6
*
7
* J.M. Nelson November 2008
8
*
9
* Notes: This is illustrative only since the definition of the
10
* Event Descriptor will change once the new TCU has been commissioned.
11
* Similarly, the data from Level 1 (L1_DSM_Data) will be radically
12
* different. The amount of trigger summary data is also likely to
13
* change.
14
*
15
* The data block structure will always begin with a 4 character
16
* name, followed by the byte-count of data following. The structure of
17
* data will depend on the configuration of particular crates.
18
*
19
* Note: PrePost data will only be available on local trigger disks and
20
* will not be present in event files.
21
******************************************************************************/
22
#define y9FORMAT_VERSION 0x09013040
/* 11 Dec 2008; Version 4.0 Format: yymmddvv */
23
#define y9MAX_TRG_BLK_SIZE 122880
/* Estimated at 100k bytes including pre/post */
24
#define y9MAX_OFFLEN 20
/* Depends on the number of crates in the system */
25
26
#define y9L1_CONF_NUM 1
27
#define y9BC1_CONF_NUM 2
28
#define y9MXQ_CONF_NUM 3
29
#define y9MIX_CONF_NUM 4
30
#define y9BCW_CONF_NUM 5
31
#define y9BCE_CONF_NUM 6
32
#define y9FEQ_CONF_NUM 7
33
#define y9BBC_CONF_NUM 8
34
#define y9BBQ_CONF_NUM 9
35
#define y9FMS_CONF_NUM 10
36
#define y9QT1_CONF_NUM 11
37
#define y9QT2_CONF_NUM 12
38
#define y9QT3_CONF_NUM 13
39
#define y9QT4_CONF_NUM 14
40
41
#define y9ADD_BIT_PILEUP 0
/* Contamination/Pileup bit in event descriptor add-bits */
42
#define y9ADD_BIT_FORCE 5
/* Force store of this event */
43
#define y9ADD_BIT_L2_5 6
/* Level 2.5 abort */
44
#define y9ADD_BIT_SIM 7
/* Simulated event - used by DAQ */
45
46
#define L2RESULTS_2009_OFFSET_EMC_CHECK 1
47
#define L2RESULTS_2009_OFFSET_EMC_PED 2
48
#define L2RESULTS_2009_OFFSET_BGAMMA 3
49
#define L2RESULTS_2009_OFFSET_EGAMMA 6
50
#define L2RESULTS_2009_OFFSET_DIJET 9
51
#define L2RESULTS_2009_OFFSET_UPSILON 17
52
#define L2RESULTS_2009_OFFSET_BEMCW 20
53
#define L2RESULTS_2009_OFFSET_BHIEN 42
54
#define L2RESULTS_2009_OFFSET_EHIEN 0
55
#define L2RESULTS_2009_OFFSET_BTOW_CAL 0
56
#define L2RESULTS_2009_OFFSET_ETOW_CAL 0
57
58
/* Event Descriptor Data Structures */
59
60
typedef
struct
{
61
char
name[3];
/* Contains EVD */
62
char
TrgDataFmtVer;
/* Exception for use by DAQ */
63
int
length;
/* Byte count of data that follows */
64
unsigned
int
bunchXing_hi;
65
unsigned
int
bunchXing_lo;
/* Two parts of RHIC bunch crossing number */
66
unsigned
short
actionWdDetectorBitMask;
/* from Fifo 1 */
67
unsigned
char
actionWdTrgCommand;
/* from Fifo 1 */
68
unsigned
char
actionWdDaqCommand;
/* from Fifo 1 */
69
unsigned
short
TrgToken;
/* from Fifo 2 */
70
unsigned
short
addBits;
/* used by trigger/daq: bit 5=Force store; bit 6=L2.5 abort; bit 7=1 is fake data */
71
unsigned
short
DSMInput;
/* only for use with Mk1 TCU. 0 if Mk2 TCU is used */
72
unsigned
short
externalBusy;
/* from Fifo 9 (Fifo 3 Mk1 TCU) */
73
unsigned
short
internalBusy;
/* from Fifo 9 (Mk2 TCU) */
74
unsigned
short
physicsWord;
/* Fifo 4 Mk1 TCU. 0 if Mk2 TCU is used */
75
unsigned
short
TriggerWord;
/* Fifo 5 Mk1 TCU. 0 if Mk2 TCU is used */
76
unsigned
short
DSMAddress;
/* from Fifo 10 (Fifo 6 Mk1 TCU) */
77
unsigned
short
TCU_Mark;
/* TCU_Mark Mk1=1 Mk2=2 */
78
unsigned
short
npre;
/* pre value for detector raw data */
79
unsigned
short
npost;
/* post value for detector raw data */
80
unsigned
short
res1;
/* Reserved for future use */
81
}
EvtDescData2009
;
82
83
/* L1 DSM data structures */
84
85
typedef
struct
{
86
char
name[4];
/* Contains L1DS */
87
int
length;
/* Byte count of data that follows */
88
unsigned
short
TOF[8];
/* TOF and MTD data */
89
unsigned
short
VTX[8];
/* Separate VPD, ZDC and BBC DSMs have been replaced with this one */
90
unsigned
short
EMC[8];
/* Contents of 1 EMC IB - results of separate BEMC and EEMC DSMs */
91
unsigned
short
BCdata[16];
/* Contents of 2 Bunch Crossing DSMs IB's */
92
unsigned
short
specialTriggers[8];
/* Contents of 1 Special Trigger DSM - all the special trigger requests */
93
unsigned
short
FPD[8];
/* Contents of 1 FMS and FPD IB */
94
unsigned
short
lastDSM[8];
/* Contents of last DSM IB - results of all DSM trees */
95
}
L1_DSM_Data2009
;
96
97
/* Trigger Summary Data Structures */
98
99
typedef
struct
{
100
char
name[4];
/* Contains TSUM */
101
int
length;
/* Byte count of data that follows */
102
unsigned
int
L1Sum[2];
/* L1 Summary */
103
unsigned
int
L2Sum[2];
/* L2 Summary */
104
unsigned
int
L1Result[32];
/* Result from L1 CPU */
105
unsigned
int
L2Result[64];
/* Result from L2 CPU */
106
unsigned
int
CResult[64];
/* Result from last algorithm */
107
}
TrgSumData2009
;
108
109
typedef
struct
{
110
char
name[4];
111
int
length;
/* Byte count of data that follows */
112
unsigned
int
data
[1];
/* NB: this definition is generic but would vary depending on actual data */
113
}
DataBlock2009
;
114
115
typedef
struct
{
116
char
name[4];
/* Contains BBC */
117
int
length;
/* Byte count of data that follows */
118
unsigned
short
BBClayer1[16];
/* This is the layer1 DSM that feeds the VTX DSM */
119
unsigned
short
ZDClayer1[8];
/* This is the new layer1 ZDC DSM that also feeds the VTX DSM */
120
unsigned
short
VPD[8];
/* ADC & TAC values for VPD detectors*/
121
}
BBCBlock2009
;
122
123
typedef
struct
{
124
char
name[4];
/* Contains MIX */
125
int
length;
/* Byte count of data that follows */
126
unsigned
short
FPDEastNSLayer1[8];
/* FPD east north/south layer 1 */
127
unsigned
char
MTD_P2PLayer1[16];
/* Data from MTD and PP2PP */
128
unsigned
short
TOFLayer1[8];
/* This is TOF Layer 1 */
129
unsigned
short
TOF[48];
/* TOF data */
130
}
MIXBlock2009
;
131
132
typedef
struct
{
133
char
name[4];
134
int
length;
/* Byte count of data that follows */
135
int
dataLoss;
/* Byte count of data truncated due to buffer limitations */
136
unsigned
int
data
[1];
/* NB: this definition is generic but would vary depending on actual data */
137
}
QTBlock2009
;
138
139
typedef
struct
{
140
char
name[4];
141
int
length;
142
unsigned
char
BEMCEast[240];
/* 15 DSMs covering the East half of BEMC */
143
}
BEastBlock2009
;
144
145
typedef
struct
{
146
char
name[4];
147
int
length;
148
unsigned
char
BEMCWest[240];
/* 15 DSMs covering the West half of BEMC */
149
}
BWestBlock2009
;
150
151
typedef
struct
{
152
char
name[4];
153
int
length;
154
unsigned
short
BEMClayer1[48];
/* 6 DSMs for BEMC at layer1 */
155
unsigned
short
EEMClayer1[16];
/* 2 DSMs for EEMC at layer1 */
156
unsigned
char
EEMC[144];
/* 9 DSMs for EEMC at layer0 */
157
}
BELayerBlock2009
;
158
159
typedef
struct
{
160
char
name[4];
161
int
length;
162
unsigned
char
FMS[256];
/* 16 DSMs for FMS */
163
}
FMSBlock2009
;
164
165
typedef
struct
{
166
int
offset;
/* Offset (in bytes) from the start of Trigger block to data */
167
int
length;
/* Length (in bytes) of data */
168
}
TrgOfflen2009
;
169
170
typedef
struct
{
171
int
FormatVersion;
/* Trigger Data Definition Version yymmddvv */
172
int
totalTriggerLength;
/* Total length (bytes) of complete Trigger Block */
173
int
eventNumber;
/* Event number in this run */
174
TrgOfflen2009
EventDesc_ofl;
/* Offset/length pair to Event Descriptor */
175
TrgOfflen2009
L1_DSM_ofl;
/* Offset/length pair to L1 DSM Data */
176
TrgOfflen2009
Summary_ofl;
/* Offset/length pair to Summary Data */
177
TrgOfflen2009
MainX[y9MAX_OFFLEN];
/* Offset/length pairs for main crossing */
178
int
PrePostList[10];
/* Offsets to offset/length pairs to (5) Pre and (5) Post crossing */
179
int
raw_data[y9MAX_TRG_BLK_SIZE/4];
/* Storage for raw data */
180
}
TriggerDataBlk2009
;
181
182
183
#endif
184
TrgSumData2009
Definition:
trgStructures2009.h:99
MIXBlock2009
Definition:
trgStructures2009.h:123
QTBlock2009
Definition:
trgStructures2009.h:132
BBCBlock2009
Definition:
trgStructures2009.h:115
BEastBlock2009
Definition:
trgStructures2009.h:139
TriggerDataBlk2009
Definition:
trgStructures2009.h:170
DataBlock2009
Definition:
trgStructures2009.h:109
EvtDescData2009
Definition:
trgStructures2009.h:60
FMSBlock2009
Definition:
trgStructures2009.h:159
BELayerBlock2009
Definition:
trgStructures2009.h:151
L1_DSM_Data2009
Definition:
trgStructures2009.h:85
BWestBlock2009
Definition:
trgStructures2009.h:145
TrgOfflen2009
Definition:
trgStructures2009.h:165
data
Definition:
PMD_Reader.hh:62
Generated by
1.8.5