ATLAS Offline Software
Loading...
Searching...
No Matches
TGCBoardConnection.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7namespace LVL1TGCTrigger {
8
12
14 for (unsigned int i=0; i<m_id.size(); i++){
15 m_id.at(i).clear();
16 }
17 m_id.clear();
18}
19
21 for (unsigned int i=0; i < m_id.size(); i++) {
22 m_id.at(i).clear();
23 }
24 m_id.resize(ntype);
25}
26
27void TGCBoardConnection::setNumber(const unsigned int type, int nBoard) {
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}
35
36void TGCBoardConnection::setId(const unsigned int type, const unsigned int board, int idIn) {
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}
50
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}
60
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}
73
74} // end of namespace
void setId(const unsigned int type, const unsigned int board, int idIn)
TGCBoardConnection & operator=(const TGCBoardConnection &right)
void setNumber(const unsigned int type, int nBoard)
std::vector< std::vector< int > > m_id