ATLAS Offline Software
TGCConnectionHPBToSL.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace LVL1TGCTrigger {
8 
9 // default constructor
11 {
13  for(int j=0; j<TGCSector::NumberOfHighPtBoardType; j++) m_SLPortToHPB[j]=0;
14 }
15 
16 // Copy constructor
18  : TGCBoardConnection(right)
19 {
20  for(int j=0; j<TGCSector::NumberOfHighPtBoardType; j++) {
21  if(m_SLPortToHPB[j]!=0) delete [] m_SLPortToHPB[j];
22  m_SLPortToHPB[j] = new int [m_id.at(j).size()];
23 
24  for (unsigned int k=0; k < m_id.at(j).size(); k++) m_SLPortToHPB[j][k] = right.m_SLPortToHPB[j][k];
25  }
26 }
27 
28 
30 {
31  for(int j=0; j<TGCSector::NumberOfHighPtBoardType; j++) {
32  if(m_SLPortToHPB[j]!=0) delete [] m_SLPortToHPB[j];
33  m_SLPortToHPB[j]=0;
34  }
35 }
36 
38 {
39  if(this!=&right){
40  TGCBoardConnection::operator=(right); // call base class assignment operator
41  for(int j=0; j<TGCSector::NumberOfHighPtBoardType; j+=1){
42  if(m_SLPortToHPB[j]!=0) delete [] m_SLPortToHPB[j];
43  m_SLPortToHPB[j] = new int [m_id.at(j).size()];
44  for (unsigned int k=0; k < m_id.at(j).size(); k++)
45  m_SLPortToHPB[j][k] = right.m_SLPortToHPB[j][k];
46  }
47  }
48  return *this;
49 }
50 
51 } //end of namespace bracket
LVL1TGCTrigger::TGCBoardConnection::setNumberOfType
void setNumberOfType(int ntype)
Definition: TGCBoardConnection.cxx:20
LVL1TGCTrigger::TGCConnectionHPBToSL::TGCConnectionHPBToSL
TGCConnectionHPBToSL()
Definition: TGCConnectionHPBToSL.cxx:10
LVL1TGCTrigger::TGCConnectionHPBToSL::m_SLPortToHPB
int * m_SLPortToHPB[TGCSector::NumberOfHighPtBoardType]
Definition: TGCConnectionHPBToSL.h:27
TGCConnectionHPBToSL.h
LVL1TGCTrigger::TGCConnectionHPBToSL::operator=
TGCConnectionHPBToSL & operator=(const TGCConnectionHPBToSL &right)
Definition: TGCConnectionHPBToSL.cxx:37
LVL1TGCTrigger::TGCBoardConnection::operator=
TGCBoardConnection & operator=(const TGCBoardConnection &right)
Definition: TGCBoardConnection.cxx:61
LVL1TGCTrigger::TGCConnectionHPBToSL::~TGCConnectionHPBToSL
virtual ~TGCConnectionHPBToSL()
Definition: TGCConnectionHPBToSL.cxx:29
LVL1TGCTrigger::TGCBoardConnection
Definition: TGCBoardConnection.h:13
LVL1TGCTrigger::TGCConnectionHPBToSL
Definition: TGCConnectionHPBToSL.h:15
LVL1TGCTrigger::TGCBoardConnection::m_id
std::vector< std::vector< int > > m_id
Definition: TGCBoardConnection.h:30
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
LVL1TGCTrigger
Definition: LVL1TGCTrigger.cxx:47
LVL1TGCTrigger::TGCSector::NumberOfHighPtBoardType
@ NumberOfHighPtBoardType
Definition: TGCSector.h:34
fitman.k
k
Definition: fitman.py:528