ATLAS Offline Software
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
GeoMaterialPropertiesTable Class Reference

#include <GeoMaterialPropertiesTable.h>

Inheritance diagram for GeoMaterialPropertiesTable:
Collaboration diagram for GeoMaterialPropertiesTable:

Public Types

typedef std::map< std::string, GeoMaterialPropertyVector *, std::less< std::string > > GeoMatPVMap
 
typedef std::map< std::string, double, std::less< std::string > > GeoMatPMap
 
typedef GeoMatPVMap::const_iterator GeoMatPVMap_ConstIt
 
typedef GeoMatPMap::const_iterator GeoMatPMap_ConstIt
 

Public Member Functions

 GeoMaterialPropertiesTable ()
 
 ~GeoMaterialPropertiesTable ()
 
void AddConstProperty (const char *key, double PropertyValue)
 
void AddProperty (const char *key, double *PhotonMomenta, double *PropertyValues, int NumEntries)
 
void AddProperty (const char *key, GeoMaterialPropertyVector *opv)
 
void RemoveConstProperty (const char *key)
 
void RemoveProperty (const char *key)
 
void AddEntry (const char *key, double aPhotonMomentum, double aPropertyValue)
 
GeoMatPVMap_ConstIt beginPVMap () const
 
GeoMatPVMap_ConstIt endPVMap () const
 
GeoMatPMap_ConstIt beginPMap () const
 
GeoMatPMap_ConstIt endPMap () const
 
void DumpTable () const
 

Private Types

typedef GeoMatPVMap::iterator MPTiterator
 
typedef GeoMatPMap::iterator MPTCiterator
 

Private Attributes

GeoMatPVMap m_MPT
 
GeoMatPMap m_MPTC
 

Detailed Description

Definition at line 19 of file GeoMaterialPropertiesTable.h.

Member Typedef Documentation

◆ GeoMatPMap

typedef std::map< std::string, double, std::less<std::string> > GeoMaterialPropertiesTable::GeoMatPMap

Definition at line 29 of file GeoMaterialPropertiesTable.h.

◆ GeoMatPMap_ConstIt

typedef GeoMatPMap::const_iterator GeoMaterialPropertiesTable::GeoMatPMap_ConstIt

Definition at line 33 of file GeoMaterialPropertiesTable.h.

◆ GeoMatPVMap

typedef std::map<std::string, GeoMaterialPropertyVector*, std::less<std::string> > GeoMaterialPropertiesTable::GeoMatPVMap

Definition at line 28 of file GeoMaterialPropertiesTable.h.

◆ GeoMatPVMap_ConstIt

typedef GeoMatPVMap::const_iterator GeoMaterialPropertiesTable::GeoMatPVMap_ConstIt

Definition at line 32 of file GeoMaterialPropertiesTable.h.

◆ MPTCiterator

typedef GeoMatPMap::iterator GeoMaterialPropertiesTable::MPTCiterator
private

Definition at line 76 of file GeoMaterialPropertiesTable.h.

◆ MPTiterator

typedef GeoMatPVMap::iterator GeoMaterialPropertiesTable::MPTiterator
private

Definition at line 75 of file GeoMaterialPropertiesTable.h.

Constructor & Destructor Documentation

◆ GeoMaterialPropertiesTable()

GeoMaterialPropertiesTable::GeoMaterialPropertiesTable ( )

Definition at line 10 of file GeoMaterialPropertiesTable.cxx.

11 {
12 }

◆ ~GeoMaterialPropertiesTable()

GeoMaterialPropertiesTable::~GeoMaterialPropertiesTable ( )

Definition at line 14 of file GeoMaterialPropertiesTable.cxx.

15 {
16  MPTiterator i;
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 }

Member Function Documentation

◆ AddConstProperty()

void GeoMaterialPropertiesTable::AddConstProperty ( const char *  key,
double  PropertyValue 
)

Definition at line 25 of file GeoMaterialPropertiesTable.cxx.

27 {
28  m_MPTC [std::string(key)] = PropertyValue;
29 }

◆ AddEntry()

void GeoMaterialPropertiesTable::AddEntry ( const char *  key,
double  aPhotonMomentum,
double  aPropertyValue 
)

Definition at line 59 of file GeoMaterialPropertiesTable.cxx.

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 }

