ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
MuonTGC_Cabling::TGCCableSSWToROD Class Reference

#include <TGCCableSSWToROD.h>

Inheritance diagram for MuonTGC_Cabling::TGCCableSSWToROD:
Collaboration diagram for MuonTGC_Cabling::TGCCableSSWToROD:

Public Types

enum  CableType {
  NoCableType =-1, InASD, ASDToPP, InPP,
  PPToSLB, InSLB, SLBToHPB, HPBToSL,
  SLBToSSW, SSWToROD, MaxCableType
}
 

Public Member Functions

 TGCCableSSWToROD (const std::string &filename)
 
 TGCCableSSWToROD (const TGCCableSSWToROD &)
 
TGCCableSSWToRODoperator= (const TGCCableSSWToROD &)
 
virtual ~TGCCableSSWToROD (void)
 
virtual TGCModuleMapgetModule (const TGCModuleId *moduleId) const
 
CableType getCableType (void) const
 

Protected Member Functions

virtual TGCChannelIdgetChannelIn (const TGCChannelId *, bool) const
 
virtual TGCChannelIdgetChannelOut (const TGCChannelId *, bool) const
 

Private Member Functions

 TGCCableSSWToROD (void)
 
virtual TGCModuleMapgetModuleIn (const TGCModuleId *rod) const
 
virtual TGCModuleMapgetModuleOut (const TGCModuleId *ssw) const
 

Private Attributes

TGCDatabasem_database
 
CableType m_type
 

Detailed Description

Definition at line 17 of file TGCCableSSWToROD.h.

Member Enumeration Documentation

◆ CableType

Enumerator
NoCableType 
InASD 
ASDToPP 
InPP 
PPToSLB 
InSLB 
SLBToHPB 
HPBToSL 
SLBToSSW 
SSWToROD 
MaxCableType 

Definition at line 18 of file TGCCable.h.

Constructor & Destructor Documentation

◆ TGCCableSSWToROD() [1/3]

MuonTGC_Cabling::TGCCableSSWToROD::TGCCableSSWToROD ( const std::string &  filename)

Definition at line 14 of file TGCCableSSWToROD.cxx.

16 {
17  m_database = new TGCDatabaseSLBToROD(filename,"SSW ALL");
18 }

◆ TGCCableSSWToROD() [2/3]

MuonTGC_Cabling::TGCCableSSWToROD::TGCCableSSWToROD ( const TGCCableSSWToROD right)

Definition at line 26 of file TGCCableSSWToROD.cxx.

28  m_database(nullptr)
29 {
30  TGCDatabaseSLBToROD* mypointer = dynamic_cast<TGCDatabaseSLBToROD*>(right.m_database);
31  if(mypointer) m_database = new TGCDatabaseSLBToROD(*mypointer);
32  else m_database = nullptr;
33 }

◆ ~TGCCableSSWToROD()

MuonTGC_Cabling::TGCCableSSWToROD::~TGCCableSSWToROD ( void  )
virtual

Definition at line 46 of file TGCCableSSWToROD.cxx.

47 {
48  delete m_database;
49 }

◆ TGCCableSSWToROD() [3/3]

MuonTGC_Cabling::TGCCableSSWToROD::TGCCableSSWToROD ( void  )
private

Definition at line 20 of file TGCCableSSWToROD.cxx.

22  m_database(nullptr)
23 {
24 }

Member Function Documentation

◆ getCableType()

CableType MuonTGC_Cabling::TGCCable::getCableType ( void  ) const
inlineinherited

Definition at line 30 of file TGCCable.h.

30 { return m_type; }

◆ getChannelIn()

virtual TGCChannelId* MuonTGC_Cabling::TGCCable::getChannelIn ( const TGCChannelId ,
bool   
) const
inlineprotectedvirtualinherited

◆ getChannelOut()

virtual TGCChannelId* MuonTGC_Cabling::TGCCable::getChannelOut ( const TGCChannelId ,
bool   
) const
inlineprotectedvirtualinherited

◆ getModule()

TGCModuleMap * MuonTGC_Cabling::TGCCableSSWToROD::getModule ( const TGCModuleId moduleId) const
virtual

Definition at line 52 of file TGCCableSSWToROD.cxx.

52  {
53  if(moduleId){
54  if(moduleId->getModuleIdType()==TGCModuleId::SSW)
55  return getModuleOut(moduleId);
56  if(moduleId->getModuleIdType()==TGCModuleId::ROD)
57  return getModuleIn(moduleId);
58  }
59  return nullptr;
60 }

◆ getModuleIn()

TGCModuleMap * MuonTGC_Cabling::TGCCableSSWToROD::getModuleIn ( const TGCModuleId rod) const
privatevirtual

Reimplemented from MuonTGC_Cabling::TGCCable.

Definition at line 62 of file TGCCableSSWToROD.cxx.

