Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4MoleculeTable Class Reference

#include <G4MoleculeTable.hh>

Collaboration diagram for G4MoleculeTable:

Public Member Functions

virtual ~G4MoleculeTable ()
 
G4MoleculeDefinitionCreateMoleculeDefinition (const G4String &userIdentifier, double diffusion_coefficient)
 
G4MolecularConfigurationCreateConfiguration (const G4String &userIdentifier, const G4MoleculeDefinition *molDef, const G4String &configurationLabel, const G4ElectronOccupancy &eOcc)
 
G4MolecularConfigurationCreateConfiguration (const G4String &userIdentifier, G4MoleculeDefinition *, int charge, double diffusion_coefficient=-1)
 
G4MolecularConfigurationCreateConfiguration (const G4String &userIdentifier, G4MoleculeDefinition *)
 
G4MolecularConfigurationCreateConfiguration (const G4String &userIdentifier, G4MoleculeDefinition *, const G4String &configurationLabel, int charge=0)
 
G4MoleculeDefinitionGetMoleculeDefinition (const G4String &, bool mustExist=true)
 
G4MolecularConfigurationGetConfiguration (const G4String &, bool mustExist=true)
 
G4MolecularConfigurationGetConfiguration (G4int id)
 
void Insert (G4MoleculeDefinition *)
 
void Finalize (G4MoleculeDefinition *)
 
void Finalize ()
 
G4MoleculeDefinitionIterator GetDefintionIterator ()
 
G4ConfigurationIterator GetConfigurationIterator ()
 
void PrepareMolecularConfiguration ()
 
int GetNumberOfDefinedSpecies ()
 

Static Public Member Functions

static G4MoleculeTableInstance ()
 
static G4MoleculeTableGetMoleculeTable ()
 

Protected Types

typedef std::map< G4String,
G4MoleculeDefinition * > 
MoleculeDefTable
 

Protected Member Functions

 G4MoleculeTable ()
 

Protected Attributes

MoleculeDefTable fMoleculeDefTable
 

Static Protected Attributes

static G4MoleculeTablefpgMoleculeTable
 

Detailed Description

Definition at line 58 of file G4MoleculeTable.hh.

Member Typedef Documentation

Definition at line 131 of file G4MoleculeTable.hh.

Constructor & Destructor Documentation

G4MoleculeTable::~G4MoleculeTable ( )
virtual

Definition at line 47 of file G4MoleculeTable.cc.

48 {
49 }
G4MoleculeTable::G4MoleculeTable ( )
protected

Definition at line 41 of file G4MoleculeTable.cc.

42 {
43 }

Here is the caller graph for this function:

Member Function Documentation

G4MolecularConfiguration * G4MoleculeTable::CreateConfiguration ( const G4String userIdentifier,
const G4MoleculeDefinition molDef,
const G4String configurationLabel,
const G4ElectronOccupancy eOcc 
)

Definition at line 233 of file G4MoleculeTable.cc.

237 {
238  bool alreadyCreated(false);
239 
240  G4MolecularConfiguration* molConf =
242  molDef,
243  configurationLabel,
244  eOcc,
245  alreadyCreated);
246 
247  return molConf;
248 }
static G4MolecularConfiguration * CreateMolecularConfiguration(const G4String &userIdentifier, const G4MoleculeDefinition *, bool &wasAlreadyCreated)

Here is the call graph for this function:

Here is the caller graph for this function:

G4MolecularConfiguration * G4MoleculeTable::CreateConfiguration ( const G4String userIdentifier,
G4MoleculeDefinition molDef,
int  charge,
double  diffusion_coefficient = -1 
)

Definition at line 209 of file G4MoleculeTable.cc.

213 {
214  bool alreadyCreated(false);
215 
216  G4MolecularConfiguration* molConf =
218  molDef,
219  charge,
220  userIdentifier,
221  alreadyCreated);
222 
223  if(diffusion_coefficient!=-1) // TODO
224  {
225  molConf->SetDiffusionCoefficient(diffusion_coefficient);
226  }
227  return molConf;
228 }
static G4MolecularConfiguration * CreateMolecularConfiguration(const G4String &userIdentifier, const G4MoleculeDefinition *, bool &wasAlreadyCreated)

Here is the call graph for this function:

G4MolecularConfiguration * G4MoleculeTable::CreateConfiguration ( const G4String userIdentifier,
G4MoleculeDefinition molDef 
)

Definition at line 173 of file G4MoleculeTable.cc.

175 {
176  bool alreadyCreated(false);
177 
178  G4MolecularConfiguration* molConf =
180  molDef,
181  alreadyCreated);
182 
183  return molConf;
184 }
static G4MolecularConfiguration * CreateMolecularConfiguration(const G4String &userIdentifier, const G4MoleculeDefinition *, bool &wasAlreadyCreated)

Here is the call graph for this function:

G4MolecularConfiguration * G4MoleculeTable::CreateConfiguration ( const G4String userIdentifier,
G4MoleculeDefinition molDef,
const G4String configurationLabel,
int  charge = 0 
)

Definition at line 189 of file G4MoleculeTable.cc.

193 {
194  bool alreadyCreated(false);
195 
196  G4MolecularConfiguration* molConf =
198  molDef,
199  charge,
200  configurationLabel,
201  alreadyCreated);
202 
203  return molConf;
204 }
static G4MolecularConfiguration * CreateMolecularConfiguration(const G4String &userIdentifier, const G4MoleculeDefinition *, bool &wasAlreadyCreated)

Here is the call graph for this function:

G4MoleculeDefinition * G4MoleculeTable::CreateMoleculeDefinition ( const G4String userIdentifier,
double  diffusion_coefficient 
)

