Main Page
Namespaces
Classes
Package Documentation
src
EventFilter
CSCTFRawToDigi
src
CSCSPHeader.h
Go to the documentation of this file.
1
#ifndef CSCSPHeader_h
2
#define CSCSPHeader_h
3
4
#include <cstring>
// memcpy
5
6
class
CSCSPHeader
{
7
private
:
9
unsigned
sp_l1a_low
: 12;
10
unsigned
header_mark_1
: 4;
// constant, should be 1001 = 0x9
11
12
unsigned
sp_l1a_high
: 12;
13
unsigned
header_mark_2
: 4;
// constant, should be 1001 = 0x9
14
15
unsigned
zero_1
: 12;
// constant, should be 0
16
unsigned
header_mark_3
: 4;
// constant, should be 1001 = 0x9
17
18
unsigned
sp_bxn
: 12;
19
unsigned
header_mark_4
: 4;
// constant, should be 1001 = 0x9
20
22
unsigned
zero_2
: 12;
// constant, should be 0
23
unsigned
header_mark_5
: 4;
// constant, should be 1010 = 0xA
24
25
unsigned
sp_slot_number
: 5;
// SP_PADR, or physical address, or slot number
26
unsigned
sp_ersv
: 3;
// event record structure version
27
unsigned
sp_trigger_sector
: 4;
// SP Trigger Sector 1, 2, 3, 4, 5, 6 for +Z EMU side and 7, 8, 9, 10, 11, 12 for -Z EMU side
28
29
unsigned
header_mark_6
: 4;
// constant, should be 1010 = 0xA
30
/*
31
unsigned warning_overflow : 1; // FMM: L1A rate is too high
32
unsigned out_of_sync : 1; // FMM: L1 Reset is required
33
unsigned busy : 1; // FMM: L1A rate higher than SP can handle - start flushing events
34
unsigned ready : 1; // FMM: L1A rate is fine
35
unsigned fa_out_of_sync : 1; // FMM: FA out of sync: one of Front_FPGA's L1A doesn't match DDU_FPGA L1A
36
unsigned sp_out_of_sync : 1; // FMM: SP out of sync: SP_FPGA's L1A doesn't match DDU_FPGA L1A
37
unsigned spare_1 : 1; // not used yet
38
unsigned zero_3 : 5; // constant, should be 0
39
unsigned header_mark_7 : 4; // constant, should be 1010 = 0xA
40
*/
41
unsigned
fmm_status
: 6;
// see FMM above
42
unsigned
ddm
: 1;
// readout mode: 0/1 = DDU/VME
43
unsigned
zero_3
: 5;
// constant, should be 0
44
unsigned
header_mark_7
: 4;
// constant, should be 1010 = 0xA
45
46
/*
47
// DD/CSR_DFC: DAQ FIFO Configuration
48
unsigned tbin : 3; // sp record may contain up to 7 consequetive BXs
49
unsigned zero_suppression : 1; // zero suppression: if set - put only valid LCTs, stubs, and track in the record
50
unsigned f1_active : 1; // read(1)/suppress(0) F1 record in the event
51
unsigned f2_active : 1; // read(1)/suppress(0) F2 record in the event
52
unsigned f3_active : 1; // read(1)/suppress(0) F3 record in the event
53
unsigned f4_active : 1; // read(1)/suppress(0) F4 record in the event
54
unsigned f5_active : 1; // read(1)/suppress(0) F5 record in the event
55
unsigned dt_active : 1; // read(1)/suppress(0) DT record in the event
56
unsigned sp_active : 1; // read(1)/suppress(0) SP record in the event
57
unsigned skip : 1; // event is skiped, only this header + trailer exist in the record
58
unsigned header_mark_8 : 4; // constant, should be 1010 = 0xA
59
*/
60
// DD/CSR_DFC: DAQ FIFO Configuration
61
unsigned
csr_dfc
: 11;
//
62
unsigned
skip
: 1;
// event is skiped, only this header + trailer exist in the record
63
unsigned
header_mark_8
: 4;
// constant, should be 1010 = 0xA
64
65
friend
class
CSCTFPacker
;
66
67
public
:
68
bool
check
(
void
)
const
{
69
return
header_mark_1
!=0x9 ||
header_mark_2
!=0x9 ||
header_mark_3
!=0x9 ||
header_mark_4
!=0x9
70
||
header_mark_5
!=0xA ||
header_mark_6
!=0xA ||
header_mark_7
!=0xA ||
header_mark_8
!=0xA
71
||
zero_1
!=0 ||
zero_2
!=0 ||
zero_3
!=0;
72
}
73
74
unsigned
int
BXN
(
void
)
const
throw
() {
return
sp_bxn
; }
75
unsigned
int
L1A
(
void
)
const
throw
() {
return
(
sp_l1a_high
<<12)|
sp_l1a_low
; }
76
77
unsigned
int
slot
(
void
)
const
throw
() {
return
sp_slot_number
; }
78
unsigned
int
trigger_sector
(
void
)
const
throw
() {
return
sp_trigger_sector
; }
79
// following two functions are kept for compatibility with earlier versions of TF data format:
80
unsigned
int
sector
(
void
)
const
throw
() {
81
if
(
sp_ersv
<2)
return
sp_trigger_sector
&0x7;
82
else
return
(
sp_trigger_sector
<=6?
sp_trigger_sector
:
sp_trigger_sector
-6);
83
}
84
unsigned
int
endcap
(
void
)
const
throw
() {
85
if
(
sp_ersv
<2)
return
sp_trigger_sector
&0x8;
86
else
return
(
sp_trigger_sector
<=6?1:0);
87
}
88
89
enum
FMM
{
WOF
=1,
OSY
=2,
BUZY
=4,
READY
=8,
FA_OSY
=16,
SP_OSY
=32};
90
unsigned
int
status
(
void
)
const
throw
() {
return
fmm_status
; }
91
92
unsigned
int
nTBINs
(
void
)
const
throw
() {
return
csr_dfc
&0x7; }
93
94
bool
suppression
(
void
)
const
throw
() {
return
csr_dfc
&0x8; }
95
96
enum
ACTIVE
{
F1
=1,
F2
=2,
F3
=4,
F4
=8,
F5
=16,
DT
=32,
SP
=64};
97
unsigned
int
active
(
void
)
const
throw
() {
return
csr_dfc
>>4; }
98
99
bool
empty
(
void
)
const
throw
() {
return
skip
; }
100
101
int
format_version
(
void
)
const
throw
() {
return
sp_ersv
; }
102
bool
ddu_readout
(
void
)
const
throw
() {
return
ddm
; }
103
104
bool
unpack
(
const
unsigned
short
*&buf)
throw
() { memcpy((
void
*)
this
,buf,8*
sizeof
(
short
)); buf+=8;
return
check
(); }
105
106
CSCSPHeader
(
void
){}
107
};
108
109
#endif
CSCSPHeader::header_mark_8
unsigned header_mark_8
Definition:
CSCSPHeader.h:63
CSCSPHeader::L1A
unsigned int L1A(void) const
Definition:
CSCSPHeader.h:75
CSCSPHeader::sp_trigger_sector
unsigned sp_trigger_sector
Definition:
CSCSPHeader.h:27
CSCSPHeader::fmm_status
unsigned fmm_status
Definition:
CSCSPHeader.h:41
CSCSPHeader::zero_3
unsigned zero_3
Definition:
CSCSPHeader.h:43
CSCSPHeader::ACTIVE
ACTIVE
Definition:
CSCSPHeader.h:96
CSCSPHeader
Definition:
CSCSPHeader.h:6
CSCTFPacker
Definition:
CSCTFPacker.h:18
CSCSPHeader::skip
unsigned skip
Definition:
CSCSPHeader.h:62
CSCSPHeader::F3
Definition:
CSCSPHeader.h:96
CSCSPHeader::suppression
bool suppression(void) const
Definition:
CSCSPHeader.h:94
CSCSPHeader::zero_1
unsigned zero_1
Definition:
CSCSPHeader.h:15
CSCSPHeader::WOF
Definition:
CSCSPHeader.h:89
CSCSPHeader::format_version
int format_version(void) const
Definition:
CSCSPHeader.h:101
CSCSPHeader::check
bool check(void) const
Definition:
CSCSPHeader.h:68
CSCSPHeader::SP
Definition:
CSCSPHeader.h:96
CSCSPHeader::trigger_sector
unsigned int trigger_sector(void) const
Definition:
CSCSPHeader.h:78
CSCSPHeader::F2
Definition:
CSCSPHeader.h:96
CSCSPHeader::F1
Definition:
CSCSPHeader.h:96
CSCSPHeader::header_mark_7
unsigned header_mark_7
Definition:
CSCSPHeader.h:44
CSCSPHeader::sp_l1a_low
unsigned sp_l1a_low
Definition:
CSCSPHeader.h:9
CSCSPHeader::unpack
bool unpack(const unsigned short *&buf)
Definition:
CSCSPHeader.h:104
CSCSPHeader::nTBINs
unsigned int nTBINs(void) const
Definition:
CSCSPHeader.h:92
CSCSPHeader::header_mark_6
unsigned header_mark_6
Definition:
CSCSPHeader.h:29
CSCSPHeader::header_mark_1
unsigned header_mark_1
Definition:
CSCSPHeader.h:10
CSCSPHeader::header_mark_2
unsigned header_mark_2
Definition:
CSCSPHeader.h:13
CSCSPHeader::sp_ersv
unsigned sp_ersv
Definition:
CSCSPHeader.h:26
CSCSPHeader::ddu_readout
bool ddu_readout(void) const
Definition:
CSCSPHeader.h:102
CSCSPHeader::F4
Definition:
CSCSPHeader.h:96
CSCSPHeader::sector
unsigned int sector(void) const
Definition:
CSCSPHeader.h:80
ALCARECOPromptCalibProdSiPixelAli0T_cff.throw
throw
Definition:
ALCARECOPromptCalibProdSiPixelAli0T_cff.py:9
CSCSPHeader::ddm
unsigned ddm
Definition:
CSCSPHeader.h:42
CSCSPHeader::header_mark_4
unsigned header_mark_4
Definition:
CSCSPHeader.h:19
CSCSPHeader::F5
Definition:
CSCSPHeader.h:96
CSCSPHeader::header_mark_5
unsigned header_mark_5
Definition:
CSCSPHeader.h:23
CSCSPHeader::zero_2
unsigned zero_2
Definition:
CSCSPHeader.h:22
CSCSPHeader::SP_OSY
Definition:
CSCSPHeader.h:89
CSCSPHeader::OSY
Definition:
CSCSPHeader.h:89
CSCSPHeader::BXN
unsigned int BXN(void) const
Definition:
CSCSPHeader.h:74
CSCSPHeader::sp_slot_number
unsigned sp_slot_number
Definition:
CSCSPHeader.h:25
CSCSPHeader::csr_dfc
unsigned csr_dfc
Definition:
CSCSPHeader.h:61
CSCSPHeader::header_mark_3
unsigned header_mark_3
Definition:
CSCSPHeader.h:16
CSCSPHeader::endcap
unsigned int endcap(void) const
Definition:
CSCSPHeader.h:84
CSCSPHeader::CSCSPHeader
CSCSPHeader(void)
Definition:
CSCSPHeader.h:106
CSCSPHeader::FMM
FMM
Definition:
CSCSPHeader.h:89
CSCSPHeader::FA_OSY
Definition:
CSCSPHeader.h:89
CSCSPHeader::READY
Definition:
CSCSPHeader.h:89
CSCSPHeader::BUZY
Definition:
CSCSPHeader.h:89
CSCSPHeader::empty
bool empty(void) const
Definition:
CSCSPHeader.h:99
CSCSPHeader::sp_bxn
unsigned sp_bxn
Definition:
CSCSPHeader.h:18
CSCSPHeader::DT
Definition:
CSCSPHeader.h:96
CSCSPHeader::active
unsigned int active(void) const
Definition:
CSCSPHeader.h:97
CSCSPHeader::sp_l1a_high
unsigned sp_l1a_high
Definition:
CSCSPHeader.h:12
CSCSPHeader::slot
unsigned int slot(void) const
Definition:
CSCSPHeader.h:77
CSCSPHeader::status
unsigned int status(void) const
Definition:
CSCSPHeader.h:90
Generated for CMSSW Reference Manual by
1.8.11