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
trgStructures2012.h
1
#ifndef trgStructures2012_h
2
#define trgStructures2012_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 y12FORMAT_VERSION 0x11110141
/* 11 Dec 2008; Version 4.0 Format: yymmddvv */
23
#define y12MAX_TRG_BLK_SIZE 122896
/* Estimated at 100k bytes including pre/post */
24
#define y12MAX_OFFLEN 20
/* Depends on the number of crates in the system */
25
26
#define y12L1_CONF_NUM 1
27
#define y12BC1_CONF_NUM 2
28
#define y12MXQ_CONF_NUM 3
29
#define y12MIX_CONF_NUM 4
30
#define y12BCW_CONF_NUM 5
31
#define y12BCE_CONF_NUM 6
32
#define y12FEQ_CONF_NUM 7
33
#define y12BBC_CONF_NUM 8
34
#define y12BBQ_CONF_NUM 9
35
#define y12FMS_CONF_NUM 10
36
#define y12QT1_CONF_NUM 11
37
#define y12QT2_CONF_NUM 12
38
#define y12QT3_CONF_NUM 13
39
#define y12QT4_CONF_NUM 14
40
41
#define y12ADD_BIT_PILEUP 0
/* Contamination/Pileup bit in event descriptor add-bits */
42
#define y12ADD_BIT_FORCE 5
/* Force store of this event */
43
#define y12ADD_BIT_L2_5 6
/* Level 2.5 abort */
44
#define y12ADD_BIT_SIM 7
/* Simulated event - used by DAQ */
45
46
#define L2RESULTS_2012_OFFSET_EMC_CHECK 1
47
#define L2RESULTS_2012_OFFSET_EMC_PED 2
48
#define L2RESULTS_2012_OFFSET_BGAMMA 3
49
#define L2RESULTS_2012_OFFSET_EGAMMA 6
50
#define L2RESULTS_2012_OFFSET_DIJET 9
51
#define L2RESULTS_2012_OFFSET_UPSILON 17
52
#define L2RESULTS_2012_OFFSET_BEMCW 20
53
#define L2RESULTS_2012_OFFSET_BHIEN 42
54
#define L2RESULTS_2012_OFFSET_EHIEN 0
55
#define L2RESULTS_2012_OFFSET_BTOW_CAL 0
56
#define L2RESULTS_2012_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
}
EvtDescData2012
;
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
TPCMask[8];
/* TPC mask for DAQ10K */
92
unsigned
short
BCdata[16];
/* Contents of 2 Bunch Crossing DSMs IB's */
93
unsigned
short
specialTriggers[8];
/* Contents of 1 Special Trigger DSM - all the special trigger requests */
94
unsigned
short
FPD[8];
/* Contents of 1 FMS and FPD IB */
95
unsigned
short
lastDSM[8];
/* Contents of last DSM IB - results of all DSM trees */
96
}
L1_DSM_Data2012
;
97
98
/* Trigger Summary Data Structures */
99
100
typedef
struct
{
101
char
name[4];
/* Contains TSUM */
102
int
length;
/* Byte count of data that follows */
103
unsigned
int
L1Sum[2];
/* L1 Summary */
104
unsigned
int
L2Sum[2];
/* L2 Summary */
105
unsigned
int
L1Result[32];
/* Result from L1 CPU */
106
unsigned
int
L2Result[64];
/* Result from L2 CPU */
107
unsigned
int
CResult[64];
/* Result from last algorithm */
108
}
TrgSumData2012
;
109
110
typedef
struct
{
111
char
name[4];
112
int
length;
/* Byte count of data that follows */
113
unsigned
int
data
[1];
/* NB: this definition is generic but would vary depending on actual data */
114
}
DataBlock2012
;
115
116
typedef
struct
{
117
char
name[4];
/* Contains BBC */
118
int
length;
/* Byte count of data that follows */
119
unsigned
short
BBClayer1[16];
/* This is the layer1 DSM that feeds the VTX DSM */
120
unsigned
short
ZDClayer1[8];
/* This is the new layer1 ZDC DSM that also feeds the VTX DSM */
121
unsigned
short
VPD[8];
/* ADC & TAC values for VPD detectors*/
122
}
BBCBlock2012
;
123
124
typedef
struct
{
125
char
name[4];
/* Contains MIX */
126
int
length;
/* Byte count of data that follows */
127
unsigned
short
FPDEastNSLayer1[8];
/* FPD east north/south layer 1 */
128
unsigned
char
MTD_P2PLayer1[16];
/* Data from MTD and PP2PP */
129
unsigned
short
TOFLayer1[8];
/* This is TOF Layer 1 */
130
unsigned
short
TOF[48];
/* TOF data */
131
}
MIXBlock2012
;
132
133
typedef
struct
{
134
char
name[4];
135
int
length;
/* Byte count of data that follows */
136
int
dataLoss;
/* Byte count of data truncated due to buffer limitations */
137
unsigned
int
data
[1];
/* NB: this definition is generic but would vary depending on actual data */
138
}
QTBlock2012
;
139
140
typedef
struct
{
141
char
name[4];
142
int
length;
143
unsigned
char
BEMCEast[240];
/* 15 DSMs covering the East half of BEMC */
144
}
BEastBlock2012
;
145
146
typedef
struct
{
147
char
name[4];
148
int
length;
149
unsigned
char
BEMCWest[240];
/* 15 DSMs covering the West half of BEMC */
150
}
BWestBlock2012
;
151
152
typedef
struct
{
153
char
name[4];
154
int
length;
155
unsigned
short
BEMClayer1[48];
/* 6 DSMs for BEMC at layer1 */
156
unsigned
short
EEMClayer1[16];
/* 2 DSMs for EEMC at layer1 */
157
unsigned
char
EEMC[144];
/* 9 DSMs for EEMC at layer0 */
158
}
BELayerBlock2012
;
159
160
typedef
struct
{
161
char
name[4];
162
int
length;
163
unsigned
char
FMS[256];
/* 16 DSMs for FMS */
164
}
FMSBlock2012
;
165
166
typedef
struct
{
167
int
offset;
/* Offset (in bytes) from the start of Trigger block to data */
168
int
length;
/* Length (in bytes) of data */
169
}
TrgOfflen2012
;
170
171
typedef
struct
{
172
int
FormatVersion;
/* Trigger Data Definition Version yymmddvv */
173
int
totalTriggerLength;
/* Total length (bytes) of complete Trigger Block */
174
int
eventNumber;
/* Event number in this run */
175
TrgOfflen2012
EventDesc_ofl;
/* Offset/length pair to Event Descriptor */
176
TrgOfflen2012
L1_DSM_ofl;
/* Offset/length pair to L1 DSM Data */
177
TrgOfflen2012
Summary_ofl;
/* Offset/length pair to Summary Data */
178
TrgOfflen2012
MainX[y12MAX_OFFLEN];
/* Offset/length pairs for main crossing */
179
int
PrePostList[10];
/* Offsets to offset/length pairs to (5) Pre and (5) Post crossing */
180
int
raw_data[y12MAX_TRG_BLK_SIZE/4];
/* Storage for raw data */
181
}
TriggerDataBlk2012
;
182
183
184
#endif
185
BBCBlock2012
Definition:
trgStructures2012.h:116
L1_DSM_Data2012
Definition:
trgStructures2012.h:85
BELayerBlock2012
Definition:
trgStructures2012.h:152
TrgSumData2012
Definition:
trgStructures2012.h:100
EvtDescData2012
Definition:
trgStructures2012.h:60
BWestBlock2012
Definition:
trgStructures2012.h:146
QTBlock2012
Definition:
trgStructures2012.h:133
FMSBlock2012
Definition:
trgStructures2012.h:160
TrgOfflen2012
Definition:
trgStructures2012.h:166
MIXBlock2012
Definition:
trgStructures2012.h:124
TriggerDataBlk2012
Definition:
trgStructures2012.h:171
BEastBlock2012
Definition:
trgStructures2012.h:140
DataBlock2012
Definition:
trgStructures2012.h:110
data
Definition:
PMD_Reader.hh:62
Generated by
1.8.5