ATLAS Offline Software
Loading...
Searching...
No Matches
GeoMaterialPropertiesTable.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
7#include <stdexcept>
8#include <iostream>
9
13
15{
17 for(i = m_MPT.begin(); i!= m_MPT.end(); i++)
18 delete (*i).second;
19
20 m_MPT.clear();
21 m_MPTC.clear();
22}
23
24
26 double PropertyValue)
27{
28 m_MPTC [std::string(key)] = PropertyValue;
29}
30
32 double* PhotonMomenta,
33 double* PropertyValues,
34 int NumEntries)
35{
37 new GeoMaterialPropertyVector(PhotonMomenta,
38 PropertyValues,
39 NumEntries);
40 m_MPT[std::string(key)] = mpv;
41}
42
45{
46 m_MPT [std::string(key)] = mpv;
47}
48
50{
51 m_MPTC.erase(std::string(key));
52}
53
55{
56 m_MPT.erase(std::string(key));
57}
58
60 double aPhotonMomentum,
61 double aPropertyValue)
62{
63 GeoMaterialPropertyVector *targetVector=m_MPT[std::string(key)];
64 if(targetVector != 0)
65 targetVector->AddElement(aPhotonMomentum, aPropertyValue);
66 else
67 throw std::runtime_error("GeoMaterialPropertiesTable::AddEntry ==> Material Property Vector not found.");
68}
69
74
79
84
89
91{
92 for(GeoMatPVMap_ConstIt i=m_MPT.begin(); i!=m_MPT.end(); ++i)
93 {
94 std::cout << (*i).first << "\n";
95 if((*i).second != 0)
96 (*i).second->DumpVector();
97 else
98 std::cout << "NULL Material Property Vector Pointer." << "\n";
99 }
100
101 for (GeoMatPMap_ConstIt j = m_MPTC.begin(); j != m_MPTC.end(); ++j)
102 {
103 std::cout << j->first << "\n";
104 if(j->second != 0)
105 std::cout << j->second << "\n";
106 else
107 std::cout << "No Material Constant Property." << "\n";
108 }
109}
110
void AddConstProperty(const char *key, double PropertyValue)
GeoMatPVMap::const_iterator GeoMatPVMap_ConstIt
void AddProperty(const char *key, double *PhotonMomenta, double *PropertyValues, int NumEntries)
void AddEntry(const char *key, double aPhotonMomentum, double aPropertyValue)
GeoMatPVMap_ConstIt beginPVMap() const
GeoMatPMap::const_iterator GeoMatPMap_ConstIt
GeoMatPMap_ConstIt beginPMap() const
GeoMatPVMap_ConstIt endPVMap() const
void AddElement(double aPhotonMomentum, double aPropertyValue)