ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
RPC_Hid2RESrcID Class Reference

#include <RPC_Hid2RESrcID.h>

Collaboration diagram for RPC_Hid2RESrcID:

Public Member Functions

 RPC_Hid2RESrcID ()
 
 RPC_Hid2RESrcID (int specialROBNumber)
 
void set (const RpcIdHelper *rpdId)
 
uint32_t getRodID (const Identifier &offlineId, const RpcCablingCondData *readCdo) const
 

Static Public Member Functions

static uint32_t getRodID (const int &side, const int &slogic, const int &padId, const RpcCablingCondData *readCdo)
 
static uint32_t getRodID (const int &sector)
 
static uint32_t getRodID (const uint16_t &side, const uint16_t &rodIndex)
 
static uint32_t getRobID (const uint32_t rod_id)
 mapping SrcID from ROD to ROB (called in ByteStreamCnvSvcBase/FullEventAssembler.icc) More...
 
static uint32_t getRosID (const uint32_t rob_id)
 mapping SrcID from ROB to ROS More...
 
static uint32_t getDetID (const uint32_t ros_id)
 mapping SrcID from ROS to Det More...
 

Private Attributes

const RpcIdHelperm_rpcIdHelper
 
int m_specialROBNumber
 

Detailed Description

Definition at line 16 of file RPC_Hid2RESrcID.h.

Constructor & Destructor Documentation

◆ RPC_Hid2RESrcID() [1/2]

RPC_Hid2RESrcID::RPC_Hid2RESrcID ( )

Definition at line 18 of file RPC_Hid2RESrcID.cxx.

18 : m_rpcIdHelper(nullptr), m_specialROBNumber(-1) {}

◆ RPC_Hid2RESrcID() [2/2]

RPC_Hid2RESrcID::RPC_Hid2RESrcID ( int  specialROBNumber)

Definition at line 20 of file RPC_Hid2RESrcID.cxx.

20 : m_rpcIdHelper(nullptr), m_specialROBNumber(specialROBNumber) {}

Member Function Documentation

◆ getDetID()

uint32_t RPC_Hid2RESrcID::getDetID ( const uint32_t  ros_id)
static

mapping SrcID from ROS to Det

Definition at line 115 of file RPC_Hid2RESrcID.cxx.

115  {
116  // ROS to DET
117  SourceIdentifier id(ros_id);
118  SourceIdentifier id2(id.subdetector_id(), 0);
119  return id2.code();
120 }

◆ getRobID()

uint32_t RPC_Hid2RESrcID::getRobID ( const uint32_t  rod_id)
static

mapping SrcID from ROD to ROB (called in ByteStreamCnvSvcBase/FullEventAssembler.icc)

Definition at line 102 of file RPC_Hid2RESrcID.cxx.

102 { return rod_id; }

◆ getRodID() [1/4]

uint32_t RPC_Hid2RESrcID::getRodID ( const Identifier offlineId,
const RpcCablingCondData readCdo 
) const

Definition at line 25 of file RPC_Hid2RESrcID.cxx.

25  {
26  // this method returns a RESrcID for the ROD, for a
27  // given RPC pad ID offline ID
28 
29  unsigned short int RODid;
30  unsigned short int Iside;
31  unsigned short int SLid;
32 
33  if (readCdo->give_RODid(offlineId, RODid) && readCdo->give_side(offlineId, Iside) && readCdo->give_SLid(offlineId, SLid)) {
34  uint8_t rodIndex = (uint8_t)RODid;
35  uint16_t side = Iside;
36 
37  eformat::SubDetector detid =
38  (side == eformat::MUON_RPC_BARREL_A_SIDE) ? eformat::MUON_RPC_BARREL_A_SIDE : eformat::MUON_RPC_BARREL_C_SIDE;
39 
40  SourceIdentifier sid(detid, rodIndex);
41  uint32_t rod_id = sid.code();
42 
43  // TEMP FIXME temp fix for the sector 13 pulse tests ---- added fix for M3
44  if ((m_specialROBNumber > 0)) {
45  if (side == 0x65 && (SLid == 23 || SLid == 24)) {
46  // rod_id=0x650001;
47  rod_id = m_specialROBNumber;
48  } else if (side == 0x65 && SLid == 7) {
49  rod_id = 0x650001;
50  } else if (side == 0x65 && SLid == 8) {
51  rod_id = 0x650002;
52  if (m_specialROBNumber == 0x650001) rod_id = 0x650001; // fix for M3 with runnumber up to 11533 (SFI)
53  } else {
54  rod_id = 0xffffffff;
55  }
56  }
57 
58  return rod_id;
59  }
60 
61  return 0xffffffff;
62 }

◆ getRodID() [2/4]

uint32_t RPC_Hid2RESrcID::getRodID ( const int &  sector)
static

