ATLAS Offline Software
Loading...
Searching...
No Matches
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
7namespace LVL1TGCTrigger {
8
9// default constructor
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
TGCBoardConnection & operator=(const TGCBoardConnection &right)
std::vector< std::vector< int > > m_id
TGCConnectionHPBToSL & operator=(const TGCConnectionHPBToSL &right)
std::array< int *, TGCSector::NumberOfHighPtBoardType > m_SLPortToHPB