ATLAS Offline Software
Public Member Functions | Private Types | Private Attributes | List of all members
InDetDD::PairIndexMap Class Reference

Class to store map between pair of two ints and an int. More...

#include <PairIndexMap.h>

Collaboration diagram for InDetDD::PairIndexMap:

Public Member Functions

void add (int first, int second, int value)
 
int find (int first, int second) const
 

Private Types

typedef std::map< std::pair< int, int >, int > MapType
 

Private Attributes

MapType m_map
 

Detailed Description

Class to store map between pair of two ints and an int.

Used to help read in database tables which are a lookup via two ints.

Definition at line 16 of file PairIndexMap.h.

Member Typedef Documentation

◆ MapType

typedef std::map<std::pair<int,int>, int> InDetDD::PairIndexMap::MapType
private

Definition at line 23 of file PairIndexMap.h.

Member Function Documentation

◆ add()

void InDetDD::PairIndexMap::add ( int  first,
int  second,
int  value 
)

Definition at line 9 of file PairIndexMap.cxx.

9  {
10  m_map[std::make_pair(first, second)] = value;
11  }

◆ find()

int InDetDD::PairIndexMap::find ( int  first,
int  second 
) const

Definition at line 14 of file PairIndexMap.cxx.

14  {
15  MapType::const_iterator iter = m_map.find(std::make_pair(first, second));
16  if (iter == m_map.end()) return -1;
17 
18  return iter->second;
19  }

Member Data Documentation

◆ m_map

MapType InDetDD::PairIndexMap::m_map
private

Definition at line 24 of file PairIndexMap.h.


The documentation for this class was generated from the following files:
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
athena.value
value
Definition: athena.py:122
DeMoScan.first
bool first
Definition: DeMoScan.py:534
InDetDD::PairIndexMap::m_map
MapType m_map
Definition: PairIndexMap.h:24