ATLAS Offline Software
Tracking
TrkDetDescr
TrkGeometry
src
ElementTable.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// ElementTable.cxx, (c) ATLAS Detector software
8
9
#include "
TrkGeometry/ElementTable.h
"
10
11
#include <iomanip>
12
13
#include "GaudiKernel/MsgStream.h"
14
15
Trk::ElementTable::~ElementTable
() {
16
auto
elIter =
m_table
.begin();
17
for
(; elIter !=
m_table
.end();
delete
(*elIter), ++elIter)
18
;
19
}
20
21
MsgStream&
Trk::operator<<
(MsgStream& sl,
const
Trk::ElementTable
& etab) {
22
std::string
none
=
"None"
;
23
sl <<
" ------------------------- Trk::ElementTable "
24
"-------------------------- "
25
<< std::endl;
26
sl <<
" - Listing "
<< etab.
size
() <<
" elements "
<< std::endl;
27
for
(
unsigned
int
iel = 0; iel < static_cast<unsigned int>(UCHAR_MAX); ++iel)
28
sl <<
" - Id : "
<< std::setw(3) << iel <<
" - Properties: "
29
<< (etab.
element
(iel) ? etab.
element
(iel)->
toString
() :
none
)
30
<<
" - Name : "
<< etab.
elementName
(iel) << std::endl;
31
sl <<
" ---------------------------------------------------------------------"
32
"- "
33
<<
endmsg
;
34
return
sl;
35
}
36
37
std::ostream&
Trk::operator<<
(std::ostream& sl,
const
Trk::ElementTable
& etab) {
38
std::string
none
=
"None"
;
39
sl <<
" ------------------------- Trk::ElementTable "
40
"-------------------------- "
41
<< std::endl;
42
sl <<
" - Listing "
<< etab.
size
() <<
" elements "
<< std::endl;
43
for
(
unsigned
int
iel = 0; iel < static_cast<unsigned int>(UCHAR_MAX); ++iel)
44
sl <<
" - Id : "
<< std::setw(3) << iel <<
" - Properties: "
45
<< (etab.
element
(iel) ? etab.
element
(iel)->
toString
() :
none
)
46
<<
" - Name : "
<< etab.
elementName
(iel) << std::endl;
47
sl <<
" ---------------------------------------------------------------------"
48
"- "
49
<< std::endl;
50
return
sl;
51
}
52
ElementTable.h
Trk::ElementTable::elementName
const std::string & elementName(unsigned int Z) const
Get the element name.
Definition:
ElementTable.h:73
Trk::ElementTable::m_table
std::vector< Material * > m_table
Definition:
ElementTable.h:99
Trk::none
@ none
Definition:
TrkDetDescr/TrkSurfaces/TrkSurfaces/RealQuadraticEquation.h:21
Trk::ElementTable::element
const Material * element(unsigned int Z) const
Get the material.
Definition:
ElementTable.h:71
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
Trk::Material::toString
std::string toString() const
spit out as a string
Definition:
Material.h:230
Trk::ElementTable
Definition:
ElementTable.h:24
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition:
AlignModule.cxx:204
Trk::ElementTable::~ElementTable
~ElementTable()
Destructor.
Definition:
ElementTable.cxx:15
Trk::ElementTable::size
size_t size() const
Print the table size.
Definition:
ElementTable.h:96
Generated on Thu Nov 7 2024 21:14:38 for ATLAS Offline Software by
1.8.18