ATLAS Offline Software
L1Topo/L1TopoRDO/L1TopoRDO/Header.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef L1TOPORDO_HEADER_H
6 #define L1TOPORDO_HEADER_H
7 
8 #include <iostream>
9 #include <cstdint>
10 #include <utility>
11 
12 namespace L1Topo {
13 
18  class Header {
19  public:
25  uint32_t version() const;
27  uint32_t active_fibres() const;
29  uint32_t payload_crc() const;
31  uint32_t fpga() const;
33  uint32_t last_block() const;
35  uint32_t bcn_sign() const;
37  uint32_t bcn_offset() const;
39  int bcn() const;
41  uint32_t word() const;
42  protected:
44  void decode();
46  void encode();
47  private:
55  int m_bcn;
57  };
58 
61 
63  std::pair<uint32_t,uint32_t> signAndOffsetBCN(const int bcn);
64 
66  std::ostream& operator<<(std::ostream&, const Header&);
67 
68 } // namespace L1Topo
69 
70 
71 
72 #endif // L1TOPORDO_HEADER_H
L1Topo::Header::active_fibres
uint32_t active_fibres() const
access method
Definition: L1Topo/L1TopoRDO/src/Header.cxx:54
L1Topo::signAndOffsetBCN
std::pair< uint32_t, uint32_t > signAndOffsetBCN(const int bcn)
reverse helper function to return the sign and offset bits given a relative bunch crossing number
Definition: L1Topo/L1TopoRDO/src/Header.cxx:83
L1Topo::operator<<
std::ostream & operator<<(std::ostream &, const Error)
Helper to print errors as text rather than numbers.
Definition: Error.cxx:8
L1Topo::Header::m_bcn_offset
uint32_t m_bcn_offset
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:54
L1Topo::Header::m_bcn_sign
uint32_t m_bcn_sign
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:53
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
L1Topo::Header::bcn_sign
uint32_t bcn_sign() const
access method
Definition: L1Topo/L1TopoRDO/src/Header.cxx:66
L1Topo::Header::m_active_fibres
uint32_t m_active_fibres
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:49
L1Topo::Header::fpga
uint32_t fpga() const
access method
Definition: L1Topo/L1TopoRDO/src/Header.cxx:60
L1Topo::Header::m_last_block
uint32_t m_last_block
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:52
L1Topo::Header
Represents the L1Topo header word of the L1Topo DAQ data, with decoder and encoder.
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:18
L1Topo::Header::bcn
int bcn() const
access method
Definition: L1Topo/L1TopoRDO/src/Header.cxx:72
L1Topo::Header::m_word
uint32_t m_word
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:56
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
L1Topo::Header::encode
void encode()
method used by constructor to encode word
Definition: L1Topo/L1TopoRDO/src/Header.cxx:39
L1Topo::Header::m_fpga
uint32_t m_fpga
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:51
L1Topo::Header::Header
Header(const uint32_t version, const uint32_t active_fibres, const uint32_t payload_crc, const uint32_t fpga, const uint32_t last_block, const uint32_t bcn_sign, const uint32_t bcn_offset)
Construct from contents and encode word.
Definition: L1Topo/L1TopoRDO/src/Header.cxx:12
L1Topo::Header::version
uint32_t version() const
access method
Definition: L1Topo/L1TopoRDO/src/Header.cxx:51
L1Topo::Header::decode
void decode()
method used by constructor to decode word
Definition: L1Topo/L1TopoRDO/src/Header.cxx:27
L1Topo::Header::word
uint32_t word() const
access method
Definition: L1Topo/L1TopoRDO/src/Header.cxx:75
L1Topo::Header::last_block
uint32_t last_block() const
access method
Definition: L1Topo/L1TopoRDO/src/Header.cxx:63
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
L1Topo::Header::m_payload_crc
uint32_t m_payload_crc
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:50
L1Topo
Definition: BlockTypes.h:11
L1Topo::Header::payload_crc
uint32_t payload_crc() const
access method
Definition: L1Topo/L1TopoRDO/src/Header.cxx:57
L1Topo::Header::m_bcn
int m_bcn
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:55
L1Topo::signedBCN
int signedBCN(const uint32_t sign, uint32_t offset)
helper function to return a relative bunch crossing as a signed integer, given the sign bit and offse...
Definition: L1Topo/L1TopoRDO/src/Header.cxx:79
L1Topo::Header::bcn_offset
uint32_t bcn_offset() const
access method
Definition: L1Topo/L1TopoRDO/src/Header.cxx:69
L1Topo::Header::m_version
uint32_t m_version
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:48