ATLAS Offline Software
Loading...
Searching...
No Matches
TGCBoardConnection.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TrigT1TGC_BoardConnection_H_
6#define TrigT1TGC_BoardConnection_H_
7
8#include <vector>
9#include <iostream>
10
11namespace LVL1TGCTrigger {
12
14 public:
16 virtual ~TGCBoardConnection();
17
20
21 inline int getNumberOfType() const { return m_id.size(); }
22 int getNumber(const unsigned int type) const;
23 int getId(const unsigned int type, const unsigned int board) const;
24
25 void setNumberOfType(int ntype);
26 void setNumber(const unsigned int type, int nBoard);
27 void setId(const unsigned int type, const unsigned int board, int idIn);
28
29 protected:
30 std::vector<std::vector<int>> m_id; // [type][board]
31};
32
33inline int TGCBoardConnection::getNumber(const unsigned int type) const {
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}
40
41inline int TGCBoardConnection::getId(const unsigned int type, const unsigned int board) const {
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}
49
50
51} //end of namespace bracket
52
53#endif // TrigT1TGC_BoardConnection_H_
void setId(const unsigned int type, const unsigned int board, int idIn)
int getId(const unsigned int type, const unsigned int board) const
TGCBoardConnection & operator=(const TGCBoardConnection &right)
void setNumber(const unsigned int type, int nBoard)
int getNumber(const unsigned int type) const
std::vector< std::vector< int > > m_id