ATLAS Offline Software
Loading...
Searching...
No Matches
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

std::array< int *, TGCSector::NumberOfHighPtBoardTypem_SLPortToHPB {}

Detailed Description

Definition at line 15 of file TGCConnectionHPBToSL.h.

Constructor & Destructor Documentation

◆ TGCConnectionHPBToSL() [1/2]

LVL1TGCTrigger::TGCConnectionHPBToSL::TGCConnectionHPBToSL ( )

Definition at line 10 of file TGCConnectionHPBToSL.cxx.

11{
13 for(int j=0; j<TGCSector::NumberOfHighPtBoardType; j++) m_SLPortToHPB[j]=0;
14}
std::array< int *, TGCSector::NumberOfHighPtBoardType > m_SLPortToHPB

◆ 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}
std::vector< std::vector< int > > m_id

◆ ~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 32 of file TGCConnectionHPBToSL.h.

◆ 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}
TGCBoardConnection & operator=(const TGCBoardConnection &right)

◆ 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 37 of file TGCConnectionHPBToSL.h.

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

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

std::array<int*, TGCSector::NumberOfHighPtBoardType> LVL1TGCTrigger::TGCConnectionHPBToSL::m_SLPortToHPB {}
private

Definition at line 28 of file TGCConnectionHPBToSL.h.

28{};

The documentation for this class was generated from the following files: