source: trunk/source/materials/src/G4SurfaceProperty.cc@ 986

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

fichiers manquants

File size: 3.9 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: G4SurfaceProperty.cc,v 1.5 2008/12/11 10:23:54 gcosmo Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30//
31////////////////////////////////////////////////////////////////////////
32// G4SurfaceProperty Implementation
33////////////////////////////////////////////////////////////////////////
34//
35// Class Description:
36//
37// A base class describing a surface property.
38// Derived classes are G4Opticalsurface, G4Firovsurface, etc.
39//
40// File: G4SurfaceProperty.cc
41// Version: 1.0
42// Created: 16-11-2006
43// Author: Peter Gumplinger
44//
45////////////////////////////////////////////////////////////////////////
46
47#include "globals.hh"
48
49#include "G4SurfaceProperty.hh"
50
51G4SurfacePropertyTable G4SurfaceProperty::theSurfacePropertyTable;
52
53//
54// Constructor and destructor
55//
56G4SurfaceProperty::G4SurfaceProperty( const G4String& name,
57 G4SurfaceType type )
58 : theName(name), theType(type)
59{
60 theSurfacePropertyTable.push_back(this);
61}
62
63//
64// Dummy constructor
65//
66G4SurfaceProperty::G4SurfaceProperty()
67 : theName("Dielectric"), theType(dielectric_metal)
68{
69 theSurfacePropertyTable.push_back(this);
70}
71
72G4SurfaceProperty::~G4SurfaceProperty()
73{
74}
75
76//
77// Methods
78//
79
80const G4SurfacePropertyTable* G4SurfaceProperty::GetSurfacePropertyTable()
81{
82 return &theSurfacePropertyTable;
83}
84
85size_t G4SurfaceProperty::GetNumberOfSurfaceProperties()
86{
87 return theSurfacePropertyTable.size();
88}
89
90// Dump info for known surface properties
91//
92void G4SurfaceProperty::DumpTableInfo()
93{
94 G4cout << "***** Surface Property Table : Nb of Surface Properties = "
95 << GetNumberOfSurfaceProperties() << " *****" << G4endl;
96
97 for (size_t i=0; i<theSurfacePropertyTable.size(); i++)
98 {
99 G4SurfaceProperty* pSurfaceProperty = theSurfacePropertyTable[i];
100 G4cout << pSurfaceProperty->GetName() << " : " << G4endl
101 << " Surface Property type = "
102 << pSurfaceProperty->GetType()
103 << G4endl;
104 }
105 G4cout << G4endl;
106}
107
108void G4SurfaceProperty::CleanSurfacePropertyTable()
109{
110 DumpTableInfo();
111 G4SurfacePropertyTable::iterator pos;
112 for(pos=theSurfacePropertyTable.begin();
113 pos!=theSurfacePropertyTable.end(); pos++)
114 {
115 if (*pos) delete *pos;
116 }
117 theSurfacePropertyTable.clear();
118 DumpTableInfo();
119}
Note: See TracBrowser for help on using the repository browser.