CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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_TotemDigi_TotemFEDInfo
10 #define DataFormats_TotemDigi_TotemFEDInfo
11 
16 {
17  public:
18  TotemFEDInfo(int _id=0) : fedId(_id), header(0), orbitCounter(0), footer(0)
19  {
20  }
21 
22  void setFEDId(int _f) { fedId = _f; }
23  int getFEDId() const { return fedId; }
24 
25  void setHeader(uint64_t _h) { header = _h; }
26  uint8_t getBOE() const { return (header >> 60) & 0xF; }
27  uint32_t getLV1() const { return (header >> 32) & 0xFFFFFF; }
28  uint16_t getBX() const { return (header >> 20) & 0xFFF; }
29  uint16_t getOptoRxId() const { return (header >> 8) & 0xFFF; }
30  uint8_t getFOV() const { return (header >> 4) & 0xF; }
31  uint8_t getH0() const { return (header >> 0) & 0xF; }
32 
33  void setOrbitCounter(uint32_t _oc) { orbitCounter = _oc; }
34  uint32_t getOrbitCounter() const { return orbitCounter; }
35 
36  void setFooter(uint64_t _f) { footer = _f; }
37  uint8_t getEOE() const { return (footer >> 60) & 0xF; }
38  uint16_t getFSize() const { return (footer >> 32) & 0x3FF; }
39  uint8_t getF0() const { return (footer >> 0) & 0xF; }
40 
41  private:
43  int fedId;
44 
47  uint32_t orbitCounter;
49 };
50 
51 #endif
uint8_t getFOV() const
Definition: TotemFEDInfo.h:30
OptoRx headers and footers.
Definition: TotemFEDInfo.h:15
uint8_t getF0() const
Definition: TotemFEDInfo.h:39
uint16_t getOptoRxId() const
Definition: TotemFEDInfo.h:29
uint8_t getEOE() const
Definition: TotemFEDInfo.h:37
int fedId
Id from FEDRawDataCollection.
Definition: TotemFEDInfo.h:43
uint16_t getFSize() const
Definition: TotemFEDInfo.h:38
uint16_t getBX() const
Definition: TotemFEDInfo.h:28
int getFEDId() const
Definition: TotemFEDInfo.h:23
uint32_t getLV1() const
Definition: TotemFEDInfo.h:27
void setOrbitCounter(uint32_t _oc)
Definition: TotemFEDInfo.h:33
TotemFEDInfo(int _id=0)
Definition: TotemFEDInfo.h:18
uint64_t footer
Definition: TotemFEDInfo.h:48
void setFooter(uint64_t _f)
Definition: TotemFEDInfo.h:36
uint8_t getBOE() const
Definition: TotemFEDInfo.h:26
uint64_t header
Data from OptoRx headers and footer.
Definition: TotemFEDInfo.h:46
void setFEDId(int _f)
Definition: TotemFEDInfo.h:22
uint8_t getH0() const
Definition: TotemFEDInfo.h:31
uint32_t getOrbitCounter() const
Definition: TotemFEDInfo.h:34
unsigned long long uint64_t
Definition: Time.h:15
uint32_t orbitCounter
Definition: TotemFEDInfo.h:47
void setHeader(uint64_t _h)
Definition: TotemFEDInfo.h:25