CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FRDEventMessage.cc
Go to the documentation of this file.
1 
22 
27  : buf_((uint8*)buf),
28  payload_(0),
29  size_(0),
30  version_(0),
31  run_(0),
32  lumi_(0),
33  event_(0),
34  eventSize_(0),
35  paddingSize_(0),
36  adler32_(0)
37 {
38  uint32* bufPtr = static_cast<uint32*>(buf);
39  version_ = *bufPtr;
40  // if the version number is rather large, then we assume that the true
41  // version number is one. (In version one of the format, there was
42  // no version number in the data, and the run number appeared first.)
43  if (version_ >= 32) {
44  version_ = 1;
45  }
46 
47  size_ = 0;
48 
49  // version number
50  if (version_ >= 2) {
51  size_ += sizeof(uint32);
52  ++bufPtr;
53  }
54 
55  // run number
56  run_ = *bufPtr;
57  size_ += sizeof(uint32);
58  ++bufPtr;
59 
60  // lumi number
61  if (version_ >= 2) {
62  lumi_ = *bufPtr;
63  size_ += sizeof(uint32);
64  ++bufPtr;
65  }
66 
67  // event number
68  event_ = *bufPtr;
69  size_ += sizeof(uint32);
70  ++bufPtr;
71 
72  if (version_ >= 3) {
73  // event size
74  eventSize_ = *bufPtr;
75  size_ += sizeof(uint32) + eventSize_;
76  ++bufPtr;
77 
78  // padding size
79  paddingSize_ = *bufPtr;
80  size_ += sizeof(uint32) + paddingSize_;
81  ++bufPtr;
82 
83  // adler32
84  adler32_ = *bufPtr;
85  size_ += sizeof(uint32);
86  ++bufPtr;
87  }
88  else {
89  for (int idx = 0; idx < 1024; idx++) {
90  size_ += sizeof(uint32); // FED N size
91  size_ += *bufPtr; // FED N data
92  eventSize_ += *bufPtr;
93  ++bufPtr;
94  }
95  }
96 
97  payload_ = (void*)bufPtr;
98 }
FRDEventMsgView(void *buf)
unsigned int uint32
Definition: MsgTools.h:13
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
unsigned char uint8
Definition: MsgTools.h:11
void event_()
size_(0)
Definition: OwnArray.h:181