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

#include <STGTPPackets.h>

Collaboration diagram for Muon::nsw::STGTPPadPacket:

Public Member Functions

 STGTPPadPacket (const std::vector< std::uint32_t > &payload, const int ver)
 
virtual ~STGTPPadPacket ()=default
 
std::uint32_t BCID () const
 
std::uint32_t BandID (const std::size_t num) const
 
std::uint32_t PhiID (const std::size_t num) const
 
std::uint32_t PadIdleFlag () const
 
std::uint32_t CoincidenceWedge () const
 

Private Member Functions

size_t Size (const int version)
 

Private Attributes

std::uint32_t m_BCID {}
 
std::array< std::uint32_t, STGTPPad::num_padsm_bandIDs {}
 
std::array< std::uint32_t, STGTPPad::num_padsm_phiIDs {}
 
std::uint32_t m_idleFlag {}
 
std::uint32_t m_coincWedge {}
 

Detailed Description

Definition at line 46 of file STGTPPackets.h.

Constructor & Destructor Documentation

◆ STGTPPadPacket()

Muon::nsw::STGTPPadPacket::STGTPPadPacket ( const std::vector< std::uint32_t > &  payload,
const int  ver 
)
explicit

Definition at line 115 of file STGTPPackets.cxx.

115  {
116  size_t packet_size_w = Size(ver);
117  if (std::size(payload) != packet_size_w) {
118  throw std::runtime_error(
119  Muon::nsw::format("Packet vector has size {} instead of expected size {}", std::size(payload), packet_size_w));
120  }
121 
122  const auto packets = std::span{payload.data(), std::size(payload)};
123  auto readPointer = std::size_t{0};
124  auto decode = [&packets](std::size_t& readPointer, const std::size_t size) {
125  return decode_and_advance<std::uint64_t, std::uint32_t>(packets, readPointer, size);
126  };
127 
128  if (ver >= 3)
129  {
130  // in versions 3+ the padding appears first
132  }
134  for (std::size_t i = Muon::nsw::STGTPPad::num_pads; i > 0; --i) {
135  const auto index = i - 1;
137  }
138 
139  for (std::size_t i = Muon::nsw::STGTPPad::num_pads; i > 0; --i) {
140  const auto index = i - 1;
142  }
143 
145  readPointer += Muon::nsw::STGTPPad::size_spare;
147 }

◆ ~STGTPPadPacket()

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

Member Function Documentation

◆ BandID()

std::uint32_t Muon::nsw::STGTPPadPacket::BandID ( const std::size_t  num) const
inline

Definition at line 51 of file STGTPPackets.h.

51 { return m_bandIDs.at(num); };

◆ BCID()

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

Definition at line 50 of file STGTPPackets.h.

50 { return m_BCID; };

◆ CoincidenceWedge()

std::uint32_t Muon::nsw::STGTPPadPacket::CoincidenceWedge ( ) const
inline

Definition at line 54 of file STGTPPackets.h.

54 { return m_coincWedge; };

◆ PadIdleFlag()

std::uint32_t Muon::nsw::STGTPPadPacket::PadIdleFlag ( ) const
inline

Definition at line 53 of file STGTPPackets.h.

53 { return m_idleFlag; };

◆ PhiID()

std::uint32_t Muon::nsw::STGTPPadPacket::PhiID ( const std::size_t  num) const
inline

Definition at line 52 of file STGTPPackets.h.

52 { return m_phiIDs.at(num); };

◆ Size()

size_t Muon::nsw::STGTPPadPacket::Size ( const int  version)
private

Definition at line 96 of file STGTPPackets.cxx.

96  {
97  size_t packet_size_w = 0;
98  size_t word_size = 32;
99  switch (ver) {
100  case 1:
101  packet_size_w = Muon::nsw::STGTPPad::size_v1 / word_size;
102  break;
103  case 2:
104  packet_size_w = Muon::nsw::STGTPPad::size_v2 / word_size;
105  break;
106  case 3:
107  packet_size_w = Muon::nsw::STGTPPad::size_v3 / word_size;
108  break;
109  default:
110  packet_size_w = 0;
111  break;
112  }
113  return packet_size_w;
114 }

Member Data Documentation

