ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
RDOindex Class Reference

#include <RDOindex.h>

Collaboration diagram for RDOindex:

Public Member Functions

 RDOindex (unsigned int, unsigned int, const RpcIdHelper &helper)
 
 RDOindex (unsigned int, unsigned int, const std::string &, int, int, int, int, int, const RpcIdHelper &helper)
 
 RDOindex (const RDOindex &)=default
 
 ~RDOindex ()=default
 
RDOindexoperator= (const RDOindex &)=delete
 
 operator bool () const
 
bool operator! () const
 
void set_hash (unsigned int h)
 
unsigned short int ROBid (void) const
 
unsigned short int RODid (void) const
 
unsigned short int side (void) const
 
unsigned short int SLid (void) const
 
unsigned short int RXid (void) const
 
unsigned short int PADid (void) const
 
unsigned long int lvl1_code (void) const
 
int stationName (void) const
 
int stationEta (void) const
 
int stationPhi (void) const
 
int doubletR (void) const
 
int doubletZ (void) const
 
int doubletPhi (void) const
 
unsigned int hash (void) const
 
bool status (void) const
 
void offline_indexes (int &name, int &eta, int &phi, int &doublet_r, int &doublet_z, int &doublet_phi, int &gas_gap, int &measures_phi, int &strip) const
 
void pad_identifier (Identifier &id) const
 

Private Member Functions

void set_indexes (void)
 

Private Attributes

unsigned short int m_ROBid {0}
 
unsigned short int m_RODid {0}
 
unsigned short int m_side {0}
 
unsigned short int m_SLid {0}
 
unsigned short int m_RXid {0}
 
unsigned short int m_PADid {0}
 
unsigned long int m_lvl1_code {0}
 
int m_stationName {0}
 
int m_stationEta {0}
 
int m_stationPhi {0}
 
int m_doubletR {0}
 
int m_doubletZ {0}
 
int m_doubletPhi {0}
 
unsigned int m_hash {0}
 
bool m_status {false}
 
const RpcIdHelperm_rpcIdHelper
 

Friends

std::ostream & operator<< (std::ostream &, const RDOindex &)
 

Detailed Description

Definition at line 85 of file RDOindex.h.

Constructor & Destructor Documentation

◆ RDOindex() [1/3]

RDOindex::RDOindex ( unsigned int  PAD,
unsigned int  code,
const RpcIdHelper helper 
)

Definition at line 11 of file RDOindex.cxx.

13  : m_PADid{static_cast<unsigned short int>(PAD)}, m_lvl1_code{code},
15 {
16  set_indexes();
17 }

◆ RDOindex() [2/3]

RDOindex::RDOindex ( unsigned int  PAD,
unsigned int  code,
const std::string &  Name,
int  sEta,
int  sPhi,
int  dR,
int  dZ,
int  dP,
const RpcIdHelper helper 
)

Definition at line 19 of file RDOindex.cxx.

20  :
21  m_PADid(static_cast<unsigned short int>(PAD)),
23  m_stationName {helper.stationNameIndex(Name)},
24  m_stationEta{sEta},
25  m_stationPhi{sPhi},
26  m_doubletR{dR},
27  m_doubletZ{dZ},
28  m_doubletPhi{dP},
30 {
31  set_indexes();
32 }

◆ RDOindex() [3/3]

RDOindex::RDOindex ( const RDOindex )
default

◆ ~RDOindex()

RDOindex::~RDOindex ( )
default

Member Function Documentation

◆ doubletPhi()

int RDOindex::doubletPhi ( void  ) const
inline

Definition at line 140 of file RDOindex.h.

140 { return m_doubletPhi; }

◆ doubletR()

int RDOindex::doubletR ( void  ) const
inline

Definition at line 138 of file RDOindex.h.

138 { return m_doubletR; }

◆ doubletZ()

int RDOindex::doubletZ ( void  ) const
inline

Definition at line 139 of file RDOindex.h.

139 { return m_doubletZ; }

◆ hash()

unsigned int RDOindex::hash ( void  ) const
inline

Definition at line 142 of file RDOindex.h.

142 { return m_hash; }

◆ lvl1_code()

unsigned long int RDOindex::lvl1_code ( void  ) const
inline

Definition at line 133 of file RDOindex.h.

133 { return m_lvl1_code; }

◆ offline_indexes()

void RDOindex::offline_indexes ( int &  name,
int &  eta,
int &  phi,
int &  doublet_r,
int &  doublet_z,
int &  doublet_phi,
int &  gas_gap,
int &  measures_phi,
int &  strip 
) const

Definition at line 52 of file RDOindex.cxx.

