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

#include <G4MoleculeHandleManager.hh>

Public Member Functions

 ~G4MoleculeHandleManager ()
 
G4MoleculeHandle GetMoleculeHandle (const G4Molecule *)
 

Static Public Member Functions

static G4MoleculeHandleManagerInstance ()
 
static void DeleteInstance ()
 

Detailed Description

Definition at line 58 of file G4MoleculeHandleManager.hh.

Constructor & Destructor Documentation

◆ ~G4MoleculeHandleManager()

G4MoleculeHandleManager::~G4MoleculeHandleManager ( )

Definition at line 45 of file G4MoleculeHandleManager.cc.

46{
47 if (fMoleculeHandle.empty() == false)
48 {
49 MoleculeHandleMap::iterator it = fMoleculeHandle.begin();
50 for (; it != fMoleculeHandle.end(); it++)
51 {
52 it->second.reset();
53 }
54 }
55}

Member Function Documentation

◆ DeleteInstance()

void G4MoleculeHandleManager::DeleteInstance ( )
static

Definition at line 57 of file G4MoleculeHandleManager.cc.

58{
59 if (fInstance)
60 {
61 delete fInstance;
62 fInstance = 0;
63 }
64}

◆ GetMoleculeHandle()

G4MoleculeHandle G4MoleculeHandleManager::GetMoleculeHandle ( const G4Molecule molecule)

Definition at line 75 of file G4MoleculeHandleManager.cc.

76{
77 MoleculeHandleMap::iterator it = fMoleculeHandle.find(molecule);
78 G4MoleculeHandle molHandle;
79
80 if (it != fMoleculeHandle.end())
81 {
82 molHandle = G4MoleculeHandle(it->second);
83 }
84 else
85 {
86 molHandle = G4MoleculeHandle(molecule);
87 fMoleculeHandle.insert(make_pair(molecule, G4MoleculeHandle(molHandle)));
88 }
89
90 return molHandle;
91}
G4shared_ptr< const G4Molecule > G4MoleculeHandle

◆ Instance()

G4MoleculeHandleManager * G4MoleculeHandleManager::Instance ( )
static

Definition at line 66 of file G4MoleculeHandleManager.cc.

67{
68 if (!fInstance)
69 {
70 fInstance = new G4MoleculeHandleManager;
71 }
72 return fInstance;
73}

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