ATLAS Offline Software
Loading...
Searching...
No Matches
TGCConnectionSBToHPB.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
10{
11 int j;
12 for( j=0; j<NumberOfSlaveBoardType; j+=1){
13 if(m_HPBPortToSB[j]!=0) delete [] m_HPBPortToSB[j];
14 m_HPBPortToSB[j]=0;
15
16 if(m_HPBIdToSB[j]!=0) delete [] m_HPBIdToSB[j];
17 m_HPBIdToSB[j]=0;
18 }
19}
20
22{
23 // NO HPB for Inner
25
26 int j;
27 for( j=0; j<NumberOfSlaveBoardType; j+=1){
28 m_HPBPortToSB[j]=0;
29 m_HPBIdToSB[j]=0;
30 }
31}
32
35{
36 int j;
37 for( j=0; j<NumberOfSlaveBoardType; j+=1){
38 if(m_HPBPortToSB[j]!=0) delete [] m_HPBPortToSB[j];
39 m_HPBPortToSB[j] = new int [m_id.at(j).size()];
40 if(m_HPBIdToSB[j]!=0) delete [] m_HPBIdToSB[j];
41 m_HPBIdToSB[j] = new int [m_id.at(j).size()];
42 for(unsigned int k=0; k < m_id.at(j).size(); k++) {
43 m_HPBPortToSB[j][k] = right.m_HPBPortToSB[j][k];
44 m_HPBIdToSB[j][k] = right.m_HPBIdToSB[j][k];
45 }
46 }
47}
48
50{
51 if(this!=&right){
52 TGCBoardConnection::operator=(right); // call base class assignment operator
53 int j;
54 for( j=0; j<NumberOfSlaveBoardType; j+=1){
55 if(m_HPBPortToSB[j]!=0) delete [] m_HPBPortToSB[j];
56 m_HPBPortToSB[j] = new int [m_id.at(j).size()];
57 if(m_HPBIdToSB[j]!=0) delete [] m_HPBIdToSB[j];
58 m_HPBIdToSB[j] = new int [m_id.at(j).size()];
59 for (unsigned int k=0; k<m_id.at(j).size(); k++) {
60 m_HPBPortToSB[j][k] = right.m_HPBPortToSB[j][k];
61 m_HPBIdToSB[j][k] = right.m_HPBIdToSB[j][k];
62 }
63 }
64 }
65 return *this;
66}
67
68} //end of namespace bracket
TGCBoardConnection & operator=(const TGCBoardConnection &right)
std::vector< std::vector< int > > m_id
TGCConnectionSBToHPB & operator=(const TGCConnectionSBToHPB &right)
int * m_HPBPortToSB[NumberOfSlaveBoardType]
int * m_HPBIdToSB[NumberOfSlaveBoardType]