ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDetDescr
MuonGeoModel
src
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
7
#include "
AthenaKernel/getMessageSvc.h
"
8
#include "GaudiKernel/MsgStream.h"
9
#include "
MuonGeoModel/Technology.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
32
void
FPVMAP::PrintAllDetectors
() {
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
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
FPVMAP.h
Technology.h
MuonGM::FPVMAP::m_nreused
int m_nreused
Definition
FPVMAP.h:32
MuonGM::FPVMAP::PrintAllDetectors
void PrintAllDetectors()
Definition
FPVMAP.cxx:32
MuonGM::FPVMAP::GetDetector
GeoVPhysVol * GetDetector(const std::string &name)
Definition
FPVMAP.cxx:17
MuonGM::FPVMAP::StoreDetector
void StoreDetector(GeoVPhysVol *s, const std::string &name)
Definition
FPVMAP.cxx:27
MuonGM::FPVMAP::m_Detectors
std::map< std::string, GeoVPhysVol * > m_Detectors
Definition
FPVMAP.h:31
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition
getMessageSvc.cxx:20
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition
GeoMuonHits.h:27
Generated on
for ATLAS Offline Software by
1.17.0