62  {
63  if(!rod->isValid()) return nullptr;
64 
65  const TGCId::SideType rodSideType = rod->getSideType();
66  const int rodReadoutSector = rod->getReadoutSector();
67 
68  TGCModuleMap* mapId = nullptr;
69  const int MaxEntry = m_database->getMaxEntry();
70  for(int i=0; i<MaxEntry; i++){
71  int id = m_database->getEntry(i,0);
72  int block = m_database->getEntry(i,1);
73  TGCModuleSSW* ssw = new TGCModuleSSW(rodSideType,
74  rodReadoutSector,
75  id);
76  if(mapId==nullptr) mapId = new TGCModuleMap();
77  mapId->insert(block,ssw);
78  }
79  return mapId;
80 }

◆ getModuleOut()

TGCModuleMap * MuonTGC_Cabling::TGCCableSSWToROD::getModuleOut ( const TGCModuleId ssw) const
privatevirtual

Reimplemented from MuonTGC_Cabling::TGCCable.

Definition at line 82 of file TGCCableSSWToROD.cxx.

82  {
83  if(!ssw->isValid()) return nullptr;
84 
85  const int sswId = ssw->getId();
86 
87  TGCModuleMap* mapId = nullptr;
88  const int MaxEntry = m_database->getMaxEntry();
89  for(int i=0; i<MaxEntry; i++){
90  if(m_database->getEntry(i,0)==sswId){
91  int block = m_database->getEntry(i,1);
92  TGCModuleROD* rod = new TGCModuleROD(ssw->getSideType(),
93  ssw->getReadoutSector());
94  mapId = new TGCModuleMap();
95  mapId->insert(block,rod);
96  break;
97  }
98  }
99  return mapId;
100 }

◆ operator=()

TGCCableSSWToROD & MuonTGC_Cabling::TGCCableSSWToROD::operator= ( const TGCCableSSWToROD right)

Definition at line 35 of file TGCCableSSWToROD.cxx.

36 {
37  if (this != &right) {
38  delete m_database;
39  TGCDatabaseSLBToROD* mypointer = dynamic_cast<TGCDatabaseSLBToROD*>(right.m_database);
40  if(mypointer) m_database = new TGCDatabaseSLBToROD(*mypointer);
41  else m_database = nullptr;
42  }
43  return *this;
44 }

Member Data Documentation

◆ m_database

TGCDatabase* MuonTGC_Cabling::TGCCableSSWToROD::m_database
private

Definition at line 33 of file TGCCableSSWToROD.h.

◆ m_type

CableType MuonTGC_Cabling::TGCCable::m_type
privateinherited

Definition at line 43 of file TGCCable.h.


The documentation for this class was generated from the following files:
MuonTGC_Cabling::TGCCableSSWToROD::getModuleOut
virtual TGCModuleMap * getModuleOut(const TGCModuleId *ssw) const
Definition: TGCCableSSWToROD.cxx:82
MuonTGC_Cabling::TGCCable::NoCableType
@ NoCableType
Definition: TGCCable.h:18
MuonTGC_Cabling::TGCCable::InASD
@ InASD
Definition: TGCCable.h:19
MuonTGC_Cabling::TGCModuleId::ROD
@ ROD
Definition: TGCModuleId.h:16
MuonTGC_Cabling::TGCCable::PPToSLB
@ PPToSLB
Definition: TGCCable.h:19
MuonTGC_Cabling::TGCCable::TGCCable
TGCCable(CableType type=NoCableType)
Definition: TGCCable.h:24
MuonTGC_Cabling::TGCModuleId::SSW
@ SSW
Definition: TGCModuleId.h:16
MuonTGC_Cabling::TGCCable::ASDToPP
@ ASDToPP
Definition: TGCCable.h:19
MuonTGC_Cabling::TGCDatabase::getEntry
virtual int getEntry(int entry, int column) const
Definition: TGCDatabase.cxx:28
MuonTGC_Cabling::TGCCable::InSLB
@ InSLB
Definition: TGCCable.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:85
MuonTGC_Cabling::TGCCable::MaxCableType
@ MaxCableType
Definition: TGCCable.h:21
MuonTGC_Cabling::TGCCable::m_type
CableType m_type
Definition: TGCCable.h:43
MuonTGC_Cabling::TGCDatabase::getMaxEntry
virtual int getMaxEntry(void) const
Definition: TGCDatabase.cxx:36
MuonTGC_Cabling::TGCCable::SLBToSSW
@ SLBToSSW
Definition: TGCCable.h:20
RunTileMonitoring.rod
rod
Definition: RunTileMonitoring.py:134
MuonTGC_Cabling::TGCCableSSWToROD::m_database
TGCDatabase * m_database
Definition: TGCCableSSWToROD.h:33
MuonTGC_Cabling::TGCCable::HPBToSL
@ HPBToSL
Definition: TGCCable.h:20
MuonTGC_Cabling::TGCCable::SSWToROD
@ SSWToROD
Definition: TGCCable.h:20
MuonTGC_Cabling::TGCCable::SLBToHPB
@ SLBToHPB
Definition: TGCCable.h:20
MuonTGC_Cabling::TGCCable::InPP
@ InPP
Definition: TGCCable.h:19
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
MuonTGC_Cabling::TGCId::SideType
SideType
Definition: TGCId.h:45
MuonTGC_Cabling::TGCCableSSWToROD::getModuleIn
virtual TGCModuleMap * getModuleIn(const TGCModuleId *rod) const
Definition: TGCCableSSWToROD.cxx:62