◆ m_bandIDs

std::array<std::uint32_t, STGTPPad::num_pads> Muon::nsw::STGTPPadPacket::m_bandIDs {}
private

Definition at line 58 of file STGTPPackets.h.

◆ m_BCID

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

Definition at line 57 of file STGTPPackets.h.

◆ m_coincWedge

std::uint32_t Muon::nsw::STGTPPadPacket::m_coincWedge {}
private

Definition at line 61 of file STGTPPackets.h.

◆ m_idleFlag

std::uint32_t Muon::nsw::STGTPPadPacket::m_idleFlag {}
private

Definition at line 60 of file STGTPPackets.h.

◆ m_phiIDs

std::array<std::uint32_t, STGTPPad::num_pads> Muon::nsw::STGTPPadPacket::m_phiIDs {}
private

Definition at line 59 of file STGTPPackets.h.


The documentation for this class was generated from the following files:
AtlasMcWeight::decode
double decode(number_type binnedWeight)
Convert weight from unsigned to double.
Definition: AtlasMcWeight.cxx:32
Muon::nsw::STGTPPadPacket::m_coincWedge
std::uint32_t m_coincWedge
Definition: STGTPPackets.h:61
CxxUtils::span
span(T *ptr, std::size_t sz) -> span< T >
A couple needed deduction guides.
Muon::nsw::STGTPPad::size_idleFlag
constexpr std::size_t size_idleFlag
Definition: NSWSTGTPDecodeBitmaps.h:68
index
Definition: index.py:1
Muon::nsw::STGTPPadPacket::m_idleFlag
std::uint32_t m_idleFlag
Definition: STGTPPackets.h:60
Muon::nsw::STGTPPad::size_coincidence_wedge
constexpr std::size_t size_coincidence_wedge
Definition: NSWSTGTPDecodeBitmaps.h:63
Muon::nsw::STGTPPad::size_BCID
constexpr std::size_t size_BCID
Definition: NSWSTGTPDecodeBitmaps.h:66
Muon::nsw::STGTPPad::size_v2
constexpr std::size_t size_v2
Definition: NSWSTGTPDecodeBitmaps.h:73
Muon::nsw::STGTPPad::num_pads
constexpr std::size_t num_pads
Definition: NSWSTGTPDecodeBitmaps.h:60
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Muon::nsw::STGTPPad::size_bandID
constexpr std::size_t size_bandID
Definition: NSWSTGTPDecodeBitmaps.h:65
Pythia8_A14_NNPDF23LO_Var1Down_Common.ver
ver
Definition: Pythia8_A14_NNPDF23LO_Var1Down_Common.py:26
lumiFormat.i
int i
Definition: lumiFormat.py:85
Muon::nsw::STGTPPadPacket::m_phiIDs
std::array< std::uint32_t, STGTPPad::num_pads > m_phiIDs
Definition: STGTPPackets.h:59
Muon::nsw::STGTPPad::size_phiID
constexpr std::size_t size_phiID
Definition: NSWSTGTPDecodeBitmaps.h:64
Muon::nsw::STGTPPad::size_v3_padding
constexpr std::size_t size_v3_padding
Definition: NSWSTGTPDecodeBitmaps.h:71
Muon::nsw::STGTPPadPacket::m_bandIDs
std::array< std::uint32_t, STGTPPad::num_pads > m_bandIDs
Definition: STGTPPackets.h:58
Muon::nsw::format
std::string format(const std::string &str, const T &arg)
Definition: NSWDecodeHelper.h:43
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
Muon::nsw::STGTPPadPacket::m_BCID
std::uint32_t m_BCID
Definition: STGTPPackets.h:57
Muon::nsw::STGTPPad::size_spare
constexpr std::size_t size_spare
Definition: NSWSTGTPDecodeBitmaps.h:67
Muon::nsw::STGTPPadPacket::Size
size_t Size(const int version)
Definition: STGTPPackets.cxx:96
Muon::nsw::STGTPPad::size_v1
constexpr std::size_t size_v1
Definition: NSWSTGTPDecodeBitmaps.h:72
Muon::nsw::STGTPPad::size_v3
constexpr std::size_t size_v3
Definition: NSWSTGTPDecodeBitmaps.h:74