CMS 3D CMS Logo

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:17
static const uint32_t length
Definition: FEDHeader.h:54
bool moreHeaders() const
Definition: FEDHeader.cc:42
bool check() const
Check that the header is OK.
Definition: FEDHeader.cc:72
uint16_t sourceID() const
Identifier of the FED.
Definition: FEDHeader.cc:32
FEDHeader(const unsigned char *header)
Constructor.
Definition: FEDHeader.cc:10
uint8_t version() const
Version identifier of the FED data format.
Definition: FEDHeader.cc:37
const fedh_struct * theHeader
Definition: FEDHeader.h:57
uint16_t bxID() const
The bunch crossing number.
Definition: FEDHeader.cc:27
uint32_t lvl1ID() const
Level-1 event number generated by the TTC system.
Definition: FEDHeader.cc:22
~FEDHeader()
Destructor.
Definition: FEDHeader.cc:14