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

#include <TGC_Hid2RESrcID.h>

Collaboration diagram for Muon::TGC_Hid2RESrcID:

Public Member Functions

 TGC_Hid2RESrcID ()
 Constrcutor. More...
 
 ~TGC_Hid2RESrcID ()
 Destrcutor. More...
 
const std::vector< uint32_t > & allRobIds () const
 Return all the ROB IDs. More...
 
void fillAllRobIds ()
 Fill all the ROB IDs. More...
 

Static Public Member Functions

static uint32_t getRodID (const TgcRdo *rdo)
 Make a ROD Source ID for TGC RDO. More...
 
static uint32_t getRodID (uint16_t subDetectorId, uint16_t rodId)
 Make a ROD Source ID for SubDetector ID and ROD ID. More...
 
static uint32_t getRodID (const Identifier &offlineId, const MuonTGC_CablingSvc *cabling)
 Make a ROD Source ID for TgcDigitCollection. More...
 
static uint32_t getRobID (uint32_t rod_id)
 Make a ROB Source ID from a ROD source ID. More...
 
static uint32_t getRosID (uint32_t rob_id)
 Make a ROS Source ID from a ROB source ID. More...
 
static uint32_t getDetID (uint32_t ros_id)
 Make a SubDetector ID from ROS source ID. More...
 

Private Attributes

std::vector< uint32_t > m_robIDs
 

Detailed Description

This class provides conversion between TGC RDO Id and RESrcID. RESrcID is used for identifying each ROD.

Author
Susumu Oda Susum.nosp@m.u.Od.nosp@m.a@cer.nosp@m.n.ch

This class was developed by Tadashi Maeno based on MDT_Hid2RESrcID written by Naples.

Definition at line 28 of file TGC_Hid2RESrcID.h.

Constructor & Destructor Documentation

◆ TGC_Hid2RESrcID()

Muon::TGC_Hid2RESrcID::TGC_Hid2RESrcID ( )
inline

Constrcutor.

Definition at line 33 of file TGC_Hid2RESrcID.h.

33 {}

◆ ~TGC_Hid2RESrcID()

Muon::TGC_Hid2RESrcID::~TGC_Hid2RESrcID ( )
inline

Destrcutor.

Definition at line 36 of file TGC_Hid2RESrcID.h.

36 {}

Member Function Documentation

◆ allRobIds()

const std::vector<uint32_t>& Muon::TGC_Hid2RESrcID::allRobIds ( ) const
inline

Return all the ROB IDs.

Definition at line 53 of file TGC_Hid2RESrcID.h.

53 { return m_robIDs; }

◆ fillAllRobIds()

void Muon::TGC_Hid2RESrcID::fillAllRobIds ( )

Fill all the ROB IDs.

Definition at line 83 of file TGC_Hid2RESrcID.cxx.

84 {
85  TgcRdoIdHash rdoIdHash;
86  int rdoIdHash_max = rdoIdHash.max();
87  for(int i=0; i<rdoIdHash_max; i++) {
88  SourceIdentifier sid(static_cast<eformat::SubDetector>(rdoIdHash.subDetectorId(i)),
89  rdoIdHash.rodId(i));
90 
91  m_robIDs.push_back(getRobID(sid.simple_code()));
92  }
93 }

◆ getDetID()

uint32_t Muon::TGC_Hid2RESrcID::getDetID ( uint32_t  ros_id)
static

Make a SubDetector ID from ROS source ID.

Definition at line 72 of file TGC_Hid2RESrcID.cxx.

73 {
74  // ROS to DET
75  SourceIdentifier id(ros_id);
76  SourceIdentifier id2(id.subdetector_id(),0);
77 
78  // return Source ID
79  return id2.code();
80 }

◆ getRobID()

uint32_t Muon::TGC_Hid2RESrcID::getRobID ( uint32_t  rod_id)
static

Make a ROB Source ID from a ROD source ID.

Definition at line 53 of file TGC_Hid2RESrcID.cxx.

