Geant4  10.02.p03
G4PhysicsModelCatalog Class Reference

#include <G4PhysicsModelCatalog.hh>

Collaboration diagram for G4PhysicsModelCatalog:

Public Member Functions

 ~G4PhysicsModelCatalog ()
 

Static Public Member Functions

static G4int Register (const G4String &)
 
static const G4StringGetModelName (G4int)
 
static G4int GetIndex (const G4String &)
 
static G4int Entries ()
 
static void Destroy ()
 

Private Member Functions

 G4PhysicsModelCatalog ()
 
 G4PhysicsModelCatalog (const G4PhysicsModelCatalog &)
 
G4PhysicsModelCatalogoperator= (const G4PhysicsModelCatalog &)
 

Static Private Attributes

static modelCatalogcatalog = 0
 

Detailed Description

Definition at line 46 of file G4PhysicsModelCatalog.hh.

Constructor & Destructor Documentation

◆ G4PhysicsModelCatalog() [1/2]

G4PhysicsModelCatalog::G4PhysicsModelCatalog ( )
private

Definition at line 38 of file G4PhysicsModelCatalog.cc.

39 { if(!catalog) {
40  static modelCatalog catal;
41  catalog = &catal;
42  }
43 }
static modelCatalog * catalog
std::vector< G4String > modelCatalog
Here is the caller graph for this function:

◆ G4PhysicsModelCatalog() [2/2]

G4PhysicsModelCatalog::G4PhysicsModelCatalog ( const G4PhysicsModelCatalog )
private

◆ ~G4PhysicsModelCatalog()

G4PhysicsModelCatalog::~G4PhysicsModelCatalog ( )

Definition at line 45 of file G4PhysicsModelCatalog.cc.

46 {}

Member Function Documentation

◆ Destroy()

void G4PhysicsModelCatalog::Destroy ( void  )
static

Definition at line 78 of file G4PhysicsModelCatalog.cc.

79 {}

◆ Entries()

G4int G4PhysicsModelCatalog::Entries ( )
static

Definition at line 75 of file G4PhysicsModelCatalog.cc.

76 { return (catalog) ? G4int(catalog->size()) : -1; }
static modelCatalog * catalog
int G4int
Definition: G4Types.hh:78
Here is the caller graph for this function:

◆ GetIndex()

G4int G4PhysicsModelCatalog::GetIndex ( const G4String name)
static

Definition at line 68 of file G4PhysicsModelCatalog.cc.

69 {
70  for(G4int idx=0;idx<Entries();++idx)
71  { if((*catalog)[idx]==name) return idx; }
72  return -1;
73 }
static modelCatalog * catalog
G4String name
Definition: TRTMaterials.hh:40
int G4int
Definition: G4Types.hh:78
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetModelName()

const G4String & G4PhysicsModelCatalog::GetModelName ( G4int  idx)
static

Definition at line 61 of file G4PhysicsModelCatalog.cc.

62 {
63  static const G4String undef = "Undefined";
64  if(idx>=0 && idx<Entries()) return (*catalog)[idx];
65  return undef;
66 }
static modelCatalog * catalog
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

G4PhysicsModelCatalog& G4PhysicsModelCatalog::operator= ( const G4PhysicsModelCatalog )
private

◆ Register()

G4int G4PhysicsModelCatalog::Register ( const G4String name)
static

Definition at line 49 of file G4PhysicsModelCatalog.cc.

50 {
52  G4int idx = GetIndex(name);
53  if(idx>=0) return idx;
54 #ifdef G4MULTITHREADED
55  if(G4Threading::IsWorkerThread()) return -1;
56 #endif
57  catalog->push_back(name);
58  return catalog->size()-1;
59 }
static modelCatalog * catalog
int G4int
Definition: G4Types.hh:78
G4bool IsWorkerThread()
Definition: G4Threading.cc:135
static G4int GetIndex(const G4String &)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ catalog

modelCatalog * G4PhysicsModelCatalog::catalog = 0
staticprivate

Definition at line 68 of file G4PhysicsModelCatalog.hh.


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