Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VMoleculeCounter Class Referenceabstract

#include <G4VMoleculeCounter.hh>

Inheritance diagram for G4VMoleculeCounter:
Collaboration diagram for G4VMoleculeCounter:

Public Member Functions

virtual void Initialize ()=0
 
virtual void ResetCounter ()=0
 
virtual void AddAMoleculeAtTime (G4MolecularConfiguration *, G4double time, const G4ThreeVector *position=nullptr, int number=1)=0
 
virtual void RemoveAMoleculeAtTime (G4MolecularConfiguration *, G4double time, const G4ThreeVector *position=nullptr, int number=1)=0
 
virtual void DontRegister (const G4MoleculeDefinition *)
 
virtual bool IsRegistered (const G4MoleculeDefinition *)
 
virtual void RegisterAll ()
 

Static Public Member Functions

static void SetInstance (G4VMoleculeCounter *)
 
static void DeleteInstance ()
 
static G4VMoleculeCounterInstance ()
 
static void InitializeInstance ()
 
static void Use (G4bool flag=true)
 
static G4bool InUse ()
 

Protected Member Functions

 G4VMoleculeCounter ()
 
virtual ~G4VMoleculeCounter ()
 

Static Protected Attributes

static G4ThreadLocal
G4VMoleculeCounter
fpInstance = 0
 
static G4bool fUse = false
 

Detailed Description

Definition at line 43 of file G4VMoleculeCounter.hh.

Constructor & Destructor Documentation

G4VMoleculeCounter::G4VMoleculeCounter ( )
inlineprotected

Definition at line 48 of file G4VMoleculeCounter.hh.

48 {}
virtual G4VMoleculeCounter::~G4VMoleculeCounter ( )
inlineprotectedvirtual

Definition at line 49 of file G4VMoleculeCounter.hh.

49 {}

Member Function Documentation

virtual void G4VMoleculeCounter::AddAMoleculeAtTime ( G4MolecularConfiguration ,
G4double  time,
const G4ThreeVector position = nullptr,
int  number = 1 
)
pure virtual

Implemented in G4MoleculeCounter.

void G4VMoleculeCounter::DeleteInstance ( )
static

Definition at line 75 of file G4VMoleculeCounter.cc.

76 {
77  if (fpInstance){
78  delete fpInstance;
79  fpInstance = 0;
80  }
81 }
static G4ThreadLocal G4VMoleculeCounter * fpInstance

Here is the caller graph for this function:

virtual void G4VMoleculeCounter::DontRegister ( const G4MoleculeDefinition )
inlinevirtual

Reimplemented in G4MoleculeCounter.

Definition at line 87 of file G4VMoleculeCounter.hh.

87 {}
virtual void G4VMoleculeCounter::Initialize ( )
pure virtual

Implemented in G4MoleculeCounter.

void G4VMoleculeCounter::InitializeInstance ( )
static

Definition at line 85 of file G4VMoleculeCounter.cc.

86 {
88 }
static G4ThreadLocal G4VMoleculeCounter * fpInstance
virtual void Initialize()=0

Here is the caller graph for this function:

G4VMoleculeCounter * G4VMoleculeCounter::Instance ( )
static

Definition at line 67 of file G4VMoleculeCounter.cc.

68 {
70  return fpInstance;
71 }
static G4ThreadLocal G4VMoleculeCounter * fpInstance

Here is the caller graph for this function:

G4bool G4VMoleculeCounter::InUse ( )
static

Definition at line 99 of file G4VMoleculeCounter.cc.

100 {
101  return fUse;
102 }

Here is the caller graph for this function:

virtual bool G4VMoleculeCounter::IsRegistered ( const G4MoleculeDefinition )
inlinevirtual

Reimplemented in G4MoleculeCounter.

Definition at line 88 of file G4VMoleculeCounter.hh.

88  {
89  return false;
90  }
virtual void G4VMoleculeCounter::RegisterAll ( )
inlinevirtual

Reimplemented in G4MoleculeCounter.

Definition at line 91 of file G4VMoleculeCounter.hh.

91 {}
virtual void G4VMoleculeCounter::RemoveAMoleculeAtTime ( G4MolecularConfiguration ,
G4double  time,
const G4ThreeVector position = nullptr,
int  number = 1 
)
pure virtual

Implemented in G4MoleculeCounter.

virtual void G4VMoleculeCounter::ResetCounter ( )
pure virtual

Implemented in G4MoleculeCounter.

Here is the caller graph for this function:

void G4VMoleculeCounter::SetInstance ( G4VMoleculeCounter instance)
static

Definition at line 45 of file G4VMoleculeCounter.cc.

46 {
47  if (fpInstance!=0){
49  errMsg<< "The G4MoleculeCounter was already initialized." << G4endl
50  << "The previous instance will be deleted in order to use yours." << G4endl
51  << "However this can generate conflicts. Make sure you call G4MoleculeCounter::SetInstance at the beginning of your application."
52  << "A good place would be ActionInitialization::Build & BuildForMaster"
53  << G4endl;
54 
55  G4Exception("G4MoleculeCounter::SetInstance",
56  "SINGLETON_ALREADY_INITIALIZED",
57  JustWarning, errMsg);
58  delete fpInstance;
59  fpInstance = 0;
60  }
61 
62  fpInstance = instance;
63 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
static G4ThreadLocal G4VMoleculeCounter * fpInstance
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:

void G4VMoleculeCounter::Use ( G4bool  flag = true)
static

Definition at line 92 of file G4VMoleculeCounter.cc.

93 {
94  fUse=flag;
95 }

Member Data Documentation

G4ThreadLocal G4VMoleculeCounter * G4VMoleculeCounter::fpInstance = 0
staticprotected

Definition at line 45 of file G4VMoleculeCounter.hh.

G4bool G4VMoleculeCounter::fUse = false
staticprotected

Definition at line 46 of file G4VMoleculeCounter.hh.


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