54 {
55  // return Source ID.
56  // ROD source ID and ROB source ID are identical for TGC.
57  return rod_id;
58 }

◆ getRodID() [1/3]

uint32_t Muon::TGC_Hid2RESrcID::getRodID ( const Identifier offlineId,
const MuonTGC_CablingSvc cabling 
)
static

Make a ROD Source ID for TgcDigitCollection.

Definition at line 37 of file TGC_Hid2RESrcID.cxx.

39 {
40  int subDetectorId;
41  int rodId;
42  cabling->getReadoutIDfromElementID(offlineId,subDetectorId,rodId);
43 
44  // get Source ID
45  SourceIdentifier sid(static_cast<eformat::SubDetector>(subDetectorId),
46  static_cast<uint16_t>(rodId));
47 
48  // return Source ID
49  return sid.code();
50 }

◆ getRodID() [2/3]

uint32_t Muon::TGC_Hid2RESrcID::getRodID ( const TgcRdo rdo)
static

Make a ROD Source ID for TGC RDO.

Definition at line 16 of file TGC_Hid2RESrcID.cxx.

17 {
18  // get Source ID
19  SourceIdentifier sid(static_cast<eformat::SubDetector>(rdo->subDetectorId()),
20  static_cast<uint16_t>(rdo->rodId()));
21 
22  // return Source ID
23  return sid.code();
24 }

◆ getRodID() [3/3]

uint32_t Muon::TGC_Hid2RESrcID::getRodID ( uint16_t  subDetectorId,
uint16_t  rodId 
)
static

Make a ROD Source ID for SubDetector ID and ROD ID.

Definition at line 27 of file TGC_Hid2RESrcID.cxx.

28 {
29  // get Source ID
30  SourceIdentifier sid(static_cast<eformat::SubDetector>(subDetectorId), rodId);
31 
32  // return Source ID
33  return sid.code();
34 }

◆ getRosID()

uint32_t Muon::TGC_Hid2RESrcID::getRosID ( uint32_t  rob_id)
static

Make a ROS Source ID from a ROB source ID.

Definition at line 61 of file TGC_Hid2RESrcID.cxx.

62 {
63  // Change Module Type to ROS, moduleid = 0
64  SourceIdentifier id(rob_id);
65  SourceIdentifier id2(id.subdetector_id(),0);
66 
67  // return Source ID
68  return id2.code();
69 }

Member Data Documentation

◆ m_robIDs

std::vector<uint32_t> Muon::TGC_Hid2RESrcID::m_robIDs
private

Definition at line 59 of file TGC_Hid2RESrcID.h.


The documentation for this class was generated from the following files:
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
TgcRdoIdHash::subDetectorId
uint16_t subDetectorId(int i) const
reverse conversion for SubDetectorID and ROD ID
Definition: TgcRdoIdHash.cxx:59
TgcRdoIdHash
Definition: TgcRdoIdHash.h:18
TgcRdo::subDetectorId
uint16_t subDetectorId() const
Definition: TgcRdo.h:134
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
id2
HWIdentifier id2
Definition: LArRodBlockPhysicsV0.cxx:562
lumiFormat.i
int i
Definition: lumiFormat.py:85
Muon::TGC_Hid2RESrcID::m_robIDs
std::vector< uint32_t > m_robIDs
Definition: TGC_Hid2RESrcID.h:59
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
TgcRdoIdHash::rodId
uint16_t rodId(int i) const
reverse conversion : ROD ID
Definition: TgcRdoIdHash.cxx:70
Muon::TGC_Hid2RESrcID::getRobID
static uint32_t getRobID(uint32_t rod_id)
Make a ROB Source ID from a ROD source ID.
Definition: TGC_Hid2RESrcID.cxx:53
TgcRdoIdHash::max
int max() const
return maximum number of IDs
Definition: TgcRdoIdHash.h:30
TgcRdo::rodId
uint16_t rodId() const
Definition: TgcRdo.h:138