ATLAS Offline Software
NSW_PadTriggerData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONRDO_NSW_PADTRIGGERDATA
5 #define MUONRDO_NSW_PADTRIGGERDATA
6 
7 #include "GaudiKernel/MsgStream.h"
8 
9 #include <iosfwd>
10 #include <string>
11 #include <tuple>
12 #include <vector>
13 #include <cstdint>
14 
15 namespace Muon {
16 
17 using uint32_vt = std::vector<uint32_t>;
18 
20 public:
21 
22  // constructor for data
25  uint32_t ec,
26  uint32_t fragid,
27  uint32_t secid,
28  uint32_t spare,
29  uint32_t orbit,
30  uint32_t bcid,
31  uint32_t l1id,
32  uint32_t orbitid,
33  uint32_t orbit1,
35  uint32_t hit_n,
36  uint32_t pfeb_n,
37  uint32_t trigger_n,
38  uint32_t bcid_n,
39  const uint32_vt& hit_relbcid,
40  const uint32_vt& hit_pfeb,
41  const uint32_vt& hit_tdschannel,
42  const uint32_vt& hit_vmmchannel,
43  const uint32_vt& hit_vmm,
44  const uint32_vt& hit_padchannel,
45  const uint32_vt& pfeb_addr,
46  const uint32_vt& pfeb_nchan,
47  const uint32_vt& pfeb_disconnected,
48  const uint32_vt& trigger_bandid,
49  const uint32_vt& trigger_phiid,
50  const uint32_vt& trigger_relbcid,
51  const uint32_vt& bcid_rel,
52  const uint32_vt& bcid_status,
53  const uint32_vt& bcid_multzero,
54  const uint32_vt& bcid_multiplicity);
55 
56  // constructor for sim
57  NSW_PadTriggerData(bool side_A, uint32_t sector, uint32_t bcid, uint32_t l1id);
58 
59  uint32_t getSourceid() const { return m_sourceid; }
60  uint32_t getFlags() const { return m_flags; }
61  uint32_t getEc() const { return m_ec; }
62  uint32_t getFragid() const { return m_fragid; }
63  uint32_t getSecid() const { return m_secid; }
64  uint32_t getSpare() const { return m_spare; }
65  uint32_t getOrbit() const { return m_orbit; }
66  uint32_t getBcid() const { return m_bcid; }
67  uint32_t getL1id() const { return m_l1id; }
68  uint32_t getOrbitid() const { return m_orbitid; }
69  uint32_t getOrbit1() const { return m_orbit1; }
70  uint32_t getStatus() const { return m_status; }
71  uint32_t getNumberOfHits() const { return m_hit_n; }
72  uint32_t getNumberOfPfebs() const { return m_pfeb_n; }
74  uint32_t getNumberOfBcids() const { return m_bcid_n; }
75  const uint32_vt& getHitRelBcids() const { return m_hit_relbcid; }
76  const uint32_vt& getHitPfebs() const { return m_hit_pfeb; }
77  const uint32_vt& getHitTdsChannels() const { return m_hit_tdschannel; }
78  const uint32_vt& getHitVmmChannels() const { return m_hit_vmmchannel; }
79  const uint32_vt& getHitVmms() const { return m_hit_vmm; }
80  const uint32_vt& getHitPadChannels() const { return m_hit_padchannel; }
81  const uint32_vt& getPfebAddrs() const { return m_pfeb_addr; }
82  const uint32_vt& getPfebNChannels() const { return m_pfeb_nchan; }
84  const uint32_vt& getTriggerBandIds() const { return m_trigger_bandid; }
85  const uint32_vt& getTriggerPhiIds() const { return m_trigger_phiid; }
86  const uint32_vt& getTriggerRelBcids() const { return m_trigger_relbcid; }
87  const uint32_vt& getBcidRels() const { return m_bcid_rel; }
88  const uint32_vt& getBcidStatuses() const { return m_bcid_status; }
89  const uint32_vt& getBcidMultZeros() const { return m_bcid_multzero; }
91 
92  std::string string() const;
93  friend std::ostream& operator<<(std::ostream& stream, const NSW_PadTriggerData& rhs);
94  friend MsgStream& operator<<(MsgStream& stream, const NSW_PadTriggerData& rhs);
95 
96  void addTrigger(uint32_t bandid, uint32_t phiid, uint32_t relbcid);
97 
98  bool sideA() const;
99  bool sideC() const;
100  bool largeSector() const;
101  bool smallSector() const;
102 
103 private:
104 
105  static std::tuple< uint32_vt, uint32_vt, uint32_vt >
106  filterNonNulls(const uint32_vt & bandids, const uint32_vt & phiids, const uint32_vt & bcids) ;
107 
140 
141  static constexpr uint32_t NULL_BANDID{0xff};
142  static constexpr uint32_t NULL_PHIID{0x3f};
143  static constexpr uint32_t SIDE_A = 0x6d0000;
144  static constexpr uint32_t SIDE_C = 0x6e0000;
145 
146 };
147 } // namespace Muon
148 
149 #endif // MUONRDO_NSW_PADTRIGGERDATA
Muon::NSW_PadTriggerData::largeSector
bool largeSector() const
Definition: NSW_PadTriggerData.cxx:121
Muon::NSW_PadTriggerData::getSecid
uint32_t getSecid() const
Definition: NSW_PadTriggerData.h:63
Muon::NSW_PadTriggerData::getPfebAddrs
const uint32_vt & getPfebAddrs() const
Definition: NSW_PadTriggerData.h:81
Muon::NSW_PadTriggerData::getHitVmms
const uint32_vt & getHitVmms() const
Definition: NSW_PadTriggerData.h:79
Muon::NSW_PadTriggerData::m_orbit1
uint32_t m_orbit1
Definition: NSW_PadTriggerData.h:118
Muon::NSW_PadTriggerData::m_bcid_status
uint32_vt m_bcid_status
Definition: NSW_PadTriggerData.h:137
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
Muon::NSW_PadTriggerData::getHitPadChannels
const uint32_vt & getHitPadChannels() const
Definition: NSW_PadTriggerData.h:80
AthenaPoolTestRead.flags
flags
Definition: AthenaPoolTestRead.py:8
Muon::NSW_PadTriggerData::getPfebNChannels
const uint32_vt & getPfebNChannels() const
Definition: NSW_PadTriggerData.h:82
Muon::NSW_PadTriggerData::SIDE_C
static constexpr uint32_t SIDE_C
Definition: NSW_PadTriggerData.h:144
Muon::NSW_PadTriggerData::m_pfeb_n
uint32_t m_pfeb_n
Definition: NSW_PadTriggerData.h:121
Muon::NSW_PadTriggerData::getOrbitid
uint32_t getOrbitid() const
Definition: NSW_PadTriggerData.h:68
Muon::NSW_PadTriggerData::m_pfeb_nchan
uint32_vt m_pfeb_nchan
Definition: NSW_PadTriggerData.h:131
Muon::NSW_PadTriggerData::getFlags
uint32_t getFlags() const
Definition: NSW_PadTriggerData.h:60
Muon::NSW_PadTriggerData::filterNonNulls
static std::tuple< uint32_vt, uint32_vt, uint32_vt > filterNonNulls(const uint32_vt &bandids, const uint32_vt &phiids, const uint32_vt &bcids)
Definition: NSW_PadTriggerData.cxx:93
Muon::NSW_PadTriggerData::m_secid
uint32_t m_secid
Definition: NSW_PadTriggerData.h:112
Muon::NSW_PadTriggerData::m_pfeb_disconnected
uint32_vt m_pfeb_disconnected
Definition: NSW_PadTriggerData.h:132
Muon::uint32_vt
std::vector< uint32_t > uint32_vt
Definition: NSW_PadTriggerData_p1.h:7
Muon::NSW_PadTriggerData::operator<<
friend std::ostream & operator<<(std::ostream &stream, const NSW_PadTriggerData &rhs)
Definition: NSW_PadTriggerData.cxx:129
Muon::NSW_PadTriggerData::getTriggerBandIds
const uint32_vt & getTriggerBandIds() const
Definition: NSW_PadTriggerData.h:84
Muon::NSW_PadTriggerData::getStatus
uint32_t getStatus() const
Definition: NSW_PadTriggerData.h:70
Muon::NSW_PadTriggerData::NULL_BANDID
static constexpr uint32_t NULL_BANDID
Definition: NSW_PadTriggerData.h:141
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::NSW_PadTriggerData::getPfebDisconnecteds
const uint32_vt & getPfebDisconnecteds() const
Definition: NSW_PadTriggerData.h:83
Muon::NSW_PadTriggerData::m_fragid
uint32_t m_fragid
Definition: NSW_PadTriggerData.h:111
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Muon::NSW_PadTriggerData::m_bcid_multzero
uint32_vt m_bcid_multzero
Definition: NSW_PadTriggerData.h:138
Muon::NSW_PadTriggerData::m_hit_vmm
uint32_vt m_hit_vmm
Definition: NSW_PadTriggerData.h:128
Muon::NSW_PadTriggerData::getBcidMultiplicities
const uint32_vt & getBcidMultiplicities() const
Definition: NSW_PadTriggerData.h:90
Muon::NSW_PadTriggerData::m_spare
uint32_t m_spare
Definition: NSW_PadTriggerData.h:113
Muon::NSW_PadTriggerData::m_hit_padchannel
uint32_vt m_hit_padchannel
Definition: NSW_PadTriggerData.h:129
Muon::NSW_PadTriggerData::SIDE_A
static constexpr uint32_t SIDE_A
Definition: NSW_PadTriggerData.h:143
Muon::NSW_PadTriggerData::m_trigger_n
uint32_t m_trigger_n
Definition: NSW_PadTriggerData.h:122
Muon::NSW_PadTriggerData::m_l1id
uint32_t m_l1id
Definition: NSW_PadTriggerData.h:116
Muon::NSW_PadTriggerData::m_hit_vmmchannel
uint32_vt m_hit_vmmchannel
Definition: NSW_PadTriggerData.h:127
Muon::NSW_PadTriggerData::sideA
bool sideA() const
Definition: NSW_PadTriggerData.cxx:113
Muon::NSW_PadTriggerData::getBcidMultZeros
const uint32_vt & getBcidMultZeros() const
Definition: NSW_PadTriggerData.h:89
Muon::NSW_PadTriggerData::m_hit_n
uint32_t m_hit_n
Definition: NSW_PadTriggerData.h:120
Muon::NSW_PadTriggerData::m_orbitid
uint32_t m_orbitid
Definition: NSW_PadTriggerData.h:117
Muon::NSW_PadTriggerData::getNumberOfPfebs
uint32_t getNumberOfPfebs() const
Definition: NSW_PadTriggerData.h:72
Muon::NSW_PadTriggerData::getNumberOfBcids
uint32_t getNumberOfBcids() const
Definition: NSW_PadTriggerData.h:74
Muon::NSW_PadTriggerData::getSourceid
uint32_t getSourceid() const
Definition: NSW_PadTriggerData.h:59
Muon::NSW_PadTriggerData::m_bcid_rel
uint32_vt m_bcid_rel
Definition: NSW_PadTriggerData.h:136
Muon::NSW_PadTriggerData::m_hit_tdschannel
uint32_vt m_hit_tdschannel
Definition: NSW_PadTriggerData.h:126
Muon::NSW_PadTriggerData
Definition: NSW_PadTriggerData.h:19
Muon::NSW_PadTriggerData::m_status
uint32_t m_status
Definition: NSW_PadTriggerData.h:119
Muon::NSW_PadTriggerData::getTriggerPhiIds
const uint32_vt & getTriggerPhiIds() const
Definition: NSW_PadTriggerData.h:85
Muon::NSW_PadTriggerData::getBcidStatuses
const uint32_vt & getBcidStatuses() const
Definition: NSW_PadTriggerData.h:88
Muon::NSW_PadTriggerData::getHitRelBcids
const uint32_vt & getHitRelBcids() const
Definition: NSW_PadTriggerData.h:75
Muon::NSW_PadTriggerData::m_trigger_bandid
uint32_vt m_trigger_bandid
Definition: NSW_PadTriggerData.h:133
Muon::NSW_PadTriggerData::getFragid
uint32_t getFragid() const
Definition: NSW_PadTriggerData.h:62
Muon::NSW_PadTriggerData::getNumberOfHits
uint32_t getNumberOfHits() const
Definition: NSW_PadTriggerData.h:71
Muon::NSW_PadTriggerData::m_trigger_relbcid
uint32_vt m_trigger_relbcid
Definition: NSW_PadTriggerData.h:135
Muon::NSW_PadTriggerData::getOrbit1
uint32_t getOrbit1() const
Definition: NSW_PadTriggerData.h:69
Muon::NSW_PadTriggerData::getBcidRels
const uint32_vt & getBcidRels() const
Definition: NSW_PadTriggerData.h:87
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
Muon::NSW_PadTriggerData::string
std::string string() const
Definition: NSW_PadTriggerData.cxx:86
Muon::NSW_PadTriggerData::getHitVmmChannels
const uint32_vt & getHitVmmChannels() const
Definition: NSW_PadTriggerData.h:78
Muon::NSW_PadTriggerData::getHitPfebs
const uint32_vt & getHitPfebs() const
Definition: NSW_PadTriggerData.h:76
Muon::NSW_PadTriggerData::getTriggerRelBcids
const uint32_vt & getTriggerRelBcids() const
Definition: NSW_PadTriggerData.h:86
Muon::NSW_PadTriggerData::m_orbit
uint32_t m_orbit
Definition: NSW_PadTriggerData.h:114
Muon::NSW_PadTriggerData::m_bcid_multiplicity
uint32_vt m_bcid_multiplicity
Definition: NSW_PadTriggerData.h:139
Muon::NSW_PadTriggerData::addTrigger
void addTrigger(uint32_t bandid, uint32_t phiid, uint32_t relbcid)
Definition: NSW_PadTriggerData.cxx:106
Muon::NSW_PadTriggerData::m_hit_relbcid
uint32_vt m_hit_relbcid
Definition: NSW_PadTriggerData.h:124
Muon::NSW_PadTriggerData::getNumberOfTriggers
uint32_t getNumberOfTriggers() const
Definition: NSW_PadTriggerData.h:73
Muon::NSW_PadTriggerData::sideC
bool sideC() const
Definition: NSW_PadTriggerData.cxx:117
Muon::NSW_PadTriggerData::getOrbit
uint32_t getOrbit() const
Definition: NSW_PadTriggerData.h:65
Muon::NSW_PadTriggerData::getSpare
uint32_t getSpare() const
Definition: NSW_PadTriggerData.h:64
Muon::NSW_PadTriggerData::m_pfeb_addr
uint32_vt m_pfeb_addr
Definition: NSW_PadTriggerData.h:130
merge.status
status
Definition: merge.py:17
Muon::NSW_PadTriggerData::getHitTdsChannels
const uint32_vt & getHitTdsChannels() const
Definition: NSW_PadTriggerData.h:77
Muon::NSW_PadTriggerData::m_flags
uint32_t m_flags
Definition: NSW_PadTriggerData.h:109
Muon::NSW_PadTriggerData::smallSector
bool smallSector() const
Definition: NSW_PadTriggerData.cxx:125
Muon::NSW_PadTriggerData::NSW_PadTriggerData
NSW_PadTriggerData(uint32_t sourceid, uint32_t flags, uint32_t ec, uint32_t fragid, uint32_t secid, uint32_t spare, uint32_t orbit, uint32_t bcid, uint32_t l1id, uint32_t orbitid, uint32_t orbit1, uint32_t status, uint32_t hit_n, uint32_t pfeb_n, uint32_t trigger_n, uint32_t bcid_n, const uint32_vt &hit_relbcid, const uint32_vt &hit_pfeb, const uint32_vt &hit_tdschannel, const uint32_vt &hit_vmmchannel, const uint32_vt &hit_vmm, const uint32_vt &hit_padchannel, const uint32_vt &pfeb_addr, const uint32_vt &pfeb_nchan, const uint32_vt &pfeb_disconnected, const uint32_vt &trigger_bandid, const uint32_vt &trigger_phiid, const uint32_vt &trigger_relbcid, const uint32_vt &bcid_rel, const uint32_vt &bcid_status, const uint32_vt &bcid_multzero, const uint32_vt &bcid_multiplicity)
Definition: NSW_PadTriggerData.cxx:8
Muon::NSW_PadTriggerData::m_trigger_phiid
uint32_vt m_trigger_phiid
Definition: NSW_PadTriggerData.h:134
Muon::NSW_PadTriggerData::getEc
uint32_t getEc() const
Definition: NSW_PadTriggerData.h:61
Muon::NSW_PadTriggerData::m_bcid_n
uint32_t m_bcid_n
Definition: NSW_PadTriggerData.h:123
Muon::NSW_PadTriggerData::m_hit_pfeb
uint32_vt m_hit_pfeb
Definition: NSW_PadTriggerData.h:125
Muon::NSW_PadTriggerData::m_sourceid
uint32_t m_sourceid
Definition: NSW_PadTriggerData.h:108
Muon::NSW_PadTriggerData::NULL_PHIID
static constexpr uint32_t NULL_PHIID
Definition: NSW_PadTriggerData.h:142
Muon::NSW_PadTriggerData::m_ec
uint32_t m_ec
Definition: NSW_PadTriggerData.h:110
Muon::NSW_PadTriggerData::getL1id
uint32_t getL1id() const
Definition: NSW_PadTriggerData.h:67
Muon::NSW_PadTriggerData::m_bcid
uint32_t m_bcid
Definition: NSW_PadTriggerData.h:115
Muon::NSW_PadTriggerData::getBcid
uint32_t getBcid() const
Definition: NSW_PadTriggerData.h:66