Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
EventFilter
FEDInterface
src
FEDTrailer.cc
Go to the documentation of this file.
1
8
#include "
EventFilter/FEDInterface/interface/FEDTrailer.h
"
9
10
#define FED_MORE_TRAILERS 0x00000008
11
#define FED_TCTRLID 0xA0000000
12
13
14
FEDTrailer::FEDTrailer
(
const
unsigned
char
* trailer) :
15
theTrailer(reinterpret_cast<
const
fedt_t
*>(trailer)) {}
16
17
18
FEDTrailer::~FEDTrailer
(){}
19
20
21
22
int
FEDTrailer::lenght
(){
23
return
(
theTrailer
->
eventsize
&
FED_EVSZ_MASK
) >>
FED_EVSZ_SHIFT
;
24
}
25
26
27
int
FEDTrailer::crc
(){
28
return
((
theTrailer
->
conscheck
&
FED_CRCS_MASK
) >>
FED_CRCS_SHIFT
);
29
}
30
31
32
int
FEDTrailer::evtStatus
(){
33
return
((
theTrailer
->
conscheck
&
FED_STAT_MASK
) >>
FED_STAT_SHIFT
);
34
}
35
36
37
int
FEDTrailer::ttsBits
(){
38
return
((
theTrailer
->
conscheck
&
FED_TTSI_MASK
) >>
FED_TTSI_SHIFT
);
39
}
40
41
42
bool
FEDTrailer::moreTrailers
(){
43
return
((
theTrailer
->
conscheck
&
FED_MORE_TRAILERS
)!=0);
44
}
45
46
47
void
FEDTrailer::set
(
unsigned
char
* trailer,
48
int
evt_lgth,
49
int
crc,
50
int
evt_stat,
51
int
tts,
52
bool
T
){
53
// FIXME: should check that input ranges are OK!!!
54
fedt_t
*
t
=
reinterpret_cast<
fedt_t
*
>
(trailer);
55
56
t->
eventsize
=
57
FED_TCTRLID
|
58
evt_lgth <<
FED_EVSZ_SHIFT
;
59
60
t->
conscheck
=
61
crc <<
FED_CRCS_SHIFT
|
62
evt_stat <<
FED_STAT_SHIFT
|
63
tts <<
FED_TTSI_SHIFT
;
64
65
if
(T) t->
conscheck
|=
FED_MORE_TRAILERS
;
66
}
67
68
69
bool
FEDTrailer::check
(){
70
// ...may report with finer detail
71
bool
result
=
true
;
72
result &= ((
theTrailer
->
eventsize
&
FED_TCTRLID_MASK
) ==
FED_TCTRLID
);
73
74
return
result
;
75
}
FEDTrailer::check
bool check()
Definition:
FEDTrailer.cc:66
FED_TCTRLID_MASK
#define FED_TCTRLID_MASK
Definition:
fed_trailer.h:37
lumiQTWidget.t
tuple t
Definition:
lumiQTWidget.py:50
FED_TCTRLID
#define FED_TCTRLID
Definition:
FEDTrailer.cc:11
FEDTrailer.h
FEDTrailer::evtStatus
int evtStatus()
Event fragment status information.
Definition:
FEDTrailer.cc:29
FEDTrailer::~FEDTrailer
virtual ~FEDTrailer()
Destructor.
Definition:
FEDTrailer.cc:15
FEDTrailer::moreTrailers
bool moreTrailers()
Definition:
FEDTrailer.cc:39
FEDTrailer::theTrailer
const fedt_struct * theTrailer
Definition:
FEDTrailer.h:52
FEDTrailer::set
static void set(unsigned char *trailer, int evt_lgth, int crc, int evt_stat, int tts, bool T=false)
Set all fields in the trailer.
Definition:
FEDTrailer.cc:44
FED_MORE_TRAILERS
#define FED_MORE_TRAILERS
Definition:
FEDTrailer.cc:10
fedt_struct::conscheck
unsigned int conscheck
Definition:
fed_trailer.h:32
FED_TTSI_MASK
#define FED_TTSI_MASK
Definition:
fed_trailer.h:42
FED_TTSI_SHIFT
#define FED_TTSI_SHIFT
Definition:
fed_trailer.h:53
query.result
tuple result
Definition:
query.py:137
FED_CRCS_SHIFT
#define FED_CRCS_SHIFT
Definition:
fed_trailer.h:51
FEDTrailer::ttsBits
int ttsBits()
Current value of the Trigger Throttling System bitsAQ).
Definition:
FEDTrailer.cc:34
FEDTrailer::lenght
int lenght()
The length of the event fragment counted in 64-bit words including header and trailer.
Definition:
FEDTrailer.cc:19
FED_CRCS_MASK
#define FED_CRCS_MASK
Definition:
fed_trailer.h:40
compareJSON.const
string const
Definition:
compareJSON.py:14
FED_STAT_SHIFT
#define FED_STAT_SHIFT
Definition:
fed_trailer.h:52
fedt_struct
Definition:
fed_trailer.h:31
fedt_struct::eventsize
unsigned int eventsize
Definition:
fed_trailer.h:33
FED_EVSZ_SHIFT
#define FED_EVSZ_SHIFT
Definition:
fed_trailer.h:49
FED_EVSZ_MASK
#define FED_EVSZ_MASK
Definition:
fed_trailer.h:38
FEDTrailer::crc
int crc()
Cyclic Redundancy Code of the event fragment including header and trailer.
Definition:
FEDTrailer.cc:24
FEDTrailer::FEDTrailer
FEDTrailer(const unsigned char *trailer)
Constructor.
Definition:
FEDTrailer.cc:11
FED_STAT_MASK
#define FED_STAT_MASK
Definition:
fed_trailer.h:41
T
long double T
Definition:
Basic3DVectorLD.h:59
Generated for CMSSW Reference Manual by
1.8.5