ATLAS Offline Software
Loading...
Searching...
No Matches
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 15 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
25
26 int j;
27 for( j=0; j<NumberOfSlaveBoardType; j+=1){
28 m_HPBPortToSB[j]=0;
29 m_HPBIdToSB[j]=0;
30 }
31}
int * m_HPBPortToSB[NumberOfSlaveBoardType]
int * m_HPBIdToSB[NumberOfSlaveBoardType]

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

Member Function Documentation

◆ getHPBIdToSB()

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

Definition at line 51 of file TGCConnectionSBToHPB.h.

51 {
52 if (type<0 or type >=TGCSlaveBoardType::NumberOfSlaveBoardType) {
53 throw std::out_of_range("TGCConnectionSBToHPB::getHPBIdToSB: type out of range");
54 }
55 return m_HPBIdToSB[type][index];
56}
str index
Definition DeMoScan.py:362

◆ getHPBPortToSB()

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

Definition at line 34 of file TGCConnectionSBToHPB.h.

34 {
35 if (type<0 or type >=TGCSlaveBoardType::NumberOfSlaveBoardType) {
36 throw std::out_of_range("TGCConnectionSBToHPB::getHPBPortToSB: type out of range");
37 }
38 return m_HPBPortToSB[type][index];
39}

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

◆ setHPBIdToSB()

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

Definition at line 59 of file TGCConnectionSBToHPB.h.

59 {
60 if (type<0 or type >=TGCSlaveBoardType::NumberOfSlaveBoardType) {
61 throw std::out_of_range("TGCConnectionSBToHPB::setHPBIdToSB: type out of range");
62 }
63 if(m_HPBIdToSB[type]==0) m_HPBIdToSB[type] = new int [m_id.at(type).size()];
65}

◆ setHPBPortToSB()

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

Definition at line 42 of file TGCConnectionSBToHPB.h.

42 {
43 if (type<0 or type >=TGCSlaveBoardType::NumberOfSlaveBoardType) {
44 throw std::out_of_range("TGCConnectionSBToHPB::setHPBPortToSB: type out of range");
45 }
46 if(m_HPBPortToSB[type]==0) m_HPBPortToSB[type] = new int [m_id.at(type).size()];
47 m_HPBPortToSB[type][index] = port;
48}

◆ 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 30 of file TGCConnectionSBToHPB.h.

30{};

◆ m_HPBPortToSB

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

Definition at line 29 of file TGCConnectionSBToHPB.h.

29{};

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