ATLAS Offline Software
Loading...
Searching...
No Matches
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
}
AGDDDetector.h
AGDDVolumeStore.h
AGDDVolume.h
AGDDVolumeStore::Exist
bool Exist(std::string)
Definition
AGDDVolumeStore.cxx:20
AGDDVolumeStore::Clean
void Clean()
Definition
AGDDVolumeStore.cxx:36
AGDDVolumeStore::RegisterVolume
void RegisterVolume(AGDDVolume *)
Definition
AGDDVolumeStore.cxx:14
AGDDVolumeStore::GetVolume
AGDDVolume * GetVolume(std::string)
Definition
AGDDVolumeStore.cxx:25
AGDDVolumeStore::AGDDVolumeStore
AGDDVolumeStore()
Definition
AGDDVolumeStore.cxx:10
AGDDVolume
Definition
AGDDVolume.h:16
Generated on
for ATLAS Offline Software by
1.14.0