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 
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
TotemFEDInfo::setFooter
void setFooter(uint64_t _f)
Definition: TotemFEDInfo.h:39
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
TotemFEDInfo::setHeader
void setHeader(uint64_t _h)
Definition: TotemFEDInfo.h:28
TotemFEDInfo::fov
uint8_t fov() const
Definition: TotemFEDInfo.h:33
TotemFEDInfo::bx
uint16_t bx() const
Definition: TotemFEDInfo.h:31
TotemFEDInfo::setOrbitCounter
void setOrbitCounter(uint32_t oc)
Definition: TotemFEDInfo.h:36
TotemFEDInfo::boe
uint8_t boe() const
Definition: TotemFEDInfo.h:29
TotemFEDInfo::header
uint64_t header
Data from OptoRx headers and footer.
Definition: TotemFEDInfo.h:49
TotemFEDInfo::footer
uint64_t footer
Definition: TotemFEDInfo.h:51
TotemFEDInfo::orbitCounter_
uint32_t orbitCounter_
Definition: TotemFEDInfo.h:50
TotemFEDInfo::fedId
int fedId() const
Definition: TotemFEDInfo.h:26
TotemFEDInfo::optoRxId
uint16_t optoRxId() const
Definition: TotemFEDInfo.h:32
TotemFEDInfo::TotemFEDInfo
TotemFEDInfo(int id=0)
Definition: TotemFEDInfo.h:23
TotemFEDInfo::h0
uint8_t h0() const
Definition: TotemFEDInfo.h:34
TotemFEDInfo::f0
uint8_t f0() const
Definition: TotemFEDInfo.h:42
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
TotemFEDInfo::setFEDId
void setFEDId(int f)
Definition: TotemFEDInfo.h:25
TotemFEDInfo::orbitCounter
uint32_t orbitCounter() const
Definition: TotemFEDInfo.h:37
TotemFEDInfo
OptoRx headers and footers.
Definition: TotemFEDInfo.h:16
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
TotemFEDInfo::eoe
uint8_t eoe() const
Definition: TotemFEDInfo.h:40
TotemFEDInfo::fSize
uint16_t fSize() const
Definition: TotemFEDInfo.h:41
TotemFEDInfo::lv1
uint32_t lv1() const
Definition: TotemFEDInfo.h:30
TotemFEDInfo::fedId_
int fedId_
Id from FEDRawDataCollection.
Definition: TotemFEDInfo.h:46