ATLAS Offline Software
FPVMAP.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "MuonGeoModel/FPVMAP.h"
6 
8 #include "GaudiKernel/MsgStream.h"
10 
11 #include <GaudiKernel/IMessageSvc.h>
12 #include <iostream>
13 #include <utility>
14 
15 namespace MuonGM {
16 
17  GeoVPhysVol *FPVMAP::GetDetector(const std::string& name) {
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  }
26 
27  void FPVMAP::StoreDetector(GeoVPhysVol *s, const std::string& name) {
28  // std::cout<<"FPVMAP:: store the pointer to "<<name<<std::endl;
29  m_Detectors[name] = s;
30  }
31 
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  }
39 
40 } // namespace MuonGM
MuonGM::FPVMAP::PrintAllDetectors
void PrintAllDetectors()
Definition: FPVMAP.cxx:32
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
FPVMAP.h
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MuonGM::FPVMAP::m_nreused
int m_nreused
Definition: FPVMAP.h:32
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuonGM::FPVMAP::GetDetector
GeoVPhysVol * GetDetector(const std::string &name)
Definition: FPVMAP.cxx:17
MuonGM::FPVMAP::m_Detectors
std::map< std::string, GeoVPhysVol * > m_Detectors
Definition: FPVMAP.h:31
MuonGM::FPVMAP::StoreDetector
void StoreDetector(GeoVPhysVol *s, const std::string &name)
Definition: FPVMAP.cxx:27
Technology.h