ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Attributes | List of all members
LVL1TGCTrigger::TGCConnectionSBToHPB Class Reference

#include <TGCConnectionSBToHPB.h>

Inheritance diagram for LVL1TGCTrigger::TGCConnectionSBToHPB:
Collaboration diagram for LVL1TGCTrigger::TGCConnectionSBToHPB:

Public Member Functions

int getHPBPortToSB (int type, int index) const
 
void setHPBPortToSB (int type, int index, int port)
 
int getHPBIdToSB (int type, int index) const
 
void setHPBIdToSB (int type, int index, int id)
 
 TGCConnectionSBToHPB ()
 
virtual ~TGCConnectionSBToHPB ()
 
 TGCConnectionSBToHPB (const TGCConnectionSBToHPB &right)
 
TGCConnectionSBToHPBoperator= (const TGCConnectionSBToHPB &right)
 
int getNumberOfType () const
 
int getNumber (const unsigned int type) const
 
int getId (const unsigned int type, const unsigned int board) const
 
void setNumberOfType (int ntype)
 
void setNumber (const unsigned int type, int nBoard)
 
void setId (const unsigned int type, const unsigned int board, int idIn)
 

Protected Attributes

std::vector< std::vector< int > > m_id
 

Private Attributes

int * m_HPBPortToSB [NumberOfSlaveBoardType]
 
int * m_HPBIdToSB [NumberOfSlaveBoardType]
 

Detailed Description

Definition at line 14 of file TGCConnectionSBToHPB.h.

Constructor & Destructor Documentation

◆ TGCConnectionSBToHPB() [1/2]

LVL1TGCTrigger::TGCConnectionSBToHPB::TGCConnectionSBToHPB ( )

Definition at line 21 of file TGCConnectionSBToHPB.cxx.

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 }

◆ ~TGCConnectionSBToHPB()

LVL1TGCTrigger::TGCConnectionSBToHPB::~TGCConnectionSBToHPB ( )
virtual

Definition at line 9 of file TGCConnectionSBToHPB.cxx.

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 }

◆ TGCConnectionSBToHPB() [2/2]

LVL1TGCTrigger::TGCConnectionSBToHPB::TGCConnectionSBToHPB ( const TGCConnectionSBToHPB right)

Definition at line 33 of file TGCConnectionSBToHPB.cxx.

33  :
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 }

Member Function Documentation

◆ getHPBIdToSB()

int LVL1TGCTrigger::TGCConnectionSBToHPB::getHPBIdToSB ( int  type,
int  index 
) const
inline

Definition at line 44 of file TGCConnectionSBToHPB.h.

44  {
45  return m_HPBIdToSB[type][index];
46 }

◆ getHPBPortToSB()

int LVL1TGCTrigger::TGCConnectionSBToHPB::getHPBPortToSB ( int  type,
int  index 
) const
inline

Definition at line 33 of file TGCConnectionSBToHPB.h.

33  {
34  return m_HPBPortToSB[type][index];
35 }

◆ getId()

int LVL1TGCTrigger::TGCBoardConnection::getId ( const unsigned int  type,
const unsigned int  board 
) const
inlineinherited

Definition at line 41 of file TGCBoardConnection.h.

41  {
42  if (m_id.size() <= type ||
43  m_id.at(type).size() <= board) {
44  std::cerr << "TGCBoardConnection::getId : Undefined board is provided" << std::endl;
45  return -1;
46  }
47  return m_id.at(type).at(board);
48 }

◆ getNumber()

int LVL1TGCTrigger::TGCBoardConnection::getNumber ( const unsigned int  type) const
inlineinherited

Definition at line 33 of file TGCBoardConnection.h.

33  {
34  if (m_id.size() <= type) {
35  std::cerr << "TGCBoardConnection::getNumber : No defined type provided" << std::endl;
36  return -1;
37  }
38  return m_id.at(type).size();
39 }

◆ getNumberOfType()

int LVL1TGCTrigger::TGCBoardConnection::getNumberOfType ( ) const
inlineinherited

Definition at line 21 of file TGCBoardConnection.h.

21 { return m_id.size(); }

◆ operator=()

TGCConnectionSBToHPB & LVL1TGCTrigger::TGCConnectionSBToHPB::operator= ( const TGCConnectionSBToHPB right)

Definition at line 49 of file TGCConnectionSBToHPB.cxx.

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 }

