CMS 3D CMS Logo

TotemFEDInfo.h
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of TOTEM offline software.
4 * Authors:
5 * Jan Kašpar (jan.kaspar@gmail.com)
6 *
7 ****************************************************************************/
8 
9 #ifndef DataFormats_CTPPSDigi_TotemFEDInfo
10 #define DataFormats_CTPPSDigi_TotemFEDInfo
11 
12 #include <cstdint>
13 
18 {
19  public:
20  TotemFEDInfo(int _id=0) : fedId(_id), header(0), orbitCounter(0), footer(0)
21  {
22  }
23 
24  void setFEDId(int _f) { fedId = _f; }
25  int getFEDId() const { return fedId; }
26 
27  void setHeader(uint64_t _h) { header = _h; }
28  uint8_t getBOE() const { return (header >> 60) & 0xF; }
29  uint32_t getLV1() const { return (header >> 32) & 0xFFFFFF; }
30  uint16_t getBX() const { return (header >> 20) & 0xFFF; }
31  uint16_t getOptoRxId() const { return (header >> 8) & 0xFFF; }
32  uint8_t getFOV() const { return (header >> 4) & 0xF; }
33  uint8_t getH0() const { return (header >> 0) & 0xF; }
34 
35  void setOrbitCounter(uint32_t _oc) { orbitCounter = _oc; }
36  uint32_t getOrbitCounter() const { return orbitCounter; }
37 
38  void setFooter(uint64_t _f) { footer = _f; }
39  uint8_t getEOE() const { return (footer >> 60) & 0xF; }
40  uint16_t getFSize() const { return (footer >> 32) & 0x3FF; }
41  uint8_t getF0() const { return (footer >> 0) & 0xF; }
42 
43  private:
45  int fedId;
46 
49  uint32_t orbitCounter;
51 };
52 
53 #endif
uint8_t getFOV() const
Definition: TotemFEDInfo.h:32
OptoRx headers and footers.
Definition: TotemFEDInfo.h:17
uint8_t getF0() const
Definition: TotemFEDInfo.h:41
uint16_t getOptoRxId() const
Definition: TotemFEDInfo.h:31
uint8_t getEOE() const
Definition: TotemFEDInfo.h:39
int fedId
Id from FEDRawDataCollection.
Definition: TotemFEDInfo.h:45
uint16_t getFSize() const
Definition: TotemFEDInfo.h:40
uint16_t getBX() const
Definition: TotemFEDInfo.h:30
int getFEDId() const
Definition: TotemFEDInfo.h:25
uint32_t getLV1() const
Definition: TotemFEDInfo.h:29
void setOrbitCounter(uint32_t _oc)
Definition: TotemFEDInfo.h:35
TotemFEDInfo(int _id=0)
Definition: TotemFEDInfo.h:20
uint64_t footer
Definition: TotemFEDInfo.h:50
void setFooter(uint64_t _f)
Definition: TotemFEDInfo.h:38
uint8_t getBOE() const
Definition: TotemFEDInfo.h:28
uint64_t header
Data from OptoRx headers and footer.
Definition: TotemFEDInfo.h:48
void setFEDId(int _f)
Definition: TotemFEDInfo.h:24
uint8_t getH0() const
Definition: TotemFEDInfo.h:33
uint32_t getOrbitCounter() const
Definition: TotemFEDInfo.h:36
unsigned long long uint64_t
Definition: Time.h:15
uint32_t orbitCounter
Definition: TotemFEDInfo.h:49
void setHeader(uint64_t _h)
Definition: TotemFEDInfo.h:27