ATLAS Offline Software
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 
7 namespace 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
24  setNumberOfType(4);
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 
34  TGCBoardConnection(right)
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
LVL1TGCTrigger::TGCBoardConnection::setNumberOfType
void setNumberOfType(int ntype)
Definition: TGCBoardConnection.cxx:20
LVL1TGCTrigger::TGCConnectionSBToHPB::m_HPBPortToSB
int * m_HPBPortToSB[NumberOfSlaveBoardType]
Definition: TGCConnectionSBToHPB.h:28
LVL1TGCTrigger::TGCConnectionSBToHPB::operator=
TGCConnectionSBToHPB & operator=(const TGCConnectionSBToHPB &right)
Definition: TGCConnectionSBToHPB.cxx:49
LVL1TGCTrigger::NumberOfSlaveBoardType
@ NumberOfSlaveBoardType
Definition: TGCNumbering.h:57
LVL1TGCTrigger::TGCBoardConnection::operator=
TGCBoardConnection & operator=(const TGCBoardConnection &right)
Definition: TGCBoardConnection.cxx:61
TGCConnectionSBToHPB.h
LVL1TGCTrigger::TGCBoardConnection
Definition: TGCBoardConnection.h:13
LVL1TGCTrigger::TGCConnectionSBToHPB::~TGCConnectionSBToHPB
virtual ~TGCConnectionSBToHPB()
Definition: TGCConnectionSBToHPB.cxx:9
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::TGCConnectionSBToHPB::m_HPBIdToSB
int * m_HPBIdToSB[NumberOfSlaveBoardType]
Definition: TGCConnectionSBToHPB.h:29
LVL1TGCTrigger
Definition: LVL1TGCTrigger.cxx:47
LVL1TGCTrigger::TGCConnectionSBToHPB
Definition: TGCConnectionSBToHPB.h:14
fitman.k
k
Definition: fitman.py:528
LVL1TGCTrigger::TGCConnectionSBToHPB::TGCConnectionSBToHPB
TGCConnectionSBToHPB()
Definition: TGCConnectionSBToHPB.cxx:21