53  {
54  if (m_status) {
55  if (m_stationPhi) {
57  eta = m_stationEta;
58  phi = m_stationPhi;
59  doublet_r = m_doubletR;
60  doublet_z = m_doubletZ;
61  doublet_phi = m_doubletPhi;
62  gas_gap = 1;
63  measures_phi = 0;
64  strip = 1;
65  }
66  }
67 }

◆ operator bool()

RDOindex::operator bool ( ) const

Definition at line 46 of file RDOindex.cxx.

46 { return m_status; }

◆ operator!()

bool RDOindex::operator! ( ) const

Definition at line 47 of file RDOindex.cxx.

47 { return !m_status; }

◆ operator=()

RDOindex& RDOindex::operator= ( const RDOindex )
delete

◆ pad_identifier()

void RDOindex::pad_identifier ( Identifier id) const

Definition at line 69 of file RDOindex.cxx.

69  {
70  if (m_status) {
71  int name = 0;
72  int eta = 0;
73  int phi = 0;
74  int doublet_r = 0;
75  int doublet_z = 0;
76  int doublet_phi = 0;
77 
78  if (m_stationPhi) {
80  eta = m_stationEta;
81  phi = m_stationPhi;
82  doublet_r = m_doubletR;
83  doublet_z = m_doubletZ;
84  doublet_phi = m_doubletPhi;
85  }
86 
87  id = m_rpcIdHelper->padID(name, eta, phi, doublet_r, doublet_z, doublet_phi);
88  }
89 }

◆ PADid()

unsigned short int RDOindex::PADid ( void  ) const
inline

Definition at line 131 of file RDOindex.h.

131 { return m_PADid; }

◆ ROBid()

unsigned short int RDOindex::ROBid ( void  ) const
inline

Definition at line 125 of file RDOindex.h.

125 { return m_ROBid; }

◆ RODid()

unsigned short int RDOindex::RODid ( void  ) const
inline

Definition at line 126 of file RDOindex.h.

126 { return m_RODid; }

◆ RXid()

unsigned short int RDOindex::RXid ( void  ) const
inline

Definition at line 130 of file RDOindex.h.

130 { return m_RXid; }

◆ set_hash()

void RDOindex::set_hash ( unsigned int  h)

Definition at line 49 of file RDOindex.cxx.

49 { m_hash = h; }

◆ set_indexes()

void RDOindex::set_indexes ( void  )
private

Definition at line 34 of file RDOindex.cxx.

34  {
36  if (decode) {
37  unsigned int sector = decode.logic_sector();
38  m_RXid = (sector % 32) % 2;
39  m_SLid = sector % 32;
40  m_side = (sector < 32) ? 0x66 : 0x65;
41  m_RODid = (sector % 32) / 2;
42  m_ROBid = (sector % 32) / 2;
43  m_status = true;
44  }
45 }

◆ side()

unsigned short int RDOindex::side ( void  ) const
inline

Definition at line 127 of file RDOindex.h.

127 { return m_side; }

◆ SLid()

unsigned short int RDOindex::SLid ( void  ) const
inline

Definition at line 129 of file RDOindex.h.

129 { return m_SLid; }

◆ stationEta()

int RDOindex::stationEta ( void  ) const
inline

Definition at line 136 of file RDOindex.h.

136 { return m_stationEta; }

◆ stationName()

int RDOindex::stationName ( void  ) const
inline

Definition at line 135 of file RDOindex.h.

135 { return m_stationName; }

◆ stationPhi()

int RDOindex::stationPhi ( void  ) const
inline

Definition at line 137 of file RDOindex.h.

137 { return m_stationPhi; }

◆ status()

bool RDOindex::status ( void  ) const
inline

Definition at line 144 of file RDOindex.h.

144 { return m_status; }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const RDOindex rdo 
)
friend

Definition at line 92 of file RDOindex.cxx.

92  {
93  std::stringstream tmp_stream;
94 
95  int name;
96  int eta;
97  int phi;
98  int doublet_r;
99  int doublet_z;
100  int doublet_phi;
101  int gas_gap;
102  int measures_phi;
103  int strip;
104 
105  rdo.offline_indexes(name, eta, phi, doublet_r, doublet_z, doublet_phi, gas_gap, measures_phi, strip);
106 
107  tmp_stream << "RPC PAD /" << std::hex << std::showbase << rdo.side() << "/" << rdo.SLid() << "/" << rdo.PADid()
108  << " mapped on offline Id /" << std::dec << name << "/" << eta << "/" << phi << "/" << doublet_r << "/" << doublet_z << "/"
109  << doublet_phi << "/" << gas_gap << "/" << measures_phi << "/" << strip << " .... hashId = " << rdo.hash() << std::endl;
110 
111  stream << tmp_stream.str();
112 
113  return stream;
114 }

Member Data Documentation

◆ m_doubletPhi

int RDOindex::m_doubletPhi {0}
private

Definition at line 102 of file RDOindex.h.

