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

#include <TGCCableHPBToSL.h>

Inheritance diagram for MuonTGC_Cabling::TGCCableHPBToSL:
Collaboration diagram for MuonTGC_Cabling::TGCCableHPBToSL:

Public Types

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

Public Member Functions

 TGCCableHPBToSL (const std::string &filename)
 
virtual ~TGCCableHPBToSL ()=default
 
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

 TGCCableHPBToSL (void)
 
virtual TGCModuleMapgetModuleIn (const TGCModuleId *sl) const
 
virtual TGCModuleMapgetModuleOut (const TGCModuleId *hpt) const
 

Private Attributes

std::array< std::array< std::unique_ptr< TGCDatabase >, TGCId::MaxSignalType >, TGCId::MaxRegionTypem_database {}
 
CableType m_type
 

Detailed Description

Definition at line 20 of file TGCCableHPBToSL.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

◆ TGCCableHPBToSL() [1/2]

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

Definition at line 13 of file TGCCableHPBToSL.cxx.

15  m_database[TGCId::Endcap][TGCId::Wire] = std::make_unique<TGCDatabasePPToSL>(filename,"HPB EW");
16  m_database[TGCId::Endcap][TGCId::Strip] = std::make_unique<TGCDatabasePPToSL>(filename,"HPB ES");
17  m_database[TGCId::Forward][TGCId::Wire] = std::make_unique<TGCDatabasePPToSL>(filename,"HPB FW");
18  m_database[TGCId::Forward][TGCId::Strip] = std::make_unique<TGCDatabasePPToSL>(filename,"HPB FS");
19 }

◆ ~TGCCableHPBToSL()

virtual MuonTGC_Cabling::TGCCableHPBToSL::~TGCCableHPBToSL ( )
virtualdefault

◆ TGCCableHPBToSL() [2/2]

MuonTGC_Cabling::TGCCableHPBToSL::TGCCableHPBToSL ( void  )
inlineprivate

Definition at line 28 of file TGCCableHPBToSL.h.

28 {}

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::TGCCableHPBToSL::getModule ( const TGCModuleId moduleId) const
virtual

Definition at line 21 of file TGCCableHPBToSL.cxx.

21  {
22  if(moduleId){
23  if(moduleId->getModuleIdType()==TGCModuleId::HPB)
24  return getModuleOut(moduleId);
25  if(moduleId->getModuleIdType()==TGCModuleId::SL)
26  return getModuleIn(moduleId);
27  }
28  return nullptr;
29 }

◆ getModuleIn()

TGCModuleMap * MuonTGC_Cabling::TGCCableHPBToSL::getModuleIn ( const TGCModuleId sl) const
privatevirtual

Reimplemented from MuonTGC_Cabling::TGCCable.

Definition at line 31 of file TGCCableHPBToSL.cxx.

31  {
32  if(sl->isValid()==false) return nullptr;
33 
34  TGCDatabase* wireP = m_database[sl->getRegionType()][TGCId::Wire].get();
35  TGCDatabase* stripP = m_database[sl->getRegionType()][TGCId::Strip].get();
36 
37  TGCModuleMap* mapId = nullptr;
38  const int wireMaxEntry = wireP->getMaxEntry();
39  for(int i=0; i<wireMaxEntry; i++){
40  int id = wireP->getEntry(i,0);
41  int block = wireP->getEntry(i,1);
42  TGCModuleHPB* hpb = new TGCModuleHPB(sl->getSideType(),
44  sl->getRegionType(),
45  sl->getSector(),
46  id);
47  if(mapId==nullptr) mapId = new TGCModuleMap();
48  mapId->insert(block,hpb);
49  }
50 
51  const int stripMaxEntry = stripP->getMaxEntry();
52  for(int i=0; i<stripMaxEntry; i++){
53  int id = stripP->getEntry(i,0);
54  int block = stripP->getEntry(i,1);
55  TGCModuleHPB* hpb = new TGCModuleHPB(sl->getSideType(),
57  sl->getRegionType(),
58  sl->getSector(),
59  id);
60  if(mapId==nullptr) mapId = new TGCModuleMap();
61  mapId->insert(block,hpb);
62  }
63 
64  return mapId;
65 }

◆ getModuleOut()

TGCModuleMap * MuonTGC_Cabling::TGCCableHPBToSL::getModuleOut ( const TGCModuleId hpt) const
privatevirtual

Reimplemented from MuonTGC_Cabling::TGCCable.

Definition at line 67 of file TGCCableHPBToSL.cxx.

67  {
68  if(hpb->isValid()==false) return nullptr;
69 
70  const int hpbId = hpb->getId();
71 
72  TGCDatabase* databaseP = m_database[hpb->getRegionType()][hpb->getSignalType()].get();
73 
74  TGCModuleMap* mapId = nullptr;
75  const int MaxEntry = databaseP->getMaxEntry();
76  for(int i=0; i<MaxEntry; i++){
77  if(databaseP->getEntry(i,0)==hpbId)
78  {
79  int block = databaseP->getEntry(i,1);
80  TGCModuleSL* sl = new TGCModuleSL(hpb->getSideType(),
81  hpb->getRegionType(),
82  hpb->getSector());
83 
84  mapId = new TGCModuleMap();
85  mapId->insert(block,sl);
86  break;
87  }
88  }
89 
90  return mapId;
91 }

Member Data Documentation

◆ m_database

std::array<std::array<std::unique_ptr<TGCDatabase>, TGCId::MaxSignalType>, TGCId::MaxRegionType> MuonTGC_Cabling::TGCCableHPBToSL::m_database {}
private

Definition at line 31 of file TGCCableHPBToSL.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::TGCCable::NoCableType
@ NoCableType
Definition: TGCCable.h:18
MuonTGC_Cabling::TGCCable::InASD
@ InASD
Definition: TGCCable.h:19
MuonTGC_Cabling::TGCCable::PPToSLB
@ PPToSLB
Definition: TGCCable.h:19
MuonTGC_Cabling::TGCCable::TGCCable
TGCCable(CableType type=NoCableType)
Definition: TGCCable.h:24
MuonTGC_Cabling::TGCCableHPBToSL::getModuleIn
virtual TGCModuleMap * getModuleIn(const TGCModuleId *sl) const
Definition: TGCCableHPBToSL.cxx:31
MuonTGC_Cabling::TGCCableHPBToSL::m_database
std::array< std::array< std::unique_ptr< TGCDatabase >, TGCId::MaxSignalType >, TGCId::MaxRegionType > m_database
Definition: TGCCableHPBToSL.h:31
MuonTGC_Cabling::TGCCable::ASDToPP
@ ASDToPP
Definition: TGCCable.h:19
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::TGCId::Strip
@ Strip
Definition: TGCId.h:49
MuonTGC_Cabling::TGCCableHPBToSL::getModuleOut
virtual TGCModuleMap * getModuleOut(const TGCModuleId *hpt) const
Definition: TGCCableHPBToSL.cxx:67
MuonTGC_Cabling::TGCCable::SLBToSSW
@ SLBToSSW
Definition: TGCCable.h:20
MuonTGC_Cabling::TGCModuleId::SL
@ SL
Definition: TGCModuleId.h:16
MuonTGC_Cabling::TGCId::Endcap
@ Endcap
Definition: TGCId.h:53
MuonTGC_Cabling::TGCModuleId::HPB
@ HPB
Definition: TGCModuleId.h:16
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::Wire
@ Wire
Definition: TGCId.h:49
MuonTGC_Cabling::TGCId::Forward
@ Forward
Definition: TGCId.h:53