Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
WLSMaterials Class Reference

#include <WLSMaterials.hh>

Public Member Functions

virtual ~WLSMaterials ()
 
G4MaterialGetMaterial (const G4String)
 

Static Public Member Functions

static WLSMaterialsGetInstance ()
 

Detailed Description

Definition at line 42 of file WLSMaterials.hh.

Constructor & Destructor Documentation

WLSMaterials::~WLSMaterials ( )
virtual

Definition at line 51 of file WLSMaterials.cc.

52 {
53  delete fPMMA;
54  delete fPethylene;
55  delete fFPethylene;
56  delete fPolystyrene;
57  delete fSilicone;
58 }

Member Function Documentation

WLSMaterials * WLSMaterials::GetInstance ( void  )
static

Definition at line 62 of file WLSMaterials.cc.

Referenced by WLSDetectorConstruction::Construct().

63 {
64  if (fInstance == 0)
65  {
66  fInstance = new WLSMaterials();
67  }
68  return fInstance;
69 }
G4Material * WLSMaterials::GetMaterial ( const G4String  material)

Definition at line 73 of file WLSMaterials.cc.

References FatalException, G4NistManager::FindOrBuildMaterial(), G4Exception(), and G4Material::GetMaterial().

74 {
75  G4Material* mat = fNistMan->FindOrBuildMaterial(material);
76 
77  if (!mat) mat = G4Material::GetMaterial(material);
78  if (!mat) {
79  std::ostringstream o;
80  o << "Material " << material << " not found!";
81  G4Exception("WLSMaterials::GetMaterial","",
82  FatalException,o.str().c_str());
83  }
84 
85  return mat;
86 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:578
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

The documentation for this class was generated from the following files: