CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FEDHeader.h
Go to the documentation of this file.
1 #ifndef DataFormats_FEDRawData_FEDHeader_h
2 #define DataFormats_FEDRawData_FEDHeader_h
3 
10 #include <cstdint>
11 
12 struct fedh_struct;
13 
14 class FEDHeader {
15 public:
17  FEDHeader(const unsigned char* header);
18 
20  ~FEDHeader();
21 
23  uint8_t triggerType() const;
24 
26  uint32_t lvl1ID() const;
27 
29  uint16_t bxID() const;
30 
32  uint16_t sourceID() const;
33 
35  uint8_t version() const;
36 
40  bool moreHeaders() const;
41 
43  bool check() const;
44 
46  static void set(unsigned char* header,
47  uint8_t triggerType,
48  uint32_t lvl1ID,
49  uint16_t bxID,
50  uint16_t sourceID,
51  uint8_t version = 0,
52  bool moreHeaders = false);
53 
54  static const uint32_t length;
55 
56 private:
58 };
59 #endif // DataFormats_FEDRawData_FEDHeader_h
uint8_t triggerType() const
Event Trigger type identifier.
Definition: FEDHeader.cc:13
static const uint32_t length
Definition: FEDHeader.h:54
bool moreHeaders() const
Definition: FEDHeader.cc:23
bool check() const
Check that the header is OK.
Definition: FEDHeader.cc:44
uint16_t sourceID() const
Identifier of the FED.
Definition: FEDHeader.cc:19
FEDHeader(const unsigned char *header)
Constructor.
Definition: FEDHeader.cc:9
uint8_t version() const
Version identifier of the FED data format.
Definition: FEDHeader.cc:21
const fedh_struct * theHeader
Definition: FEDHeader.h:57
uint16_t bxID() const
The bunch crossing number.
Definition: FEDHeader.cc:17
uint32_t lvl1ID() const
Level-1 event number generated by the TTC system.
Definition: FEDHeader.cc:15
static void set(unsigned char *header, uint8_t triggerType, uint32_t lvl1ID, uint16_t bxID, uint16_t sourceID, uint8_t version=0, bool moreHeaders=false)
Set all fields in the header.
Definition: FEDHeader.cc:25
~FEDHeader()
Destructor.
Definition: FEDHeader.cc:11