CMS 3D CMS Logo

FEDTrailer.h
Go to the documentation of this file.
1 #ifndef DataFormats_FEDRawData_FEDTrailer_h
2 #define DataFormats_FEDRawData_FEDTrailer_h
3 
10 #include <cstdint>
11 
12 struct fedt_struct;
13 
14 class FEDTrailer {
15 public:
17  FEDTrailer(const unsigned char* trailer);
18 
20  virtual ~FEDTrailer();
21 
23  uint32_t fragmentLength() const;
24 
26  uint16_t crc() const;
27 
29  uint8_t evtStatus() const;
30 
32  uint8_t ttsBits() const;
33 
36  bool moreTrailers() const;
37 
39  bool crcModified() const;
40 
42  bool slinkError() const;
43 
45  bool wrongFedId() const;
46 
48  bool check() const;
49 
51  uint32_t conscheck() const;
52 
54  static void set(
55  unsigned char* trailer, uint32_t lenght, uint16_t crc, uint8_t evt_stat, uint8_t tts, bool moreTrailers = false);
56 
57  static const uint32_t length;
58 
59 private:
61 };
62 #endif // DataFormats_FEDRawData_FEDTrailer_h
static const uint32_t length
Definition: FEDTrailer.h:57
virtual ~FEDTrailer()
Destructor.
Definition: FEDTrailer.cc:11
uint16_t crc() const
Cyclic Redundancy Code of the event fragment including header and trailer.
Definition: FEDTrailer.cc:15
const fedt_struct * theTrailer
Definition: FEDTrailer.h:60
bool check() const
Check that the trailer is OK.
Definition: FEDTrailer.cc:45
bool moreTrailers() const
Definition: FEDTrailer.cc:21
bool crcModified() const
True if the CRC value has been modified by the S-link sender card.
Definition: FEDTrailer.cc:23
uint32_t fragmentLength() const
The length of the event fragment counted in 64-bit words including header and trailer.
Definition: FEDTrailer.cc:13
uint8_t ttsBits() const
Current value of the Trigger Throttling System bits.
Definition: FEDTrailer.cc:19
uint8_t evtStatus() const
Event fragment status information.
Definition: FEDTrailer.cc:17
uint32_t conscheck() const
Return the word containing the consistency checks.
Definition: FEDTrailer.cc:29
bool wrongFedId() const
True if the FED_ID given by the FED is not the one expected by the FRL.
Definition: FEDTrailer.cc:27
bool slinkError() const
True if the FRL has detected a transmission error over the s-link cable.
Definition: FEDTrailer.cc:25
FEDTrailer(const unsigned char *trailer)
Constructor.
Definition: FEDTrailer.cc:9