ATLAS Offline Software
Loading...
Searching...
No Matches
DetectorDescription
AGDD
AGDDKernel
src
AGDDSection.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/AGDDSection.h
"
6
#include "
AGDDKernel/AGDDSectionStore.h
"
7
#include "
AGDDKernel/AGDDVolume.h
"
8
9
#include <iostream>
10
11
AGDDSection::AGDDSection
(
const
std::string&
a
,
12
const
std::string& b,
13
const
std::string& c,
14
const
std::string& d,
15
const
std::string& e,
16
AGDDSectionStore
&
ss
,
17
bool
bflag):
18
m_name
(
a
),
m_version
(b),
m_author
(c),
m_date
(d),
m_topVolume
(e),
m_toBeBuilt
(bflag)
19
{
20
Register
(
ss
);
21
}
22
23
void
AGDDSection::AddVolume
(
AGDDVolume
* v)
24
{
25
std::string temp=v->GetName();
26
if
(
m_theVolumes
.find(temp)!=
m_theVolumes
.end())
27
std::cout<<
" Volume "
<<temp<<
" already in section "
<<
m_name
<<std::endl;
28
else
29
m_theVolumes
[temp]=v;
30
}
31
32
AGDDVolume
*
AGDDSection::GetVolume
(
const
std::string& n)
33
{
34
if
(
m_theVolumes
.find(n)!=
m_theVolumes
.end())
35
return
m_theVolumes
[n];
36
else
37
{
38
std::cout<<
" Volume "
<<n<<
" not found in section "
<<
m_name
<<std::endl;
39
return
0;
40
}
41
}
42
43
void
AGDDSection::Register
(
AGDDSectionStore
&
ss
)
44
{
45
ss
.RegisterSection(
this
);
46
}
47
void
AGDDSection::Print
()
48
{
49
std::cout<<
"+"
;
50
for
(
unsigned
int
i=0;i<10;i++) std::cout<<
"--------"
;
51
std::cout<<
"+"
<<std::endl;
52
std::cout<<
" section "
<<
m_name
<<
" "
<<
" version "
<<
m_version
<<std::endl;
53
std::cout<<
" author "
<<
m_author
<<
" date "
<<
m_date
<<std::endl;
54
std::cout<<
" defines volumes: "
<<std::endl<<std::endl;
55
volumeList::const_iterator it;
56
// for (it=theVolumes.begin();it!=theVolumes.end();it++)
57
// {
58
// if (!(*it).second->HasParent())
59
// AGDDController::PrintVolumeHierarchy((*it).first,0);
60
// }
61
std::cout<<
"+"
;
62
for
(
unsigned
int
i=0;i<10;i++) std::cout<<
"--------"
;
63
std::cout<<
"+"
<<std::endl<<std::endl;
64
}
AGDDSectionStore.h
AGDDSection.h
AGDDVolume.h
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
AGDDSectionStore
Definition
AGDDSectionStore.h:15
AGDDSection::m_author
std::string m_author
Definition
AGDDSection.h:43
AGDDSection::m_version
std::string m_version
Definition
AGDDSection.h:42
AGDDSection::m_name
std::string m_name
Definition
AGDDSection.h:41
AGDDSection::GetVolume
AGDDVolume * GetVolume(const std::string &)
Definition
AGDDSection.cxx:32
AGDDSection::AddVolume
void AddVolume(AGDDVolume *)
Definition
AGDDSection.cxx:23
AGDDSection::Register
void Register(AGDDSectionStore &ss)
Definition
AGDDSection.cxx:43
AGDDSection::m_theVolumes
volumeList m_theVolumes
Definition
AGDDSection.h:48
AGDDSection::m_date
std::string m_date
Definition
AGDDSection.h:44
AGDDSection::AGDDSection
AGDDSection(const std::string &, const std::string &, const std::string &, const std::string &, const std::string &, AGDDSectionStore &ss, bool buildFlag=true)
Definition
AGDDSection.cxx:11
AGDDSection::m_topVolume
std::string m_topVolume
Definition
AGDDSection.h:45
AGDDSection::Print
void Print()
Definition
AGDDSection.cxx:47
AGDDSection::m_toBeBuilt
bool m_toBeBuilt
Definition
AGDDSection.h:46
AGDDVolume
Definition
AGDDVolume.h:16
Generated on
for ATLAS Offline Software by
1.14.0