ATLAS Offline Software
Classes | Public Member Functions | Private Attributes | List of all members
Muon::nsw::STGTPSegmentPacket Class Reference

#include <STGTPPackets.h>

Collaboration diagram for Muon::nsw::STGTPSegmentPacket:

Classes

struct  SegmentData
 

Public Member Functions

 STGTPSegmentPacket (const std::vector< std::uint32_t > &payload)
 
virtual ~STGTPSegmentPacket ()=default
 
std::uint32_t LUT_ChoiceSelection () const
 
std::uint32_t NSW_SegmentSelector () const
 
std::uint32_t ValidSegmentSelector () const
 
const std::array< SegmentData, STGTPSegments::num_segments > & Segments () const
 
const SegmentDataSegment (std::size_t segment) const
 
std::uint32_t BCID () const
 
std::uint32_t SectorID () const
 

Private Attributes

std::uint32_t m_lut_choice {}
 
std::uint32_t m_nsw_segment_selector {}
 
std::uint32_t m_valid_segment_selector {}
 
std::array< SegmentData, STGTPSegments::num_segmentsm_segmentData {}
 
std::uint32_t m_BCID {}
 
std::uint32_t m_sectorID {}
 

Detailed Description

Definition at line 34 of file STGTPPackets.h.

Constructor & Destructor Documentation

◆ STGTPSegmentPacket()

Muon::nsw::STGTPSegmentPacket::STGTPSegmentPacket ( const std::vector< std::uint32_t > &  payload)
explicit

Definition at line 48 of file STGTPPackets.cxx.

48  {
49  static constexpr auto PACKETS_SIZE = std::size_t{8};
50  if (std::size(payload) != PACKETS_SIZE) {
51  throw std::runtime_error(
52  Muon::nsw::format("Packet vector has size {} instead of expected size {}", std::size(payload), PACKETS_SIZE));
53  }
54  auto readPointer = std::size_t{0};
55  const auto packets = std::span{payload.data(), std::size(payload)};
56  auto decode = [&packets](std::size_t& readPointer, const std::size_t size) {
57  return decode_and_advance<std::uint64_t, std::uint32_t>(packets, readPointer, size);
58  };
59 
63 
64  for (std::size_t i = Muon::nsw::STGTPSegments::num_segments; i > 0; --i) {
65  const auto index = i - 1;
73  }
74 
77 }

◆ ~STGTPSegmentPacket()

virtual Muon::nsw::STGTPSegmentPacket::~STGTPSegmentPacket ( )
virtualdefault

Member Function Documentation

◆ BCID()

std::uint32_t Muon::nsw::STGTPSegmentPacket::BCID ( ) const
inline

Definition at line 56 of file STGTPPackets.h.

56 { return m_BCID; };

◆ LUT_ChoiceSelection()

std::uint32_t Muon::nsw::STGTPSegmentPacket::LUT_ChoiceSelection ( ) const
inline

Definition at line 49 of file STGTPPackets.h.

49 { return m_lut_choice; }

◆ NSW_SegmentSelector()

std::uint32_t Muon::nsw::STGTPSegmentPacket::NSW_SegmentSelector ( ) const
inline

Definition at line 50 of file STGTPPackets.h.

50 { return m_nsw_segment_selector; }

◆ SectorID()

std::uint32_t Muon::nsw::STGTPSegmentPacket::SectorID ( ) const
inline

Definition at line 57 of file STGTPPackets.h.

57 { return m_sectorID; }

◆ Segment()

const Muon::nsw::STGTPSegmentPacket::SegmentData & Muon::nsw::STGTPSegmentPacket::Segment ( std::size_t  segment) const

Definition at line 79 of file STGTPPackets.cxx.

80  {
82  throw std::out_of_range(
83  Muon::nsw::format("Requested segment {} which does not exist (max {})", segment, STGTPSegments::num_segments - 1));
84  }
85  return m_segmentData.at(segment);
86 }

◆ Segments()

const std::array<SegmentData, STGTPSegments::num_segments>& Muon::nsw::STGTPSegmentPacket::Segments ( ) const
inline

Definition at line 53 of file STGTPPackets.h.

53 { return m_segmentData; }

◆ ValidSegmentSelector()

std::uint32_t Muon::nsw::STGTPSegmentPacket::ValidSegmentSelector ( ) const
inline

Definition at line 51 of file STGTPPackets.h.

51 { return m_valid_segment_selector; }

Member Data Documentation

◆ m_BCID

std::uint32_t Muon::nsw::STGTPSegmentPacket::m_BCID {}
private

Definition at line 66 of file STGTPPackets.h.