◆ m_doubletR

int RDOindex::m_doubletR {0}
private

Definition at line 100 of file RDOindex.h.

◆ m_doubletZ

int RDOindex::m_doubletZ {0}
private

Definition at line 101 of file RDOindex.h.

◆ m_hash

unsigned int RDOindex::m_hash {0}
private

Definition at line 104 of file RDOindex.h.

◆ m_lvl1_code

unsigned long int RDOindex::m_lvl1_code {0}
private

Definition at line 94 of file RDOindex.h.

◆ m_PADid

unsigned short int RDOindex::m_PADid {0}
private

Definition at line 92 of file RDOindex.h.

◆ m_ROBid

unsigned short int RDOindex::m_ROBid {0}
private

Definition at line 87 of file RDOindex.h.

◆ m_RODid

unsigned short int RDOindex::m_RODid {0}
private

Definition at line 88 of file RDOindex.h.

◆ m_rpcIdHelper

const RpcIdHelper* RDOindex::m_rpcIdHelper
private

Definition at line 153 of file RDOindex.h.

◆ m_RXid

unsigned short int RDOindex::m_RXid {0}
private

Definition at line 91 of file RDOindex.h.

◆ m_side

unsigned short int RDOindex::m_side {0}
private

Definition at line 89 of file RDOindex.h.

◆ m_SLid

unsigned short int RDOindex::m_SLid {0}
private

Definition at line 90 of file RDOindex.h.

◆ m_stationEta

int RDOindex::m_stationEta {0}
private

Definition at line 98 of file RDOindex.h.

◆ m_stationName

int RDOindex::m_stationName {0}
private

Definition at line 97 of file RDOindex.h.

◆ m_stationPhi

int RDOindex::m_stationPhi {0}
private

Definition at line 99 of file RDOindex.h.

◆ m_status

bool RDOindex::m_status {false}
private

Definition at line 106 of file RDOindex.h.


The documentation for this class was generated from the following files:
RPCdecoder
Definition: RPCdecoder.h:13
SiliconTech::strip
@ strip
RDOindex::m_lvl1_code
unsigned long int m_lvl1_code
Definition: RDOindex.h:94
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
RDOindex::set_indexes
void set_indexes(void)
Definition: RDOindex.cxx:34
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
RDOindex::m_PADid
unsigned short int m_PADid
Definition: RDOindex.h:92
RDOindex::PADid
unsigned short int PADid(void) const
Definition: RDOindex.h:131
RDOindex::side
unsigned short int side(void) const
Definition: RDOindex.h:127
RpcIdHelper::padID
Identifier padID(const Identifier &elementID, int doubletZ, int doubletPhi) const
Definition: RpcIdHelper.cxx:1043
RDOindex::m_side
unsigned short int m_side
Definition: RDOindex.h:89
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
RDOindex::m_ROBid
unsigned short int m_ROBid
Definition: RDOindex.h:87
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
RDOindex::m_RODid
unsigned short int m_RODid
Definition: RDOindex.h:88
extractSporadic.h
list h
Definition: extractSporadic.py:97
RDOindex::m_stationPhi
int m_stationPhi
Definition: RDOindex.h:99
RDOindex::m_stationName
int m_stationName
Definition: RDOindex.h:97
RDOindex::m_stationEta
int m_stationEta
Definition: RDOindex.h:98
pmontree.code
code
Definition: pmontree.py:443
RDOindex::m_RXid
unsigned short int m_RXid
Definition: RDOindex.h:91
RDOindex::m_hash
unsigned int m_hash
Definition: RDOindex.h:104
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
python.PerfMonSerializer.decode
def decode(s)
Definition: PerfMonSerializer.py:388
RDOindex::m_doubletZ
int m_doubletZ
Definition: RDOindex.h:101
RDOindex::offline_indexes
void offline_indexes(int &name, int &eta, int &phi, int &doublet_r, int &doublet_z, int &doublet_phi, int &gas_gap, int &measures_phi, int &strip) const
Definition: RDOindex.cxx:52
Name
JetDumper::Name Name
Definition: JetDumper.cxx:19
RDOindex::hash
unsigned int hash(void) const
Definition: RDOindex.h:142
RDOindex::m_doubletPhi
int m_doubletPhi
Definition: RDOindex.h:102
RDOindex::m_status
bool m_status
Definition: RDOindex.h:106
RDOindex::SLid
unsigned short int SLid(void) const
Definition: RDOindex.h:129
RDOindex::m_doubletR
int m_doubletR
Definition: RDOindex.h:100
RDOindex::m_rpcIdHelper
const RpcIdHelper * m_rpcIdHelper
Definition: RDOindex.h:153
RDOindex::m_SLid
unsigned short int m_SLid
Definition: RDOindex.h:90