Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ITTypeManager Class Reference

#include <G4ITType.hh>

Public Member Functions

G4ITType NewType ()
 
size_t size () const
 
void ReserveRessource ()
 
void ReleaseRessource ()
 

Static Public Member Functions

static G4ITTypeManagerInstance ()
 
static void DeleteInstance ()
 

Detailed Description

Definition at line 92 of file G4ITType.hh.

Member Function Documentation

◆ DeleteInstance()

void G4ITTypeManager::DeleteInstance ( )
static

Definition at line 66 of file G4ITType.cc.

67{
69 if(fgInstance)
70 {
71 delete fgInstance ;
72 fgInstance = 0;
73 }
74}
G4Mutex deleteMutex
Definition: G4ITType.cc:41

Referenced by ReleaseRessource().

◆ Instance()

G4ITTypeManager * G4ITTypeManager::Instance ( )
static

Definition at line 57 of file G4ITType.cc.

58{
59 if(fgInstance == 0)
60 {
61 fgInstance = new G4ITTypeManager();
62 }
63 return fgInstance;
64}

Referenced by G4Scheduler::Clear(), and G4ITType::size().

◆ NewType()

G4ITType G4ITTypeManager::NewType ( )

Definition at line 104 of file G4ITType.cc.

105{
106 G4ITType newType = fLastType;
107 fLastType++;
108 return newType;
109}

◆ ReleaseRessource()

void G4ITTypeManager::ReleaseRessource ( )

Definition at line 82 of file G4ITType.cc.

83{
85 fRessource--;
86
87 if(fRessource <= 0) DeleteInstance();
88}
G4Mutex ressourceMutex
Definition: G4ITType.cc:42
static void DeleteInstance()
Definition: G4ITType.cc:66

Referenced by G4Scheduler::Clear().

◆ ReserveRessource()

void G4ITTypeManager::ReserveRessource ( )

Definition at line 76 of file G4ITType.cc.

77{
79 fRessource++;
80}

◆ size()

size_t G4ITTypeManager::size ( ) const

Definition at line 99 of file G4ITType.cc.

100{
101 return fLastType;
102}

Referenced by G4ITType::size().


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