◆ m_lut_choice

std::uint32_t Muon::nsw::STGTPSegmentPacket::m_lut_choice {}
private

Definition at line 60 of file STGTPPackets.h.

◆ m_nsw_segment_selector

std::uint32_t Muon::nsw::STGTPSegmentPacket::m_nsw_segment_selector {}
private

Definition at line 61 of file STGTPPackets.h.

◆ m_sectorID

std::uint32_t Muon::nsw::STGTPSegmentPacket::m_sectorID {}
private

Definition at line 67 of file STGTPPackets.h.

◆ m_segmentData

std::array<SegmentData, STGTPSegments::num_segments> Muon::nsw::STGTPSegmentPacket::m_segmentData {}
private

Definition at line 64 of file STGTPPackets.h.

◆ m_valid_segment_selector

std::uint32_t Muon::nsw::STGTPSegmentPacket::m_valid_segment_selector {}
private

Definition at line 62 of file STGTPPackets.h.


The documentation for this class was generated from the following files:
Muon::nsw::STGTPSegments::size_valid_segment_selector
constexpr int size_valid_segment_selector
Definition: NSWSTGTPDecodeBitmaps.h:81
CxxUtils::span
span(T *ptr, std::size_t sz) -> span< T >
A couple needed deduction guides.
Muon::nsw::STGTPSegments::size_output_segment_spare
constexpr int size_output_segment_spare
Definition: NSWSTGTPDecodeBitmaps.h:84
Muon::nsw::STGTPSegments::size_output_segment_phiRes
constexpr int size_output_segment_phiRes
Definition: NSWSTGTPDecodeBitmaps.h:86
index
Definition: index.py:1
Muon::nsw::STGTPSegmentPacket::m_lut_choice
std::uint32_t m_lut_choice
Definition: STGTPPackets.h:60
Muon::nsw::STGTPSegments::size_output_segment_dTheta
constexpr int size_output_segment_dTheta
Definition: NSWSTGTPDecodeBitmaps.h:87
Muon::nsw::STGTPSegmentPacket::m_BCID
std::uint32_t m_BCID
Definition: STGTPPackets.h:66
Muon::nsw::STGTPSegments::size_output_segment_phiID
constexpr int size_output_segment_phiID
Definition: NSWSTGTPDecodeBitmaps.h:88
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Muon::nsw::STGTPSegments::num_segments
constexpr std::size_t num_segments
Definition: NSWSTGTPDecodeBitmaps.h:75
Muon::nsw::STGTPSegments::size_output_segment_lowRes
constexpr int size_output_segment_lowRes
Definition: NSWSTGTPDecodeBitmaps.h:85
Muon::nsw::STGTPSegmentPacket::m_valid_segment_selector
std::uint32_t m_valid_segment_selector
Definition: STGTPPackets.h:62
lumiFormat.i
int i
Definition: lumiFormat.py:92
Muon::nsw::STGTPSegmentPacket::m_segmentData
std::array< SegmentData, STGTPSegments::num_segments > m_segmentData
Definition: STGTPPackets.h:64
Muon::nsw::STGTPSegments::size_lut_choice_selection
constexpr int size_lut_choice_selection
Definition: NSWSTGTPDecodeBitmaps.h:79
Muon::nsw::STGTPSegmentPacket::m_nsw_segment_selector
std::uint32_t m_nsw_segment_selector
Definition: STGTPPackets.h:61
Muon::nsw::format
std::string format(const std::string &str, const T &arg)
Definition: NSWDecodeHelper.h:40
python.PerfMonSerializer.decode
def decode(s)
Definition: PerfMonSerializer.py:388
Muon::nsw::STGTPSegments::size_output_segment_monitor
constexpr int size_output_segment_monitor
Definition: NSWSTGTPDecodeBitmaps.h:83
Muon::nsw::STGTPSegmentPacket::m_sectorID
std::uint32_t m_sectorID
Definition: STGTPPackets.h:67
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
Muon::nsw::STGTPSegments::size_bcid
constexpr int size_bcid
Definition: NSWSTGTPDecodeBitmaps.h:91
Muon::nsw::STGTPSegments::size_nsw_segment_selector
constexpr int size_nsw_segment_selector
Definition: NSWSTGTPDecodeBitmaps.h:80
Muon::nsw::STGTPSegments::size_sectorID
constexpr int size_sectorID
Definition: NSWSTGTPDecodeBitmaps.h:92
Muon::nsw::STGTPSegments::size_output_segment_rIndex
constexpr int size_output_segment_rIndex
Definition: NSWSTGTPDecodeBitmaps.h:89
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5