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

#include <FPVMAP.h>

Collaboration diagram for MuonGM::FPVMAP:

Public Member Functions

 FPVMAP ()=default
 
 ~FPVMAP ()=default
 
DetectorIterator Begin ()
 
DetectorIterator End ()
 
int NDetectors ()
 
int NDetectorsReused ()
 
GeoVPhysVol * GetDetector (const std::string &name)
 
void StoreDetector (GeoVPhysVol *s, const std::string &name)
 
void PrintAllDetectors ()
 

Private Attributes

std::map< std::string, GeoVPhysVol * > m_Detectors {}
 
int m_nreused {0}
 

Detailed Description

Definition at line 17 of file FPVMAP.h.

Constructor & Destructor Documentation

◆ FPVMAP()

MuonGM::FPVMAP::FPVMAP ( )
default

◆ ~FPVMAP()

MuonGM::FPVMAP::~FPVMAP ( )
default

Member Function Documentation

◆ Begin()

DetectorIterator MuonGM::FPVMAP::Begin ( )
inline

Definition at line 34 of file FPVMAP.h.

34 { return m_Detectors.begin(); }

◆ End()

DetectorIterator MuonGM::FPVMAP::End ( )
inline

Definition at line 35 of file FPVMAP.h.

35 { return m_Detectors.end(); }

◆ GetDetector()

GeoVPhysVol * MuonGM::FPVMAP::GetDetector ( const std::string &  name)

Definition at line 17 of file FPVMAP.cxx.

17  {
18  if (m_Detectors.find(name) != m_Detectors.end()) {
19  m_nreused++;
20  // std::cout<<"FPVMAP:: the pointer to "<<name
21  // <<" is already stored; saving memory "<<m_nreused<<std::endl;
22  return m_Detectors[name];
23  } else
24  return nullptr;
25  }

◆ NDetectors()

int MuonGM::FPVMAP::NDetectors ( )
inline

Definition at line 36 of file FPVMAP.h.

36 { return m_Detectors.size(); }

◆ NDetectorsReused()

int MuonGM::FPVMAP::NDetectorsReused ( )
inline

Definition at line 37 of file FPVMAP.h.

37 { return m_nreused; }

◆ PrintAllDetectors()

void MuonGM::FPVMAP::PrintAllDetectors ( )

Definition at line 32 of file FPVMAP.cxx.

32  {
33  MsgStream log(Athena::getMessageSvc(), "MuonGM::FPVMAP");
34 
35  for (const auto& p : m_Detectors) {
36  log << MSG::INFO << "---> A PhysVol corresponds to " << p.first << endmsg;
37  }
38  }

◆ StoreDetector()

void MuonGM::FPVMAP::StoreDetector ( GeoVPhysVol *  s,
const std::string &  name 
)

Definition at line 27 of file FPVMAP.cxx.

27  {
28  // std::cout<<"FPVMAP:: store the pointer to "<<name<<std::endl;
29  m_Detectors[name] = s;
30  }

Member Data Documentation

◆ m_Detectors

std::map<std::string, GeoVPhysVol *> MuonGM::FPVMAP::m_Detectors {}
private

Definition at line 31 of file FPVMAP.h.

◆ m_nreused

int MuonGM::FPVMAP::m_nreused {0}
private

Definition at line 32 of file FPVMAP.h.


The documentation for this class was generated from the following files:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MuonGM::FPVMAP::m_nreused
int m_nreused
Definition: FPVMAP.h:32
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuonGM::FPVMAP::m_Detectors
std::map< std::string, GeoVPhysVol * > m_Detectors
Definition: FPVMAP.h:31