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

#include <TGCConnectionHPBToSL.h>

Inheritance diagram for LVL1TGCTrigger::TGCConnectionHPBToSL:
Collaboration diagram for LVL1TGCTrigger::TGCConnectionHPBToSL:

Public Member Functions

 TGCConnectionHPBToSL ()
 
 TGCConnectionHPBToSL (const TGCConnectionHPBToSL &right)
 
virtual ~TGCConnectionHPBToSL ()
 
int getSLPortToHPB (int type, int index) const
 
void setSLPortToHPB (int type, int index, int port)
 
TGCConnectionHPBToSLoperator= (const TGCConnectionHPBToSL &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_SLPortToHPB [TGCSector::NumberOfHighPtBoardType]
 

Detailed Description

Definition at line 14 of file TGCConnectionHPBToSL.h.

Constructor & Destructor Documentation

◆ TGCConnectionHPBToSL() [1/2]

LVL1TGCTrigger::TGCConnectionHPBToSL::TGCConnectionHPBToSL ( )

Definition at line 10 of file TGCConnectionHPBToSL.cxx.

◆ TGCConnectionHPBToSL() [2/2]

LVL1TGCTrigger::TGCConnectionHPBToSL::TGCConnectionHPBToSL ( const TGCConnectionHPBToSL right)

Definition at line 17 of file TGCConnectionHPBToSL.cxx.

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 }

◆ ~TGCConnectionHPBToSL()

LVL1TGCTrigger::TGCConnectionHPBToSL::~TGCConnectionHPBToSL ( )
virtual

Definition at line 29 of file TGCConnectionHPBToSL.cxx.

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 }

Member Function Documentation

◆ 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(); }

◆ getSLPortToHPB()

int LVL1TGCTrigger::TGCConnectionHPBToSL::getSLPortToHPB ( int  type,
int  index 
) const
inline

Definition at line 31 of file TGCConnectionHPBToSL.h.

31  {
32  return m_SLPortToHPB[type][index];
33 }

◆ operator=()

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

Definition at line 37 of file TGCConnectionHPBToSL.cxx.

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 }

◆ 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 }

◆ setSLPortToHPB()

void LVL1TGCTrigger::TGCConnectionHPBToSL::setSLPortToHPB ( int  type,
int  index,
int  port 
)
inline

Definition at line 36 of file TGCConnectionHPBToSL.h.

36  {
37  if (m_SLPortToHPB[type] == 0) m_SLPortToHPB[type] = new int [m_id.at(type).size()];
38  m_SLPortToHPB[type][index] = port;
39 }

Member Data Documentation

◆ m_id

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

Definition at line 30 of file TGCBoardConnection.h.

◆ m_SLPortToHPB

int* LVL1TGCTrigger::TGCConnectionHPBToSL::m_SLPortToHPB[TGCSector::NumberOfHighPtBoardType]
private

Definition at line 27 of file TGCConnectionHPBToSL.h.


The documentation for this class was generated from the following files:
LVL1TGCTrigger::TGCBoardConnection::setNumberOfType
void setNumberOfType(int ntype)
Definition: TGCBoardConnection.cxx:20
LVL1TGCTrigger::TGCConnectionHPBToSL::m_SLPortToHPB
int * m_SLPortToHPB[TGCSector::NumberOfHighPtBoardType]
Definition: TGCConnectionHPBToSL.h:27
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
DeMoScan.index
string index
Definition: DeMoScan.py:362
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1TGCTrigger::TGCSector::NumberOfHighPtBoardType
@ NumberOfHighPtBoardType
Definition: TGCSector.h:34
fitman.k
k
Definition: fitman.py:528