◆ setHPBIdToSB()

void LVL1TGCTrigger::TGCConnectionSBToHPB::setHPBIdToSB ( int  type,
int  index,
int  id 
)
inline

Definition at line 49 of file TGCConnectionSBToHPB.h.

49  {
50  if(m_HPBIdToSB[type]==0) m_HPBIdToSB[type] = new int [m_id.at(type).size()];
52 }

◆ setHPBPortToSB()

void LVL1TGCTrigger::TGCConnectionSBToHPB::setHPBPortToSB ( int  type,
int  index,
int  port 
)
inline

Definition at line 38 of file TGCConnectionSBToHPB.h.

38  {
39  if(m_HPBPortToSB[type]==0) m_HPBPortToSB[type] = new int [m_id.at(type).size()];
40  m_HPBPortToSB[type][index] = port;
41 }

◆ setId()

void LVL1TGCTrigger::TGCBoardConnection::setId ( const unsigned int  type,
const unsigned int  board,
int  idIn 
)
inherited

Definition at line 36 of file TGCBoardConnection.cxx.

36  {
37  if (type < m_id.size()) {
38  if (board < m_id.at(type).size()) {
39  m_id.at(type).at(board) = idIn;
40  } else {
41  m_id.at(type).resize(board+1);
42  m_id.at(type).at(board) = idIn;
43  }
44  } else {
45  m_id.resize(type+1);
46  m_id.at(type).resize(board+1);
47  m_id.at(type).at(board) = idIn;
48  }
49 }

◆ setNumber()

void LVL1TGCTrigger::TGCBoardConnection::setNumber ( const unsigned int  type,
int  nBoard 
)
inherited

Definition at line 27 of file TGCBoardConnection.cxx.

27  {
28  if (type < m_id.size()) {
29  m_id.at(type).resize(nBoard);
30  } else {
31  m_id.resize(type+1);
32  m_id.at(type).resize(nBoard);
33  }
34 }

◆ setNumberOfType()

void LVL1TGCTrigger::TGCBoardConnection::setNumberOfType ( int  ntype)
inherited

Definition at line 20 of file TGCBoardConnection.cxx.

20  {
21  for (unsigned int i=0; i < m_id.size(); i++) {
22  m_id.at(i).clear();
23  }
24  m_id.resize(ntype);
25 }

Member Data Documentation

◆ m_HPBIdToSB

int* LVL1TGCTrigger::TGCConnectionSBToHPB::m_HPBIdToSB[NumberOfSlaveBoardType]
private

Definition at line 29 of file TGCConnectionSBToHPB.h.

◆ m_HPBPortToSB

int* LVL1TGCTrigger::TGCConnectionSBToHPB::m_HPBPortToSB[NumberOfSlaveBoardType]
private

Definition at line 28 of file TGCConnectionSBToHPB.h.

◆ m_id

std::vector<std::vector<int> > LVL1TGCTrigger::TGCBoardConnection::m_id
protectedinherited

Definition at line 30 of file TGCBoardConnection.h.


The documentation for this class was generated from the following files:
LVL1TGCTrigger::TGCBoardConnection::setNumberOfType
void setNumberOfType(int ntype)
Definition: TGCBoardConnection.cxx:20
LVL1TGCTrigger::TGCConnectionSBToHPB::m_HPBPortToSB
int * m_HPBPortToSB[NumberOfSlaveBoardType]
Definition: TGCConnectionSBToHPB.h:28
LVL1TGCTrigger::NumberOfSlaveBoardType
@ NumberOfSlaveBoardType
Definition: TGCNumbering.h:57
LVL1TGCTrigger::TGCBoardConnection::operator=
TGCBoardConnection & operator=(const TGCBoardConnection &right)
Definition: TGCBoardConnection.cxx:61
LVL1TGCTrigger::TGCBoardConnection::TGCBoardConnection
TGCBoardConnection()
Definition: TGCBoardConnection.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
lumiFormat.i
int i
Definition: lumiFormat.py:92
LVL1TGCTrigger::TGCConnectionSBToHPB::m_HPBIdToSB
int * m_HPBIdToSB[NumberOfSlaveBoardType]
Definition: TGCConnectionSBToHPB.h:29
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
DeMoScan.index
string index
Definition: DeMoScan.py:362
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
fitman.k
k
Definition: fitman.py:528