ATLAS Offline Software
DetectorDescription
AGDD
AGDDKernel
src
AGDDVolumeStore.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
AGDDKernel/AGDDVolumeStore.h
"
6
#include "
AGDDKernel/AGDDVolume.h
"
7
#include "
AGDDKernel/AGDDDetector.h
"
8
#include <iostream>
9
10
AGDDVolumeStore::AGDDVolumeStore
()
11
{
12
}
13
14
void
AGDDVolumeStore::RegisterVolume
(
AGDDVolume
*
v
)
15
{
16
std::string
name
=
v
->GetName();
17
(*this)[
name
]=
v
;
18
}
19
20
bool
AGDDVolumeStore::Exist
(std::string
n
)
21
{
22
return
((*this).find(
n
) != (*this).end());
23
}
24
25
AGDDVolume
*
AGDDVolumeStore::GetVolume
(std::string
name
)
26
{
27
if
((*this).find(
name
) != (*this).end())
28
return
(*
this
)[
name
];
29
else
30
{
31
std::cout <<
" Volume "
<<
name
<<
" not found: returning 0"
<<std::endl;
32
return
0;
33
}
34
}
35
36
void
AGDDVolumeStore::Clean
()
37
{
38
for
(
auto
volumeIt : *
this
)
39
{
40
if
(!(volumeIt.second->IsSensitiveVolume()))
41
delete
(volumeIt.second);
42
}
43
this->
clear
();
44
}
AGDDVolumeStore.h
AGDDVolumeStore::Clean
void Clean()
Definition:
AGDDVolumeStore.cxx:36
AGDDVolumeStore::AGDDVolumeStore
AGDDVolumeStore()
Definition:
AGDDVolumeStore.cxx:10
AGDDVolumeStore::GetVolume
AGDDVolume * GetVolume(std::string)
Definition:
AGDDVolumeStore.cxx:25
beamspotman.n
n
Definition:
beamspotman.py:731
AGDDVolumeStore::Exist
bool Exist(std::string)
Definition:
AGDDVolumeStore.cxx:20
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
AGDDVolumeStore::RegisterVolume
void RegisterVolume(AGDDVolume *)
Definition:
AGDDVolumeStore.cxx:14
AGDDDetector.h
python.PyAthena.v
v
Definition:
PyAthena.py:154
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition:
NtupleVars.h:48
AGDDVolume
Definition:
AGDDVolume.h:16
AGDDVolume.h
Generated on Sun Dec 22 2024 21:06:45 for ATLAS Offline Software by
1.8.18