Definition at line 79 of file RPC_Hid2RESrcID.cxx.

79  {
80  // this method returns a RESrcID for the ROD, for a given RPC pad ID
81  uint8_t rodIndex = (uint8_t)((sector % 32) / 2);
82  int side = (sector < 32) ? 0 : 1;
83 
84  eformat::SubDetector detid = (side == 1) ? eformat::MUON_RPC_BARREL_A_SIDE : eformat::MUON_RPC_BARREL_C_SIDE;
85 
86  SourceIdentifier sid(detid, rodIndex);
87  uint32_t rod_id = sid.code();
88 
89  return rod_id;
90 }

◆ getRodID() [3/4]

uint32_t RPC_Hid2RESrcID::getRodID ( const int &  side,
const int &  slogic,
const int &  padId,
const RpcCablingCondData readCdo 
)
static

Definition at line 64 of file RPC_Hid2RESrcID.cxx.

64  {
65  // this method returns a RESrcID for the ROD, for a given RPC pad ID
66  const RpcCablingCondData::RDOmap& pad_map = readCdo->give_RDOs();
67  int key = side * 10000 + slogic * 100 + padId;
68  RDOindex index = (*pad_map.find(key)).second;
69  uint8_t rodIndex = (uint8_t)index.RODid();
70 
71  eformat::SubDetector detid = (side == 1) ? eformat::MUON_RPC_BARREL_A_SIDE : eformat::MUON_RPC_BARREL_C_SIDE;
72 
73  SourceIdentifier sid(detid, rodIndex);
74  uint32_t rod_id = sid.code();
75 
76  return rod_id;
77 }

◆ getRodID() [4/4]

uint32_t RPC_Hid2RESrcID::getRodID ( const uint16_t &  side,
const uint16_t &  rodIndex 
)
static

Definition at line 92 of file RPC_Hid2RESrcID.cxx.

92  {
93  // this method returns a RESrcID for the ROD, for a given RPC pad ID
94  eformat::SubDetector detid = (side == 1) ? eformat::MUON_RPC_BARREL_A_SIDE : eformat::MUON_RPC_BARREL_C_SIDE;
95  SourceIdentifier sid(detid, rodIndex);
96  uint32_t rod_id = sid.code();
97  return rod_id;
98 }

◆ getRosID()

uint32_t RPC_Hid2RESrcID::getRosID ( const uint32_t  rob_id)
static

mapping SrcID from ROB to ROS

Definition at line 106 of file RPC_Hid2RESrcID.cxx.

106  {
107  // Change Module Type to ROS, moduleid = 0
108  SourceIdentifier id(rob_id);
109  SourceIdentifier id2(id.subdetector_id(), 0);
110  return id2.code();
111 }

◆ set()

void RPC_Hid2RESrcID::set ( const RpcIdHelper rpdId)

Definition at line 22 of file RPC_Hid2RESrcID.cxx.

22 { m_rpcIdHelper = rpdId; }

Member Data Documentation

◆ m_rpcIdHelper

const RpcIdHelper* RPC_Hid2RESrcID::m_rpcIdHelper
private

Definition at line 36 of file RPC_Hid2RESrcID.h.

◆ m_specialROBNumber

int RPC_Hid2RESrcID::m_specialROBNumber
private

Definition at line 38 of file RPC_Hid2RESrcID.h.


The documentation for this class was generated from the following files:
RPC_Hid2RESrcID::m_specialROBNumber
int m_specialROBNumber
Definition: RPC_Hid2RESrcID.h:38
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
index
Definition: index.py:1
RpcCablingCondData::give_RODid
bool give_RODid(const Identifier &compactID, unsigned short int &id) const
Definition: RpcCablingCondData.cxx:28
TRT::Hit::side
@ side
Definition: HitInfo.h:83
RpcCablingCondData::give_side
bool give_side(const Identifier &compactID, unsigned short int &id) const
Definition: RpcCablingCondData.cxx:44
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
id2
HWIdentifier id2
Definition: LArRodBlockPhysicsV0.cxx:562
RpcCablingCondData::RDOmap
std::map< int, RDOindex, std::less< int > > RDOmap
Definition: RpcCablingCondData.h:25
RPC_Hid2RESrcID::m_rpcIdHelper
const RpcIdHelper * m_rpcIdHelper
Definition: RPC_Hid2RESrcID.h:36
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
RpcCablingCondData::give_SLid
bool give_SLid(const Identifier &compactID, unsigned short int &id) const
Definition: RpcCablingCondData.cxx:60
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
RDOindex
Definition: RDOindex.h:85
RpcCablingCondData::give_RDOs
const RDOmap & give_RDOs(void) const
Definition: RpcCablingCondData.cxx:10