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
trgStructures2019.h
1
#ifndef trgStructures2019_h
2
#define trgStructures2019_h
3
/******
4
*
5
* Layout of new Trigger Data Block
6
*
7
* J.M. Nelson 30 January 2009
8
*
9
* Notes: The event descriptor will describe data from either
10
* the Mk1 or Mk2 TCUs. The variable TCU_Mark will be 1 for Mk1
11
* and 2 for the Mk2 TCU. Variables not used by one or other of the
12
* TCUs will be zero.
13
*
14
* The data block structure will always begin with a 4 character
15
* name, followed by the byte-count of data following. The structure of
16
* data will depend on the configuration of particular crates.
17
*
18
* Note: PrePost data will only be available on local trigger disks and
19
* will not be present in event files.
20
*
21
* 8Dec16: JMN changed FORMAT_VERSION
22
* 3Oct17: je - removed DAQ10k TPCpreMask from MIX added EPDlayer# to BBC
23
* 6Dec18: je - modified BBCBlock structure for added EPD DSMs
24
* 4Jan19: JMN removed redundant info from BBCBlock
25
*
26
******************************************************************************/
27
#define y19FORMAT_VERSION 0x18120646
/* Format: yymmddvv */
28
#define y19MAX_TRG_BLK_SIZE 122896
/* Current total: 113.25k bytes for pre/post non-zero suppressed data. Allow 120k */
29
#define y19MAX_OFFLEN 20
/* Depends on the number of crates in the system */
30
31
#define y19MAX_CONF_NUM 20
32
#define y19RCC_CONF_NUM 0
33
#define y19L1_CONF_NUM 1
34
#define y19BC1_CONF_NUM 2
35
#define y19MXQ_CONF_NUM 3
36
#define y19MIX_CONF_NUM 4
37
#define y19BCW_CONF_NUM 5
38
#define y19BCE_CONF_NUM 6
39
#define y19EQ3_CONF_NUM 7
40
#define y19BBC_CONF_NUM 8
41
#define y19BBQ_CONF_NUM 9
42
#define y19FMS_CONF_NUM 10
43
#define y19QT1_CONF_NUM 11
44
#define y19QT2_CONF_NUM 12
45
#define y19QT3_CONF_NUM 13
46
#define y19QT4_CONF_NUM 14
47
#define y19EQ1_CONF_NUM 15
48
#define y19EQ2_CONF_NUM 16
49
#define y19INF_CONF_NUM 20
50
51
#define y19ADD_BIT_PREPILEUP 0
/* pileup present */
52
#define y19ADD_BIT_POSTPILEUP 1
53
#define y19ADD_BIT_FORCE 5
/* Force store of this event */
54
#define y19ADD_BIT_L2_5 6
/* Level 2.5 abort */
55
#define y19ADD_BIT_SIM 7
/* Simulated event - used by DAQ */
56
57
/* Event Descriptor Data Structures */
58
59
//#pragma pack(1)
60
61
typedef
struct
{
62
char
name[3];
/* Contains EVD */
63
char
TrgDataFmtVer;
/* Exception for use by DAQ (LS byte of FORMAT_VERSION) */
64
int
length;
/* Byte count of data that follows */
65
unsigned
int
bunchXing_hi;
66
unsigned
int
bunchXing_lo;
/* Two parts of RHIC bunch crossing number */
67
unsigned
short
actionWdDetectorBitMask;
/* from Fifo 1 */
68
unsigned
char
actionWdTrgCommand;
/* from Fifo 1 */
69
unsigned
char
actionWdDaqCommand;
/* from Fifo 1 */
70
unsigned
short
TrgToken;
/* from Fifo 2 */
71
unsigned
short
addBits;
/* used by trigger/daq: bit 5=Force store; bit 6=L2.5 abort; bit 7=1 is fake data */
72
unsigned
short
DSMInput;
/* only for use with Mk1 TCU. 0 if Mk2 TCU is used */
73
unsigned
short
externalBusy;
/* from Fifo 9 (Fifo 3 Mk1 TCU) */
74
unsigned
short
internalBusy;
/* from Fifo 9 (Mk2 TCU) */
75
unsigned
short
trgDetMask;
// After 11/8/16
76
unsigned
short
tcuCtrBunch_hi;
// After 11/8/16
77
unsigned
short
DSMAddress;
/* from Fifo 10 (Fifo 6 Mk1 TCU) */
78
unsigned
short
TCU_Mark;
/* TCU_Mark Mk1=1 Mk2=2 */
79
unsigned
short
npre;
// (crate_mask & 0xfff) << 4 | npre (after 11/8/16)
80
unsigned
short
npost;
// (crate_mask & 0xfff000)>>8| npost (after 11/8/16)
81
unsigned
short
res1;
// (crate_mask & 0xff000000)>>20 | res1&0xf (after 11/8/16)
82
}
EvtDescData2019
;
83
84
//#pragma pack()
85
86
/* L1 DSM data structures */
87
88
typedef
struct
{
89
char
name[4];
/* Contains L1DS */
90
int
length;
/* Byte count of data that follows */
91
unsigned
short
TOF[8];
/* TOF and MTD data */
92
unsigned
short
VTX[8];
/* Separate VPD, ZDC and BBC DSMs have been replaced with this one */
93
unsigned
short
EMC[8];
/* Contents of 1 EMC IB - results of separate BEMC and EEMC DSMs */
94
unsigned
short
TPCMask[8];
/* TPC mask for DAQ10K */
95
unsigned
short
BCdata[16];
/* Contents of 2 Bunch Crossing DSMs IB's */
96
unsigned
short
specialTriggers[8];
/* Contents of 1 Special Trigger DSM - all the special trigger requests */
97
unsigned
short
FPD[8];
/* Contents of 1 FMS and FPD IB */
98
unsigned
short
lastDSM[8];
/* Contents of last DSM IB - results of all DSM trees */
99
}
L1_DSM_Data2019
;
100
101
/* Trigger Summary Data Structures */
102
103
typedef
struct
{
104
char
name[4];
/* Contains TSUM */
105
int
length;
/* Byte count of data that follows */
106
unsigned
int
L1Sum[2];
/* L1 Summary */
107
unsigned
int
L2Sum[2];
/* L2 Summary */
108
unsigned
int
L1Result[32];
/* Result from L1 CPU */
109
unsigned
int
L2Result[64];
/* Result from L2 CPU */
110
unsigned
int
C2Result[64];
/* Result from last algorithm */
111
unsigned
int
LocalClocks[32];
/* localClock values from RCC2*/
112
}
TrgSumData2019
;
113
114
typedef
struct
{
115
char
name[4];
116
int
length;
/* Byte count of data that follows */
117
unsigned
int
data
[1];
/* NB: this definition is generic but would vary depending on actual data */
118
}
DataBlock2019
;
119
120
typedef
struct
{
121
char
name[4];
/* Contains BBC */
122
int
length;
/* Byte count of data that follows */
123
unsigned
short
BBClayer1[8];
/* BBC-small layer1 DSM feeding VT201 DSM */
124
unsigned
short
EPDlayer1a[8];
/* layer1 DSM feeding QT32C TAC info to VT201 DSM */
125
unsigned
short
ZDClayer1[8];
/* layer1 ZDC DSM that feeds the VT201 DSM */
126
unsigned
short
VPD[8];
/* layer1 VPD DSM feeding ADC & TAC values to VT201*/
127
unsigned
short
EPDlayer0t[16];
/* layer0 EPD DSM feeding east & west TAC to EP101 */
128
unsigned
short
EPDlayer1b[8];
/* 2nd layer1 EPD DSM taking EPD QT ADC data to VT201 */
129
unsigned
short
EPDlayer0a[16];
/* layer0 EPD DSM feeding east & west QT32C adcs to EP102 */
130
unsigned
char
EPDlayer0h[32];
/* layer0 EPD DSM feeding east & west QT32B to EP102 */
131
}
BBCBlock2019
;
132
133
134
typedef
struct
{
135
char
name[4];
/* Contains MIX */
136
int
length;
/* Byte count of data that follows */
137
unsigned
short
FPDEastNSLayer1[8];
/* FPD east north/south layer 1 */
138
unsigned
char
MTD_P2PLayer1[16];
/* Data from MTD and PP2PP */
139
unsigned
short
TOFLayer1[8];
/* This is TOF Layer 1 */
140
unsigned
short
TOF[48];
/* TOF data */
141
/* unsigned short TPCpreMask[24]; */
/* EMC, MTD, & TOF TPC Grid Masks je-removed starting run 18 */
142
}
MIXBlock2019
;
143
144
typedef
struct
{
145
char
name[4];
146
int
length;
/* Byte count of data that follows */
147
int
dataLoss;
/* Byte count of data truncated due to buffer limitations */
148
unsigned
int
data
[1];
/* NB: this definition is generic but would vary depending on actual data */
149
}
QTBlock2019
;
150
151
typedef
struct
{
152
char
name[4];
153
int
length;
154
unsigned
char
BEMCEast[240];
/* 15 DSMs covering the East half of BEMC */
155
}
BEastBlock2019
;
156
157
typedef
struct
{
158
char
name[4];
159
int
length;
160
unsigned
char
BEMCWest[240];
/* 15 DSMs covering the West half of BEMC */
161
}
BWestBlock2019
;
162
163
typedef
struct
{
164
char
name[4];
165
int
length;
166
unsigned
short
BEMClayer1[48];
/* 6 DSMs for BEMC at layer1 */
167
unsigned
short
EEMClayer1[16];
/* 2 DSMs for EEMC at layer1 */
168
unsigned
char
EEMC[144];
/* 9 DSMs for EEMC at layer0 */
169
}
BELayerBlock2019
;
170
171
typedef
struct
{
172
char
name[4];
173
int
length;
174
unsigned
char
FMS[256];
/* 16 DSMs for FMS */
175
}
FMSBlock2019
;
176
177
typedef
struct
{
178
int
offset;
/* Offset (in bytes) from the start of Trigger block to data */
179
int
length;
/* Length (in bytes) of data */
180
}
TrgOfflen2019
;
181
182
typedef
struct
{
183
int
FormatVersion;
/* Trigger Data Definition Version yymmddvv */
184
int
totalTriggerLength;
/* Total length (bytes) of complete Trigger Block */
185
int
eventNumber;
/* Event number in this run */
186
TrgOfflen2019
EventDesc_ofl;
/* Offset/length pair to Event Descriptor */
187
TrgOfflen2019
L1_DSM_ofl;
/* Offset/length pair to L1 DSM Data */
188
TrgOfflen2019
Summary_ofl;
/* Offset/length pair to Summary Data */
189
TrgOfflen2019
MainX[y19MAX_OFFLEN];
/* Offset/length pairs for main crossing */
190
int
PrePostList[10];
/* Offsets to offset/length pairs to Pre and Post crossing */
191
int
raw_data[y19MAX_TRG_BLK_SIZE/4];
/* Storage for raw data */
192
}
TriggerDataBlk2019
;
193
194
#endif
195
196
DataBlock2019
Definition:
trgStructures2019.h:114
BBCBlock2019
Definition:
trgStructures2019.h:120
TriggerDataBlk2019
Definition:
trgStructures2019.h:182
BWestBlock2019
Definition:
trgStructures2019.h:157
FMSBlock2019
Definition:
trgStructures2019.h:171
BELayerBlock2019
Definition:
trgStructures2019.h:163
L1_DSM_Data2019
Definition:
trgStructures2019.h:88
TrgOfflen2019
Definition:
trgStructures2019.h:177
MIXBlock2019
Definition:
trgStructures2019.h:134
TrgSumData2019
Definition:
trgStructures2019.h:103
EvtDescData2019
Definition:
trgStructures2019.h:61
BEastBlock2019
Definition:
trgStructures2019.h:151
data
Definition:
PMD_Reader.hh:62
QTBlock2019
Definition:
trgStructures2019.h:144
Generated by
1.8.5