◆ AddProperty() [1/2]

void GeoMaterialPropertiesTable::AddProperty ( const char *  key,
double *  PhotonMomenta,
double *  PropertyValues,
int  NumEntries 
)

Definition at line 31 of file GeoMaterialPropertiesTable.cxx.

35 {
37  new GeoMaterialPropertyVector(PhotonMomenta,
38  PropertyValues,
39  NumEntries);
40  m_MPT[std::string(key)] = mpv;
41 }

◆ AddProperty() [2/2]

void GeoMaterialPropertiesTable::AddProperty ( const char *  key,
GeoMaterialPropertyVector opv 
)

Definition at line 43 of file GeoMaterialPropertiesTable.cxx.

45 {
46  m_MPT [std::string(key)] = mpv;
47 }

◆ beginPMap()

GeoMaterialPropertiesTable::GeoMatPMap_ConstIt GeoMaterialPropertiesTable::beginPMap ( ) const

Definition at line 80 of file GeoMaterialPropertiesTable.cxx.

81 {
82  return m_MPTC.begin();
83 }

◆ beginPVMap()

GeoMaterialPropertiesTable::GeoMatPVMap_ConstIt GeoMaterialPropertiesTable::beginPVMap ( ) const

Definition at line 70 of file GeoMaterialPropertiesTable.cxx.

71 {
72  return m_MPT.begin();
73 }

◆ DumpTable()

void GeoMaterialPropertiesTable::DumpTable ( ) const

Definition at line 90 of file GeoMaterialPropertiesTable.cxx.

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 }

◆ endPMap()

GeoMaterialPropertiesTable::GeoMatPMap_ConstIt GeoMaterialPropertiesTable::endPMap ( ) const

Definition at line 85 of file GeoMaterialPropertiesTable.cxx.

86 {
87  return m_MPTC.end();
88 }

◆ endPVMap()

GeoMaterialPropertiesTable::GeoMatPVMap_ConstIt GeoMaterialPropertiesTable::endPVMap ( ) const

Definition at line 75 of file GeoMaterialPropertiesTable.cxx.

76 {
77  return m_MPT.end();
78 }

◆ RemoveConstProperty()

void GeoMaterialPropertiesTable::RemoveConstProperty ( const char *  key)

Definition at line 49 of file GeoMaterialPropertiesTable.cxx.

50 {
51  m_MPTC.erase(std::string(key));
52 }

◆ RemoveProperty()

void GeoMaterialPropertiesTable::RemoveProperty ( const char *  key)

Definition at line 54 of file GeoMaterialPropertiesTable.cxx.

55 {
56  m_MPT.erase(std::string(key));
57 }

Member Data Documentation

◆ m_MPT

GeoMatPVMap GeoMaterialPropertiesTable::m_MPT
private

Definition at line 72 of file GeoMaterialPropertiesTable.h.

◆ m_MPTC

GeoMatPMap GeoMaterialPropertiesTable::m_MPTC
private

Definition at line 73 of file GeoMaterialPropertiesTable.h.


The documentation for this class was generated from the following files:
GeoMaterialPropertyVector::AddElement
void AddElement(double aPhotonMomentum, double aPropertyValue)
Definition: GeoMaterialPropertyVector.cxx:75
GeoMaterialPropertiesTable::GeoMatPMap_ConstIt
GeoMatPMap::const_iterator GeoMatPMap_ConstIt
Definition: GeoMaterialPropertiesTable.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:92
GeoMaterialPropertiesTable::m_MPT
GeoMatPVMap m_MPT
Definition: GeoMaterialPropertiesTable.h:72
GeoMaterialPropertiesTable::GeoMatPVMap_ConstIt
GeoMatPVMap::const_iterator GeoMatPVMap_ConstIt
Definition: GeoMaterialPropertiesTable.h:32
GeoMaterialPropertiesTable::m_MPTC
GeoMatPMap m_MPTC
Definition: GeoMaterialPropertiesTable.h:73
GeoMaterialPropertiesTable::MPTiterator
GeoMatPVMap::iterator MPTiterator
Definition: GeoMaterialPropertiesTable.h:75
GeoMaterialPropertyVector
Definition: GeoMaterialPropertyVector.h:12
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37