G4MoleculeHandleManager Class Reference

#include <G4MoleculeHandleManager.hh>


Public Member Functions

 ~G4MoleculeHandleManager ()
G4MoleculeHandle GetMoleculeHandle (const G4Molecule *)

Static Public Member Functions

static G4MoleculeHandleManagerInstance ()
static void DeleteInstance ()

Data Structures

struct  CompMoleculePointer


Detailed Description

Definition at line 50 of file G4MoleculeHandleManager.hh.


Constructor & Destructor Documentation

G4MoleculeHandleManager::~G4MoleculeHandleManager (  ) 

Definition at line 45 of file G4MoleculeHandleManager.cc.

00046 {
00047     if(fMoleculeHandle.empty() == false)
00048     {
00049         MoleculeHandleMap::iterator it = fMoleculeHandle.begin();
00050         for( ; it != fMoleculeHandle.end() ; it++)
00051         {
00052             it->second.reset();
00053         }
00054     }
00055 }


Member Function Documentation

void G4MoleculeHandleManager::DeleteInstance (  )  [static]

Definition at line 57 of file G4MoleculeHandleManager.cc.

00058 {
00059     if(fInstance)
00060     {
00061         delete fInstance;
00062         fInstance = 0;
00063     }
00064 }

G4MoleculeHandle G4MoleculeHandleManager::GetMoleculeHandle ( const G4Molecule  ) 

Definition at line 75 of file G4MoleculeHandleManager.cc.

Referenced by G4DNAMolecularReactionData::SetReactive(), G4DNAMolecularReactionData::SetReactive1(), and G4DNAMolecularReactionData::SetReactive2().

00076 {
00077     MoleculeHandleMap::iterator it = fMoleculeHandle.find(molecule);
00078     G4MoleculeHandle molHandle;
00079 
00080     if(it != fMoleculeHandle.end())
00081     {
00082         molHandle = G4MoleculeHandle(it->second);
00083     }
00084     else
00085     {
00086         molHandle = G4MoleculeHandle(molecule);
00087         fMoleculeHandle.insert(make_pair(molecule, G4MoleculeHandle(molHandle)));
00088     }
00089 
00090     return molHandle;
00091 }

G4MoleculeHandleManager * G4MoleculeHandleManager::Instance (  )  [static]

Definition at line 66 of file G4MoleculeHandleManager.cc.

Referenced by G4MolecularDecayChannel::AddProduct(), G4DNAMolecularReactionData::AddProduct(), G4DNAMolecularReactionData::SetReactive(), G4DNAMolecularReactionData::SetReactive1(), and G4DNAMolecularReactionData::SetReactive2().

00067 {
00068     if(!fInstance)
00069     {
00070         fInstance = new G4MoleculeHandleManager;
00071     }
00072     return fInstance;
00073 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:30 2013 for Geant4 by  doxygen 1.4.7