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

#include <TGCConnectionPPToSB.h>

Inheritance diagram for LVL1TGCTrigger::TGCConnectionPPToSB:
Collaboration diagram for LVL1TGCTrigger::TGCConnectionPPToSB:

Public Member Functions

int getSBIdToPP (int type, int port, int index) const
 
void setSBIdToPP (int type, int port, int index, int idIn)
 
 TGCConnectionPPToSB ()
 
 ~TGCConnectionPPToSB ()
 
 TGCConnectionPPToSB (const TGCConnectionPPToSB &right)
 
TGCConnectionPPToSBoperator= (const TGCConnectionPPToSB &right)
 
int getNumberOfPort () const
 
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
 

Private Attributes

int * m_SBIdToPP [N_PP_PORTS][TGCSector::NumberOfPatchPanelType]
 

Static Private Attributes

static constexpr int N_PP_PORTS = 2
 

Detailed Description

Definition at line 14 of file TGCConnectionPPToSB.h.

Constructor & Destructor Documentation

◆ TGCConnectionPPToSB() [1/2]

LVL1TGCTrigger::TGCConnectionPPToSB::TGCConnectionPPToSB ( )

Definition at line 19 of file TGCConnectionPPToSB.cxx.

20 {
22  for(int i=0; i < N_PP_PORTS; i+=1)
23  for(int j=0; j < TGCSector::NumberOfPatchPanelType; j+=1)
24  m_SBIdToPP[i][j]=0;
25 }

◆ ~TGCConnectionPPToSB()

LVL1TGCTrigger::TGCConnectionPPToSB::~TGCConnectionPPToSB ( )

Definition at line 9 of file TGCConnectionPPToSB.cxx.

10 {
11  for (int i=0; i < N_PP_PORTS; i++) {
12  for (int j=0; j<TGCSector::NumberOfPatchPanelType; j+=1){
13  if (m_SBIdToPP[i][j]!=0) delete [] m_SBIdToPP[i][j];
14  m_SBIdToPP[i][j]=0;
15  }
16  }
17 }

◆ TGCConnectionPPToSB() [2/2]

LVL1TGCTrigger::TGCConnectionPPToSB::TGCConnectionPPToSB ( const TGCConnectionPPToSB right)

Definition at line 27 of file TGCConnectionPPToSB.cxx.

27  :
28  TGCBoardConnection(right)
29 {
30  for (int i=0; i < N_PP_PORTS; i+=1) {
31  for (int j=0; j<TGCSector::NumberOfPatchPanelType; j+=1){
32  if(m_SBIdToPP[i][j]!=0) delete [] m_SBIdToPP[i][j];
33  m_SBIdToPP[i][j] = new int [m_id.at(j).size()];
34  for(unsigned int k=0; k < m_id.at(j).size(); k++)
35  m_SBIdToPP[i][j][k] = right.m_SBIdToPP[i][j][k];
36  }
37  }
38 }

Member Function Documentation

◆ getId()

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

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
inlineinherited

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 }

◆ getNumberOfPort()

int LVL1TGCTrigger::TGCConnectionPPToSB::getNumberOfPort ( ) const
inline

Definition at line 26 of file TGCConnectionPPToSB.h.

26 { return N_PP_PORTS; }

◆ getNumberOfType()

int LVL1TGCTrigger::TGCBoardConnection::getNumberOfType ( ) const
inlineinherited

Definition at line 21 of file TGCBoardConnection.h.

21 { return m_id.size(); }

◆ getSBIdToPP()

int LVL1TGCTrigger::TGCConnectionPPToSB::getSBIdToPP ( int  type,
int  port,
int  index 
) const
inline

Definition at line 34 of file TGCConnectionPPToSB.h.

35 {
36  return m_SBIdToPP[port][type][index];
37 }

◆ operator=()

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

Definition at line 40 of file TGCConnectionPPToSB.cxx.

41 {
42  if(this!=&right){
43  int j;
44  for (int i=0; i < N_PP_PORTS; i++) {
45  for( j=0; j<TGCSector::NumberOfPatchPanelType; j+=1){
46  if(m_SBIdToPP[i][j]!=0) delete [] m_SBIdToPP[i][j];
47  m_SBIdToPP[i][j] = new int [m_id.at(j).size()];
48  for (unsigned int k=0; k < m_id.at(j).size(); k++)
49  m_SBIdToPP[i][j][k] = right.m_SBIdToPP[i][j][k];
50  }
51  }
52  }
53  return *this;
54 }

◆ setId()

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

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 
)
inherited

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)
inherited

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 }

◆ setSBIdToPP()

void LVL1TGCTrigger::TGCConnectionPPToSB::setSBIdToPP ( int  type,
int  port,
int  index,
int  idIn 
)
inline

Definition at line 40 of file TGCConnectionPPToSB.h.

41 {
42  if(m_SBIdToPP[port][type]==0)
43  m_SBIdToPP[port][type] = new int [m_id.at(type).size()];
44  m_SBIdToPP[port][type][index] = idIn;
45 }

Member Data Documentation

◆ m_id

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

Definition at line 30 of file TGCBoardConnection.h.

◆ m_SBIdToPP

int* LVL1TGCTrigger::TGCConnectionPPToSB::m_SBIdToPP[N_PP_PORTS][TGCSector::NumberOfPatchPanelType]
private

Definition at line 30 of file TGCConnectionPPToSB.h.

◆ N_PP_PORTS

constexpr int LVL1TGCTrigger::TGCConnectionPPToSB::N_PP_PORTS = 2
staticconstexprprivate

Definition at line 29 of file TGCConnectionPPToSB.h.


The documentation for this class was generated from the following files:
LVL1TGCTrigger::TGCBoardConnection::setNumberOfType
void setNumberOfType(int ntype)
Definition: TGCBoardConnection.cxx:20
LVL1TGCTrigger::TGCConnectionPPToSB::N_PP_PORTS
static constexpr int N_PP_PORTS
Definition: TGCConnectionPPToSB.h:29
LVL1TGCTrigger::TGCBoardConnection::TGCBoardConnection
TGCBoardConnection()
Definition: TGCBoardConnection.cxx:9
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
LVL1TGCTrigger::TGCConnectionPPToSB::m_SBIdToPP
int * m_SBIdToPP[N_PP_PORTS][TGCSector::NumberOfPatchPanelType]
Definition: TGCConnectionPPToSB.h:30
DeMoScan.index
string index
Definition: DeMoScan.py:362
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
fitman.k
k
Definition: fitman.py:528
LVL1TGCTrigger::TGCSector::NumberOfPatchPanelType
@ NumberOfPatchPanelType
Definition: TGCSector.h:37