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

Last change on this file since 822 was 822, checked in by garnier, 16 years ago

import all except CVS

File size: 3.4 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.1 2007/04/25 16:19:26 gum Exp $
28// GEANT4 tag $Name:  $
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// Methods
55//
56
57const G4SurfacePropertyTable* G4SurfaceProperty::GetSurfacePropertyTable()
58{
59  return &theSurfacePropertyTable;
60}
61
62size_t G4SurfaceProperty::GetNumberOfSurfaceProperties()
63{
64  return theSurfacePropertyTable.size();
65}
66
67// Dump info for known surface properties
68//
69void G4SurfaceProperty::DumpInfo()
70{
71  G4cout << "***** Surface Property Table : Nb of Surface Properties = "
72         << GetNumberOfSurfaceProperties() << " *****" << G4endl;
73
74  for (size_t i=0; i<theSurfacePropertyTable.size(); i++)
75  {
76    G4SurfaceProperty* pSurfaceProperty = theSurfacePropertyTable[i];
77    G4cout << pSurfaceProperty->GetName() << " : " << G4endl
78           << "  Surface Property type   = " 
79           << pSurfaceProperty->GetType()
80           << G4endl;
81  }
82  G4cout << G4endl;
83}
84
85void G4SurfaceProperty::CleanSurfacePropertyTable()
86{
87  DumpInfo();
88  G4SurfacePropertyTable::iterator pos;
89  for(pos=theSurfacePropertyTable.begin();
90      pos!=theSurfacePropertyTable.end(); pos++)
91  {
92    if (*pos) delete *pos;
93  }
94  theSurfacePropertyTable.clear();
95  DumpInfo();
96}
Note: See TracBrowser for help on using the repository browser.