Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
10 #include "TrigT1TGC/TGCNumbering.h"
11 #include <stdexcept>
12 
13 namespace LVL1TGCTrigger {
14 
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 
24  virtual ~TGCConnectionSBToHPB();
27 
28  private:
31 };
32 
33 inline
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
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
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
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 }
66 
67 } // end of namespace
68 
69 #endif // TrigT1TGC_ConnectionSBToHPB_H_
LVL1TGCTrigger::TGCConnectionSBToHPB::m_HPBPortToSB
int * m_HPBPortToSB[NumberOfSlaveBoardType]
Definition: TGCConnectionSBToHPB.h:29
LVL1TGCTrigger::TGCConnectionSBToHPB::operator=
TGCConnectionSBToHPB & operator=(const TGCConnectionSBToHPB &right)
Definition: TGCConnectionSBToHPB.cxx:49
LVL1TGCTrigger::NumberOfSlaveBoardType
@ NumberOfSlaveBoardType
Definition: TGCNumbering.h:57
index
Definition: index.py:1
LVL1TGCTrigger::TGCBoardConnection
Definition: TGCBoardConnection.h:13
LVL1TGCTrigger::TGCConnectionSBToHPB::~TGCConnectionSBToHPB
virtual ~TGCConnectionSBToHPB()
Definition: TGCConnectionSBToHPB.cxx:9
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
LVL1TGCTrigger::TGCConnectionSBToHPB::getHPBIdToSB
int getHPBIdToSB(int type, int index) const
Definition: TGCConnectionSBToHPB.h:51
LVL1TGCTrigger::TGCBoardConnection::m_id
std::vector< std::vector< int > > m_id
Definition: TGCBoardConnection.h:30
LVL1TGCTrigger::TGCConnectionSBToHPB::m_HPBIdToSB
int * m_HPBIdToSB[NumberOfSlaveBoardType]
Definition: TGCConnectionSBToHPB.h:30
LVL1TGCTrigger
Definition: LVL1TGCTrigger.cxx:47
LVL1TGCTrigger::TGCConnectionSBToHPB::getHPBPortToSB
int getHPBPortToSB(int type, int index) const
Definition: TGCConnectionSBToHPB.h:34
LVL1TGCTrigger::TGCConnectionSBToHPB::setHPBPortToSB
void setHPBPortToSB(int type, int index, int port)
Definition: TGCConnectionSBToHPB.h:42
LVL1TGCTrigger::TGCConnectionSBToHPB
Definition: TGCConnectionSBToHPB.h:15
TGCBoardConnection.h
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
TGCNumbering.h
LVL1TGCTrigger::TGCConnectionSBToHPB::setHPBIdToSB
void setHPBIdToSB(int type, int index, int id)
Definition: TGCConnectionSBToHPB.h:59
DeMoScan.index
string index
Definition: DeMoScan.py:364
LVL1TGCTrigger::TGCConnectionSBToHPB::TGCConnectionSBToHPB
TGCConnectionSBToHPB()
Definition: TGCConnectionSBToHPB.cxx:21