CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
17 class TotemFEDInfo {
18 public:
19  TotemFEDInfo(int id = 0) : fedId_(id), header(0), orbitCounter_(0), footer(0) {}
20 
21  void setFEDId(int f) { fedId_ = f; }
22  int fedId() const { return fedId_; }
23 
24  void setHeader(uint64_t _h) { header = _h; }
25  uint8_t boe() const { return (header >> 60) & 0xF; }
26  uint32_t lv1() const { return (header >> 32) & 0xFFFFFF; }
27  uint16_t bx() const { return (header >> 20) & 0xFFF; }
28  uint16_t optoRxId() const { return (header >> 8) & 0xFFF; }
29  uint8_t fov() const { return (header >> 4) & 0xF; }
30  uint8_t h0() const { return (header >> 0) & 0xF; }
31 
32  void setOrbitCounter(uint32_t oc) { orbitCounter_ = oc; }
33  uint32_t orbitCounter() const { return orbitCounter_; }
34 
35  void setFooter(uint64_t _f) { footer = _f; }
36  uint8_t eoe() const { return (footer >> 60) & 0xF; }
37  uint16_t fSize() const { return (footer >> 32) & 0x3FF; }
38  uint8_t f0() const { return (footer >> 0) & 0xF; }
39 
40 private:
42  int fedId_;
43 
46  uint32_t orbitCounter_;
48 };
49 
50 #endif
OptoRx headers and footers.
Definition: TotemFEDInfo.h:17
uint32_t orbitCounter_
Definition: TotemFEDInfo.h:46
int fedId_
Id from FEDRawDataCollection.
Definition: TotemFEDInfo.h:42
uint16_t *__restrict__ id
uint16_t bx() const
Definition: TotemFEDInfo.h:27
uint8_t fov() const
Definition: TotemFEDInfo.h:29
void setFEDId(int f)
Definition: TotemFEDInfo.h:21
uint8_t h0() const
Definition: TotemFEDInfo.h:30
uint16_t optoRxId() const
Definition: TotemFEDInfo.h:28
uint8_t f0() const
Definition: TotemFEDInfo.h:38
uint32_t lv1() const
Definition: TotemFEDInfo.h:26
uint64_t footer
Definition: TotemFEDInfo.h:47
void setFooter(uint64_t _f)
Definition: TotemFEDInfo.h:35
uint64_t header
Data from OptoRx headers and footer.
Definition: TotemFEDInfo.h:45
uint32_t orbitCounter() const
Definition: TotemFEDInfo.h:33
uint8_t eoe() const
Definition: TotemFEDInfo.h:36
int fedId() const
Definition: TotemFEDInfo.h:22
uint16_t fSize() const
Definition: TotemFEDInfo.h:37
unsigned long long uint64_t
Definition: Time.h:13
uint8_t boe() const
Definition: TotemFEDInfo.h:25
void setOrbitCounter(uint32_t oc)
Definition: TotemFEDInfo.h:32
TotemFEDInfo(int id=0)
Definition: TotemFEDInfo.h:19
void setHeader(uint64_t _h)
Definition: TotemFEDInfo.h:24