Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
IOPool
Streamer
src
FRDEventMessage.cc
Go to the documentation of this file.
1
12
#include "
IOPool/Streamer/interface/FRDEventMessage.h
"
13
17
FRDEventMsgView::FRDEventMsgView
(
void
* buf)
18
: buf_((
uint8
*)buf),
19
payload_(0),
20
size_
(0),
21
version_(0),
22
run_(0),
23
lumi_(0),
24
event_
(0),
25
eventSize_(0),
26
paddingSize_(0),
27
adler32_(0),
28
crc32c_(0)
29
{
30
uint32
* bufPtr =
static_cast<
uint32
*
>
(buf);
31
version_
= *bufPtr;
32
// if the version number is rather large, then we assume that the true
33
// version number is one. (In version one of the format, there was
34
// no version number in the data, and the run number appeared first.)
35
if
(
version_
>= 32) {
36
version_
= 1;
37
}
38
39
size_
= 0;
40
41
// version number
42
if
(
version_
>= 2) {
43
size_
+=
sizeof
(
uint32
);
44
++bufPtr;
45
}
46
47
// run number
48
run_
= *bufPtr;
49
size_
+=
sizeof
(
uint32
);
50
++bufPtr;
51
52
// lumi number
53
if
(
version_
>= 2) {
54
lumi_
= *bufPtr;
55
size_
+=
sizeof
(
uint32
);
56
++bufPtr;
57
}
58
59
// event number
60
if
(
version_
== 4) {
61
uint64
eventLow = *bufPtr;
62
size_
+=
sizeof
(
uint32
);
63
++bufPtr;
64
65
uint64
eventHigh = *bufPtr;
66
size_
+=
sizeof
(
uint32
);
67
++bufPtr;
68
69
event_
= (eventHigh << 32) | eventLow;
70
71
}
else
{
72
event_
= *bufPtr;
73
size_
+=
sizeof
(
uint32
);
74
++bufPtr;
75
}
76
77
if
(
version_
>= 3) {
78
// event size
79
eventSize_
= *bufPtr;
80
size_
+=
sizeof
(
uint32
) +
eventSize_
;
81
++bufPtr;
82
83
if
(
version_
>= 5) {
84
crc32c_
= *bufPtr;
85
size_
+=
sizeof
(
uint32
);
86
++bufPtr;
87
}
88
else
{
89
// padding size up to V4
90
paddingSize_
= *bufPtr;
91
size_
+=
sizeof
(
uint32
) +
paddingSize_
;
92
++bufPtr;
93
94
adler32_
= *bufPtr;
95
size_
+=
sizeof
(
uint32
);
96
++bufPtr;
97
}
98
}
99
else
{
100
for
(
int
idx
= 0;
idx
< 1024;
idx
++) {
101
size_
+=
sizeof
(
uint32
);
// FED N size
102
size_
+= *bufPtr;
// FED N data
103
eventSize_
+= *bufPtr;
104
++bufPtr;
105
}
106
}
107
108
payload_
= (
void
*)bufPtr;
109
}
FRDEventMsgView::lumi_
uint32 lumi_
Definition:
FRDEventMessage.h:144
FRDEventMsgView::version_
uint32 version_
Definition:
FRDEventMessage.h:142
FRDEventMsgView::crc32c_
uint32 crc32c_
Definition:
FRDEventMessage.h:149
FRDEventMsgView::adler32_
uint32 adler32_
Definition:
FRDEventMessage.h:148
FRDEventMsgView::FRDEventMsgView
FRDEventMsgView(void *buf)
Definition:
FRDEventMessage.cc:17
FRDEventMsgView::eventSize_
uint32 eventSize_
Definition:
FRDEventMessage.h:146
FRDEventMsgView::paddingSize_
uint32 paddingSize_
Definition:
FRDEventMessage.h:147
FRDEventMsgView::payload_
void * payload_
Definition:
FRDEventMessage.h:140
uint32
unsigned int uint32
Definition:
MsgTools.h:13
FRDEventMsgView::run_
uint32 run_
Definition:
FRDEventMessage.h:143
FRDEventMsgView::event_
uint64 event_
Definition:
FRDEventMessage.h:145
uint64
unsigned long long uint64
Definition:
MsgTools.h:14
customizeTrackingMonitorSeedNumber.idx
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
Definition:
customizeTrackingMonitorSeedNumber.py:15
uint8
unsigned char uint8
Definition:
MsgTools.h:11
event_
void event_()
edm::size_
size_(0)
Definition:
OwnArray.h:181
FRDEventMsgView::size_
uint32 size_
Definition:
FRDEventMessage.h:141
FRDEventMessage.h
Generated for CMSSW Reference Manual by
1.8.5