ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1TGC
TrigT1TGC
TGCConnectionSBToHPB.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// Table of connection between Slave Board and High-Pt Board.
6
#ifndef TrigT1TGC_ConnectionSBToHPB_H_
7
#define TrigT1TGC_ConnectionSBToHPB_H_
8
9
#include "
TrigT1TGC/TGCBoardConnection.h
"
10
#include "
TrigT1TGC/TGCNumbering.h
"
11
#include <stdexcept>
12
13
namespace
LVL1TGCTrigger
{
14
15
class
TGCConnectionSBToHPB
:
public
TGCBoardConnection
{
16
public
:
17
int
getHPBPortToSB
(
int
type
,
int
index
)
const
;
18
void
setHPBPortToSB
(
int
type
,
int
index
,
int
port);
19
20
int
getHPBIdToSB
(
int
type
,
int
index
)
const
;
21
void
setHPBIdToSB
(
int
type
,
int
index
,
int
id
);
22
23
TGCConnectionSBToHPB
();
24
virtual
~TGCConnectionSBToHPB
();
25
TGCConnectionSBToHPB
(
const
TGCConnectionSBToHPB
& right);
26
TGCConnectionSBToHPB
&
operator=
(
const
TGCConnectionSBToHPB
& right);
27
28
private
:
29
int
*
m_HPBPortToSB
[
NumberOfSlaveBoardType
]{};
30
int
*
m_HPBIdToSB
[
NumberOfSlaveBoardType
]{};
31
};
32
33
inline
34
int
TGCConnectionSBToHPB::getHPBPortToSB
(
int
type
,
int
index
)
const
{
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
}
40
41
inline
42
void
TGCConnectionSBToHPB::setHPBPortToSB
(
int
type
,
int
index
,
int
port) {
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
}
49
50
inline
51
int
TGCConnectionSBToHPB::getHPBIdToSB
(
int
type
,
int
index
)
const
{
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
}
57
58
inline
59
void
TGCConnectionSBToHPB::setHPBIdToSB
(
int
type
,
int
index
,
int
id
) {
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()];
64
m_HPBIdToSB
[
type
][
index
] = id;
65
}
66
67
}
// end of namespace
68
69
#endif
// TrigT1TGC_ConnectionSBToHPB_H_
TGCBoardConnection.h
TGCNumbering.h
LVL1TGCTrigger::TGCBoardConnection::TGCBoardConnection
TGCBoardConnection()
Definition
TGCBoardConnection.cxx:9
LVL1TGCTrigger::TGCBoardConnection::m_id
std::vector< std::vector< int > > m_id
Definition
TGCBoardConnection.h:30
LVL1TGCTrigger::TGCConnectionSBToHPB::setHPBPortToSB
void setHPBPortToSB(int type, int index, int port)
Definition
TGCConnectionSBToHPB.h:42
LVL1TGCTrigger::TGCConnectionSBToHPB::getHPBPortToSB
int getHPBPortToSB(int type, int index) const
Definition
TGCConnectionSBToHPB.h:34
LVL1TGCTrigger::TGCConnectionSBToHPB::setHPBIdToSB
void setHPBIdToSB(int type, int index, int id)
Definition
TGCConnectionSBToHPB.h:59
LVL1TGCTrigger::TGCConnectionSBToHPB::operator=
TGCConnectionSBToHPB & operator=(const TGCConnectionSBToHPB &right)
Definition
TGCConnectionSBToHPB.cxx:49
LVL1TGCTrigger::TGCConnectionSBToHPB::getHPBIdToSB
int getHPBIdToSB(int type, int index) const
Definition
TGCConnectionSBToHPB.h:51
LVL1TGCTrigger::TGCConnectionSBToHPB::m_HPBPortToSB
int * m_HPBPortToSB[NumberOfSlaveBoardType]
Definition
TGCConnectionSBToHPB.h:29
LVL1TGCTrigger::TGCConnectionSBToHPB::m_HPBIdToSB
int * m_HPBIdToSB[NumberOfSlaveBoardType]
Definition
TGCConnectionSBToHPB.h:30
LVL1TGCTrigger::TGCConnectionSBToHPB::TGCConnectionSBToHPB
TGCConnectionSBToHPB()
Definition
TGCConnectionSBToHPB.cxx:21
LVL1TGCTrigger::TGCConnectionSBToHPB::~TGCConnectionSBToHPB
virtual ~TGCConnectionSBToHPB()
Definition
TGCConnectionSBToHPB.cxx:9
LVL1TGCTrigger
Definition
LVL1TGCTrigger.cxx:48
LVL1TGCTrigger::NumberOfSlaveBoardType
@ NumberOfSlaveBoardType
Definition
TGCNumbering.h:57
index
Definition
index.py:1
type
Generated on
for ATLAS Offline Software by
1.17.0