ATLAS Offline Software
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 
8 #include <iostream>
9 
11 {
12 }
13 
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 
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 
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:195
AGDDVolumeStore::RegisterVolume
void RegisterVolume(AGDDVolume *)
Definition: AGDDVolumeStore.cxx:14
AGDDDetector.h
python.PyAthena.v
v
Definition: PyAthena.py:157
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48
AGDDVolume
Definition: AGDDVolume.h:16
AGDDVolume.h