Definition at line 69 of file G4MoleculeTable.cc.

71 {
72  return new G4MoleculeDefinition(name, -1 /* mass*/,
73  diffusion_coefficient);
74 }
const XML_Char * name
Definition: expat.h:151
void G4MoleculeTable::Finalize ( G4MoleculeDefinition )
inline

Definition at line 112 of file G4MoleculeTable.hh.

112 {}

Here is the caller graph for this function:

void G4MoleculeTable::Finalize ( )

Definition at line 252 of file G4MoleculeTable.cc.

Here is the call graph for this function:

G4MolecularConfiguration * G4MoleculeTable::GetConfiguration ( const G4String name,
bool  mustExist = true 
)

Definition at line 105 of file G4MoleculeTable.cc.

106 {
107  G4MolecularConfiguration* species =
109 
110  if(species == 0 && mustExist)
111  {
112  // exception
113  G4ExceptionDescription description;
114  description << "The configuration " << name
115  << " was not recorded in the table" << G4endl;
116  G4Exception("G4MoleculeTable::GetConfiguration",
117  "CONF_NOT_CREATED",
119  description);
120  }
121 
122  return species;
123 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
static G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *, const G4String &label)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4MolecularConfiguration * G4MoleculeTable::GetConfiguration ( G4int  id)

Definition at line 128 of file G4MoleculeTable.cc.

129 {
130  G4MolecularConfiguration* species =
132 
133  return species;
134 }
static G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *, const G4String &label)

Here is the call graph for this function:

G4ConfigurationIterator G4MoleculeTable::GetConfigurationIterator ( )

Definition at line 259 of file G4MoleculeTable.cc.

260 {
262 }
static std::map< G4String, G4MolecularConfiguration * > & GetUserIDTable()
G4MoleculeIterator< G4MolecularConfiguration > G4ConfigurationIterator

Here is the call graph for this function:

Here is the caller graph for this function:

G4MoleculeDefinitionIterator G4MoleculeTable::GetDefintionIterator ( )
inline

Definition at line 116 of file G4MoleculeTable.hh.

117  {
119  }
G4MoleculeIterator< G4MoleculeDefinition > G4MoleculeDefinitionIterator
MoleculeDefTable fMoleculeDefTable

Here is the caller graph for this function:

G4MoleculeDefinition * G4MoleculeTable::GetMoleculeDefinition ( const G4String name,
bool  mustExist = true 
)

Definition at line 79 of file G4MoleculeTable.cc.

81 {
82  MoleculeDefTable::iterator it = fMoleculeDefTable.find(name);
83  G4MoleculeDefinition* definition(0);
84  if (it != fMoleculeDefTable.end())
85  {
86  definition = it->second;
87  }
88  else if(mustExist)
89  {
90  // exception
91  G4ExceptionDescription description;
92  description << "The molecule definition " << name
93  << " was NOT recorded in the table" << G4endl;
94  G4Exception("G4MoleculeTable::CreateMoleculeModel",
95  "MOLECULE_DEFINITION_NOT_CREATED",
97  description);
98  }
99  return definition;
100 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
MoleculeDefTable fMoleculeDefTable
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4MoleculeTable * G4MoleculeTable::GetMoleculeTable ( )
static

Definition at line 61 of file G4MoleculeTable.cc.

62 {
63  return Instance();
64 }
static G4MoleculeTable * Instance()

Here is the call graph for this function:

Here is the caller graph for this function:

int G4MoleculeTable::GetNumberOfDefinedSpecies ( )

Definition at line 266 of file G4MoleculeTable.cc.

Here is the call graph for this function:

void G4MoleculeTable::Insert ( G4MoleculeDefinition moleculeDefinition)

Definition at line 138 of file G4MoleculeTable.cc.

139 {
140 
141  const G4String& name = moleculeDefinition->GetName();
142  MoleculeDefTable::iterator it = fMoleculeDefTable.find(name);
143  if (it == fMoleculeDefTable.end())
144  {
145  fMoleculeDefTable[name] = moleculeDefinition;
146  }
147  else
148  {
149  // exception
150  G4ExceptionDescription description;
151  description << "The molecule definition " << name
152  << " was already recorded in the table" << G4endl;
153  G4Exception("G4MoleculeTable::CreateMoleculeDefinition",
154  "DEFINITION_ALREADY_CREATED", FatalException, description);
155  }
156 }
const XML_Char * name
Definition: expat.h:151
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
const G4String & GetName() const
MoleculeDefTable fMoleculeDefTable
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4MoleculeTable * G4MoleculeTable::Instance ( void  )
static

Definition at line 53 of file G4MoleculeTable.cc.

54 {
56  return fpgMoleculeTable;
57 }
static G4MoleculeTable * fpgMoleculeTable

Here is the call graph for this function:

Here is the caller graph for this function:

void G4MoleculeTable::PrepareMolecularConfiguration ( )

Definition at line 160 of file G4MoleculeTable.cc.

161 {
162  MoleculeDefTable::iterator it = fMoleculeDefTable.begin();
163 
164  for(; it != fMoleculeDefTable.end() ; ++it)
165  {
167  }
168 }
static G4MolecularConfiguration * GetOrCreateMolecularConfiguration(const G4MoleculeDefinition *)
MoleculeDefTable fMoleculeDefTable

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

MoleculeDefTable G4MoleculeTable::fMoleculeDefTable
protected

Definition at line 133 of file G4MoleculeTable.hh.

G4MoleculeTable * G4MoleculeTable::fpgMoleculeTable
staticprotected

Definition at line 130 of file G4MoleculeTable.hh.


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