90 lines
3.5 KiB
Plaintext
90 lines
3.5 KiB
Plaintext
//
|
|
// ********************************************************************
|
|
// * License and Disclaimer *
|
|
// * *
|
|
// * The Geant4 software is copyright of the Copyright Holders of *
|
|
// * the Geant4 Collaboration. It is provided under the terms and *
|
|
// * conditions of the Geant4 Software License, included in the file *
|
|
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
|
// * include a list of copyright holders. *
|
|
// * *
|
|
// * Neither the authors of this software system, nor their employing *
|
|
// * institutes,nor the agencies providing financial support for this *
|
|
// * work make any representation or warranty, express or implied, *
|
|
// * regarding this software system or assume any liability for its *
|
|
// * use. Please see the license in the file LICENSE and URL above *
|
|
// * for the full disclaimer and the limitation of liability. *
|
|
// * *
|
|
// * This code implementation is the result of the scientific and *
|
|
// * technical work of the GEANT4 collaboration. *
|
|
// * By using, copying, modifying or distributing the software (or *
|
|
// * any work based on the software) you agree to acknowledge its *
|
|
// * use in resulting scientific publications, and indicate your *
|
|
// * acceptance of all terms of the Geant4 Software license. *
|
|
// ********************************************************************
|
|
//
|
|
//
|
|
// $Id: G4MaterialPropertiesTable.icc 99765 2016-10-05 08:49:47Z gcosmo $
|
|
//
|
|
////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// G4MaterialPropertiesTable inline definitions
|
|
//
|
|
// File: G4MaterialPropertiesTable.icc
|
|
// Version: 1.0
|
|
// Created: 1996-02-08
|
|
// Author: Juliet Armstrong
|
|
// Updated: moved to inline
|
|
// mail: gum@triumf.ca
|
|
//
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
inline
|
|
void G4MaterialPropertiesTable::AddConstProperty(const char *key,
|
|
G4double PropertyValue)
|
|
{
|
|
// Provides a way of adding a constant property to the Material Properties
|
|
// Table given a key
|
|
|
|
MPTC [G4String(key)] = PropertyValue;
|
|
}
|
|
|
|
inline
|
|
G4MaterialPropertyVector* G4MaterialPropertiesTable::AddProperty(
|
|
const char *key,
|
|
G4double *PhotonEnergies,
|
|
G4double *PropertyValues,
|
|
G4int NumEntries)
|
|
{
|
|
// Provides a way of adding a property to the Material Properties
|
|
// Table given a pair of numbers and a key
|
|
|
|
G4MaterialPropertyVector *mpv = new G4MaterialPropertyVector(PhotonEnergies,
|
|
PropertyValues, NumEntries);
|
|
MPT [G4String(key)] = mpv;
|
|
|
|
return mpv;
|
|
}
|
|
|
|
inline
|
|
void G4MaterialPropertiesTable::
|
|
AddProperty(const char *key, G4MaterialPropertyVector *mpv)
|
|
{
|
|
// Provides a way of adding a property to the Material Properties
|
|
// Table given an G4MaterialPropertyVector Reference and a key
|
|
|
|
MPT [G4String(key)] = mpv;
|
|
}
|
|
|
|
inline
|
|
void G4MaterialPropertiesTable::RemoveConstProperty(const char *key)
|
|
{
|
|
MPTC.erase(G4String(key));
|
|
}
|
|
|
|
inline
|
|
void G4MaterialPropertiesTable::RemoveProperty(const char *key)
|
|
{
|
|
MPT.erase(G4String(key));
|
|
}
|