source: trunk/source/materials/include/G4MaterialPropertiesTable.hh@ 1012

Last change on this file since 1012 was 986, checked in by garnier, 17 years ago

fichiers manquants

File size: 5.5 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id: G4MaterialPropertiesTable.hh,v 1.19 2008/06/05 23:38:03 gum Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30//
31////////////////////////////////////////////////////////////////////////
32// G4MaterialPropertiesTable Definition
33////////////////////////////////////////////////////////////////////////
34//
35// File: G4MaterialPropertiesTable.hh
36// Description: An Material properties table is a hash table, with
37// key = property name, and value either G4double or
38// G4MaterialPropertyVector
39// Version: 1.0
40// Created: 1996-02-08
41// Author: Juliet Armstrong
42// Updated: 2005-05-12 add SetGROUPVEL() by P. Gumplinger
43// 2002-11-05 add named material constants by P. Gumplinger
44// 1999-11-05 Migration from G4RWTPtrHashDictionary to STL
45// by John Allison
46// 1999-10-29 add method and class descriptors
47// 1997-03-25 by Peter Gumplinger
48// > cosmetics (only)
49// mail: gum@triumf.ca
50//
51////////////////////////////////////////////////////////////////////////
52
53#ifndef G4MaterialPropertiesTable_h
54#define G4MaterialPropertiesTable_h 1
55
56/////////////
57// Includes
58/////////////
59
60#include <cmath>
61#include <map>
62#include "globals.hh"
63#include "G4MaterialPropertyVector.hh"
64
65// Class Description:
66// An Material properties table is a hash table, with key = property
67// name, and value either G4double or G4MaterialPropertyVector.
68// Class Description - End:
69
70/////////////////////
71// Class Definition
72/////////////////////
73
74class G4MaterialPropertiesTable {
75
76 ////////////////
77 // Constructor
78 ////////////////
79
80public: // Without description
81
82 G4MaterialPropertiesTable();
83
84 ///////////////
85 // Destructor
86 ///////////////
87
88public: // Without description
89
90 ~G4MaterialPropertiesTable();
91
92 ////////////
93 // Methods
94 ////////////
95
96public: // With description
97
98 void AddConstProperty(const char *key,
99 G4double PropertyValue);
100 // Add a new property to the table by giving a key-name and value
101
102 void AddProperty(const char *key,
103 G4double *PhotonEnergies,
104 G4double *PropertyValues,
105 G4int NumEntries);
106 // Add a new property to the table by giving a key-name and the
107 // arrays x and y of size NumEntries.
108
109 void AddProperty(const char *key, G4MaterialPropertyVector *opv);
110 // Add a new property to the table by giving a key-name and an
111 // already constructed G4MaterialPropertyVector.
112
113 void RemoveConstProperty(const char *key);
114 // Remove a constant property from the table.
115
116 void RemoveProperty(const char *key);
117 // Remove a property from the table.
118
119 G4double GetConstProperty(const char *key);
120 // Get the constant property from the table corresponding to the key-name
121
122 G4bool ConstPropertyExists(const char *key);
123 // Return true if a const property 'key' exists.
124
125 G4MaterialPropertyVector* GetProperty(const char *key);
126 // Get the property from the table corresponding to the key-name.
127
128 void AddEntry(const char *key, G4double aPhotonEnergy,
129 G4double aPropertyValue);
130 // Add a new entry (pair of numbers) to the table for a given key.
131
132 void RemoveEntry(const char *key, G4double aPhotonEnergy);
133 // Remove an entry from the table for a given key and x-value.
134
135 void DumpTable();
136
137private:
138
139 /////////////////////////
140 // Private Data members
141 /////////////////////////
142
143 std::map<G4String, G4MaterialPropertyVector*, std::less<G4String> > MPT;
144 typedef std::map<G4String, G4MaterialPropertyVector*,
145 std::less<G4String> >::iterator MPTiterator;
146
147 std::map< G4String, G4double, std::less<G4String> > MPTC;
148 typedef std::map< G4String, G4double,
149 std::less<G4String> >::iterator MPTCiterator;
150
151 G4MaterialPropertyVector* SetGROUPVEL();
152
153};
154
155#endif /* G4MaterialPropertiesTable_h */
Note: See TracBrowser for help on using the repository browser.