ATLAS Offline Software
Loading...
Searching...
No Matches
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
10
11#include <iomanip>
12
13#include "GaudiKernel/MsgStream.h"
14
16 auto elIter = m_table.begin();
17 for (; elIter != m_table.end(); delete (*elIter), ++elIter)
18 ;
19}
20
21MsgStream& 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
37std::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
#define endmsg
size_t size() const
Print the table size.
const Material * element(unsigned int Z) const
Get the material.
const std::string & elementName(unsigned int Z) const
Get the element name.
~ElementTable()
Destructor.
std::vector< Material * > m_table
std::string toString() const
spit out as a string
Definition Material.h:231
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output