test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
FRDEventMsgView Class Reference

#include <FRDEventMessage.h>

Public Member Functions

uint32 adler32 () const
 
uint32 event () const
 
uint32 eventSize () const
 
 FRDEventMsgView (void *buf)
 
uint32 lumi () const
 
uint32 paddingSize () const
 
void * payload () const
 
uint32 run () const
 
uint32 size () const
 
uint8startAddress () const
 
uint32 version () const
 

Private Attributes

uint32 adler32_
 
uint8buf_
 
uint32 event_
 
uint32 eventSize_
 
uint32 lumi_
 
uint32 paddingSize_
 
void * payload_
 
uint32 run_
 
uint32 size_
 
uint32 version_
 

Detailed Description

Definition at line 63 of file FRDEventMessage.h.

Constructor & Destructor Documentation

FRDEventMsgView::FRDEventMsgView ( void *  buf)

This class is used to view the contents of "FED Raw Data" (FRD) events. Initially, the only time that such events are created is when an error occurs in the HLT. So, in the beginning, "error event" == "FRD event". However, if new ways of creating events of this type are added to the HLT, hopefully this class can be used or upgraded to handle those events as well.

08-Aug-2008 - KAB - Initial Implementation 06-Oct-2008 - KAB - Added lumi block number

Format: uint32 - run number uint32 - lumi number uint32 - event number 1024 * uint32 - size values for all 1024 FED buffers variable size - FED data Constructor for the FRD event message viewer.

Definition at line 26 of file FRDEventMessage.cc.

References adler32_, event_, eventSize_, customizeTrackingMonitorSeedNumber::idx, lumi_, paddingSize_, payload_, run_, size_, and version_.

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 }
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

Member Function Documentation

uint32 FRDEventMsgView::adler32 ( ) const
inline

Definition at line 79 of file FRDEventMessage.h.

References adler32_.

79 { return adler32_; }
uint32 FRDEventMsgView::event ( ) const
inline

Definition at line 76 of file FRDEventMessage.h.

References event_.

Referenced by dumpFRDEventView().

76 { return event_; }
uint32 FRDEventMsgView::eventSize ( ) const
inline

Definition at line 77 of file FRDEventMessage.h.

References eventSize_.

77 { return eventSize_; }
uint32 FRDEventMsgView::lumi ( void  ) const
inline

Definition at line 75 of file FRDEventMessage.h.

References lumi_.

Referenced by dumpFRDEventView().

75 { return lumi_; }
uint32 FRDEventMsgView::paddingSize ( ) const
inline

Definition at line 78 of file FRDEventMessage.h.

References paddingSize_.

78 { return paddingSize_; }
void* FRDEventMsgView::payload ( ) const
inline

Definition at line 70 of file FRDEventMessage.h.

References payload_.

70 { return payload_; }
uint32 FRDEventMsgView::run ( void  ) const
inline

Definition at line 74 of file FRDEventMessage.h.

References run_.

Referenced by dumpFRDEventView().

74 { return run_; }
uint32 FRDEventMsgView::size ( void  ) const
inline

Definition at line 71 of file FRDEventMessage.h.

References size_.

Referenced by FRDEventFileWriter::doOutputEvent(), RawEventFileWriterForBU::doOutputEvent(), and dumpFRDEventView().

71 { return size_; }
uint8* FRDEventMsgView::startAddress ( ) const
inline

Definition at line 69 of file FRDEventMessage.h.

References buf_.

Referenced by FRDEventFileWriter::doOutputEvent(), and RawEventFileWriterForBU::doOutputEvent().

69 { return buf_; }
uint32 FRDEventMsgView::version ( ) const
inline

Definition at line 73 of file FRDEventMessage.h.

References version_.

Referenced by dumpFRDEventView().

73 { return version_; }

Member Data Documentation

uint32 FRDEventMsgView::adler32_
private

Definition at line 92 of file FRDEventMessage.h.

Referenced by adler32(), and FRDEventMsgView().

uint8* FRDEventMsgView::buf_
private

Definition at line 83 of file FRDEventMessage.h.

Referenced by startAddress().

uint32 FRDEventMsgView::event_
private

Definition at line 89 of file FRDEventMessage.h.

Referenced by event(), and FRDEventMsgView().

uint32 FRDEventMsgView::eventSize_
private

Definition at line 90 of file FRDEventMessage.h.

Referenced by eventSize(), and FRDEventMsgView().

uint32 FRDEventMsgView::lumi_
private

Definition at line 88 of file FRDEventMessage.h.

Referenced by FRDEventMsgView(), and lumi().

uint32 FRDEventMsgView::paddingSize_
private

Definition at line 91 of file FRDEventMessage.h.

Referenced by FRDEventMsgView(), and paddingSize().

void* FRDEventMsgView::payload_
private

Definition at line 84 of file FRDEventMessage.h.

Referenced by FRDEventMsgView(), and payload().

uint32 FRDEventMsgView::run_
private

Definition at line 87 of file FRDEventMessage.h.

Referenced by FRDEventMsgView(), and run().

uint32 FRDEventMsgView::size_
private

Definition at line 85 of file FRDEventMessage.h.

Referenced by FRDEventMsgView(), and size().

uint32 FRDEventMsgView::version_
private

Definition at line 86 of file FRDEventMessage.h.

Referenced by FRDEventMsgView(), and version().