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

#include <TGCBoardConnection.h>

Inheritance diagram for LVL1TGCTrigger::TGCBoardConnection:
Collaboration diagram for LVL1TGCTrigger::TGCBoardConnection:

Public Member Functions

 TGCBoardConnection ()
 
virtual ~TGCBoardConnection ()
 
 TGCBoardConnection (const TGCBoardConnection &right)
 
TGCBoardConnectionoperator= (const TGCBoardConnection &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
 

Detailed Description

Definition at line 13 of file TGCBoardConnection.h.

Constructor & Destructor Documentation

◆ TGCBoardConnection() [1/2]

LVL1TGCTrigger::TGCBoardConnection::TGCBoardConnection ( )

Definition at line 9 of file TGCBoardConnection.cxx.

9  {
10  m_id.clear();
11 }

◆ ~TGCBoardConnection()

LVL1TGCTrigger::TGCBoardConnection::~TGCBoardConnection ( )
virtual

Definition at line 13 of file TGCBoardConnection.cxx.

13  {
14  for (unsigned int i=0; i<m_id.size(); i++){
15  m_id.at(i).clear();
16  }
17  m_id.clear();
18 }

◆ TGCBoardConnection() [2/2]

LVL1TGCTrigger::TGCBoardConnection::TGCBoardConnection ( const TGCBoardConnection right)

Definition at line 51 of file TGCBoardConnection.cxx.

51  {
52  m_id.resize(right.m_id.size());
53  for (unsigned int i=0; i < m_id.size(); i++) {
54  m_id.at(i).resize(right.m_id.at(i).size());
55  for (unsigned int j=0; j < m_id.at(i).size(); j++) {
56  m_id.at(i).at(j) = right.m_id.at(i).at(j);
57  }
58  }
59 }

Member Function Documentation

◆ getId()

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

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
inline

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
inline

Definition at line 21 of file TGCBoardConnection.h.

21 { return m_id.size(); }

◆ operator=()

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

Definition at line 61 of file TGCBoardConnection.cxx.

61  {
62  if (this != &right) {
63  m_id.resize(right.m_id.size());
64  for (unsigned int i=0; i < m_id.size(); i++) {
65  m_id.at(i).resize(right.m_id.at(i).size());
66  for (unsigned int j=0; j < m_id.at(i).size(); j++) {
67  m_id.at(i).at(j) = right.m_id.at(i).at(j);
68  }
69  }
70  }
71  return *this;
72 }

◆ setId()

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

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 
)

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)

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_id

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

Definition at line 30 of file TGCBoardConnection.h.


The documentation for this class was generated from the following files:
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
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78