ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
MuonTGC_Cabling::TGCModuleMap Class Reference

#include <TGCModuleMap.h>

Collaboration diagram for MuonTGC_Cabling::TGCModuleMap:

Public Member Functions

 TGCModuleMap (void)
 
virtual ~TGCModuleMap (void)
 
int connector (int entry)
 
TGCModuleIdmoduleId (int entry)
 
TGCModuleIdpopModuleId (int entry)
 
void insert (int connector, TGCModuleId *moduleId)
 
int find (int connector)
 
int size (void)
 
void clear (void)
 

Private Attributes

std::map< int, TGCModuleId * > m_moduleMap
 

Detailed Description

Definition at line 15 of file TGCModuleMap.h.

Constructor & Destructor Documentation

◆ TGCModuleMap()

MuonTGC_Cabling::TGCModuleMap::TGCModuleMap ( void  )
inline

Definition at line 19 of file TGCModuleMap.h.

20  {}

◆ ~TGCModuleMap()

MuonTGC_Cabling::TGCModuleMap::~TGCModuleMap ( void  )
virtual

Definition at line 10 of file TGCModuleMap.cxx.

10  {
11  clear();
12 }

Member Function Documentation

◆ clear()

void MuonTGC_Cabling::TGCModuleMap::clear ( void  )

Definition at line 52 of file TGCModuleMap.cxx.

52  {
53  for (auto& p : m_moduleMap) {
54  delete p.second;
55  }
56  m_moduleMap.clear();
57  return;
58 }

◆ connector()

int MuonTGC_Cabling::TGCModuleMap::connector ( int  entry)

Definition at line 14 of file TGCModuleMap.cxx.

14  {
16  advance(iter,entry);
17  return iter->first;
18 }

◆ find()

int MuonTGC_Cabling::TGCModuleMap::find ( int  connector)

Definition at line 44 of file TGCModuleMap.cxx.

44  {
45  return distance(m_moduleMap.begin(),m_moduleMap.find(connector));
46 }

◆ insert()

void MuonTGC_Cabling::TGCModuleMap::insert ( int  connector,
TGCModuleId moduleId 
)

Definition at line 34 of file TGCModuleMap.cxx.

34  {
35  if(m_moduleMap.find(connector) == m_moduleMap.end()) {
36  m_moduleMap.insert(std::pair<int,TGCModuleId*>(connector,moduleId));
37  } else {
38  // duplicate with key of connector
39  delete moduleId;
40  }
41  return;
42 }

◆ moduleId()

TGCModuleId * MuonTGC_Cabling::TGCModuleMap::moduleId ( int  entry)

Definition at line 20 of file TGCModuleMap.cxx.

20  {
22  advance(iter,entry);
23  return iter->second;
24 }

◆ popModuleId()

TGCModuleId * MuonTGC_Cabling::TGCModuleMap::popModuleId ( int  entry)

Definition at line 26 of file TGCModuleMap.cxx.

26  {
28  advance(iter,entry);
29  TGCModuleId* moduleId = iter->second;
30  m_moduleMap.erase(iter);
31  return moduleId;
32 }

◆ size()

int MuonTGC_Cabling::TGCModuleMap::size ( void  )

Definition at line 48 of file TGCModuleMap.cxx.

48  {
49  return m_moduleMap.size();
50 }

Member Data Documentation

◆ m_moduleMap

std::map<int,TGCModuleId*> MuonTGC_Cabling::TGCModuleMap::m_moduleMap
private

Definition at line 39 of file TGCModuleMap.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
MuonTGC_Cabling::TGCModuleMap::moduleId
TGCModuleId * moduleId(int entry)
Definition: TGCModuleMap.cxx:20
MuonTGC_Cabling::TGCModuleMap::connector
int connector(int entry)
Definition: TGCModuleMap.cxx:14
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
MuonTGC_Cabling::TGCModuleMap::clear
void clear(void)
Definition: TGCModuleMap.cxx:52
MuonTGC_Cabling::TGCModuleMap::m_moduleMap
std::map< int, TGCModuleId * > m_moduleMap
Definition: TGCModuleMap.h:39
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54