Geant4  10.03
G4MoleculeCounter Class Reference

#include <G4MoleculeCounter.hh>

+ Inheritance diagram for G4MoleculeCounter:
+ Collaboration diagram for G4MoleculeCounter:

Classes

struct  Search
 

Public Types

typedef std::map
< G4MolecularConfiguration
*, NbMoleculeAgainstTime
CounterMapType
 
typedef std::unique_ptr
< std::vector
< G4MolecularConfiguration * > > 
RecordedMolecules
 

Public Member Functions

void Initialize () override
 
void ResetCounter () override
 
void AddAMoleculeAtTime (G4MolecularConfiguration *, G4double time, const G4ThreeVector *position=nullptr, int number=1) override
 
void RemoveAMoleculeAtTime (G4MolecularConfiguration *, G4double time, const G4ThreeVector *position=nullptr, int number=1) override
 
void DontRegister (const G4MoleculeDefinition *) override
 
bool IsRegistered (const G4MoleculeDefinition *) override
 
void RegisterAll () override
 
int GetNMoleculesAtTime (G4MolecularConfiguration *molecule, double time)
 
const NbMoleculeAgainstTimeGetNbMoleculeAgainstTime (G4MolecularConfiguration *molecule)
 
RecordedMolecules GetRecordedMolecules ()
 
RecordedTimes GetRecordedTimes ()
 
void SetVerbose (G4int)
 
G4int GetVerbose ()
 
void SetTimeSlice (double)
 
void Dump ()
 
G4bool IsTimeCheckedForConsistency () const
 
void CheckTimeForConsistency (G4bool flag)
 

Static Public Member Functions

static G4MoleculeCounterInstance ()
 
- Static Public Member Functions inherited from G4VMoleculeCounter
static void SetInstance (G4VMoleculeCounter *)
 
static void DeleteInstance ()
 
static G4VMoleculeCounterInstance ()
 
static void InitializeInstance ()
 
static void Use (G4bool flag=true)
 
static G4bool InUse ()
 

Protected Member Functions

 G4MoleculeCounter ()
 
virtual ~G4MoleculeCounter ()
 
G4bool SearchTimeMap (G4MolecularConfiguration *molecule)
 
int SearchUpperBoundTime (double time, bool sameTypeOfMolecule)
 
- Protected Member Functions inherited from G4VMoleculeCounter
 G4VMoleculeCounter ()
 
virtual ~G4VMoleculeCounter ()
 

Protected Attributes

CounterMapType fCounterMap
 
std::map< const
G4MoleculeDefinition *, G4bool
fDontRegister
 
G4int fVerbose
 
G4bool fCheckTimeIsConsistentWithScheduler
 
std::unique_ptr< SearchfpLastSearch
 

Friends

class G4Molecule
 
class G4VMoleculeCounter
 

Additional Inherited Members

- Static Protected Attributes inherited from G4VMoleculeCounter
static G4ThreadLocal
G4VMoleculeCounter
fpInstance = 0
 
static G4bool fUse = false
 

Detailed Description

Definition at line 79 of file G4MoleculeCounter.hh.

Member Typedef Documentation

typedef std::unique_ptr<std::vector<G4MolecularConfiguration*> > G4MoleculeCounter::RecordedMolecules

Definition at line 86 of file G4MoleculeCounter.hh.

Constructor & Destructor Documentation

G4MoleculeCounter::G4MoleculeCounter ( )
protected

Definition at line 51 of file G4MoleculeCounter.cc.

References compDoubleWithPrecision::fPrecision, and picosecond.

G4MoleculeCounter::~G4MoleculeCounter ( )
protectedvirtual

Definition at line 63 of file G4MoleculeCounter.cc.

Member Function Documentation

void G4MoleculeCounter::AddAMoleculeAtTime ( G4MolecularConfiguration molecule,
G4double  time,
const G4ThreeVector position = nullptr,
int  number = 1 
)
overridevirtual

Implements G4VMoleculeCounter.

Definition at line 217 of file G4MoleculeCounter.cc.

References FatalException, compDoubleWithPrecision::fPrecision, G4BestUnit, G4cout, G4endl, G4Exception(), G4MolecularConfiguration::GetDefinition(), G4MolecularConfiguration::GetName(), and G4Scheduler::Instance().

+ Here is the call graph for this function:

void G4MoleculeCounter::CheckTimeForConsistency ( G4bool  flag)
inline

Definition at line 170 of file G4MoleculeCounter.hh.

void G4MoleculeCounter::DontRegister ( const G4MoleculeDefinition molDef)
inlineoverridevirtual

Reimplemented from G4VMoleculeCounter.

Definition at line 218 of file G4MoleculeCounter.hh.

References fDontRegister.

void G4MoleculeCounter::Dump ( )

Definition at line 440 of file G4MoleculeCounter.cc.

References G4BestUnit, G4cout, G4endl, and G4MolecularConfiguration::GetName().

+ Here is the call graph for this function:

const NbMoleculeAgainstTime & G4MoleculeCounter::GetNbMoleculeAgainstTime ( G4MolecularConfiguration molecule)
inline

Definition at line 196 of file G4MoleculeCounter.hh.

References fCounterMap.

int G4MoleculeCounter::GetNMoleculesAtTime ( G4MolecularConfiguration molecule,
double  time 
)

Definition at line 208 of file G4MoleculeCounter.cc.

Referenced by ScoreSpecies::EndOfEvent().

+ Here is the caller graph for this function:

G4MoleculeCounter::RecordedMolecules G4MoleculeCounter::GetRecordedMolecules ( )

Definition at line 368 of file G4MoleculeCounter.cc.

References G4cout, and G4endl.

Referenced by ScoreSpecies::EndOfEvent().

+ Here is the caller graph for this function:

RecordedTimes G4MoleculeCounter::GetRecordedTimes ( )

Definition at line 387 of file G4MoleculeCounter.cc.

G4int G4MoleculeCounter::GetVerbose ( )
inline

Definition at line 210 of file G4MoleculeCounter.hh.

References fVerbose.

void G4MoleculeCounter::Initialize ( )
overridevirtual

Implements G4VMoleculeCounter.

Definition at line 69 of file G4MoleculeCounter.cc.

References G4MoleculeTable::GetConfigurationIterator(), G4MoleculeTable::Instance(), and G4MoleculeIterator< MOLECULE >::value().

+ Here is the call graph for this function:

G4MoleculeCounter * G4MoleculeCounter::Instance ( void  )
static

Definition at line 44 of file G4MoleculeCounter.cc.

Referenced by ScoreSpecies::EndOfEvent().

+ Here is the caller graph for this function:

bool G4MoleculeCounter::IsRegistered ( const G4MoleculeDefinition molDef)
inlineoverridevirtual

Reimplemented from G4VMoleculeCounter.

Definition at line 226 of file G4MoleculeCounter.hh.

References fDontRegister.

G4bool G4MoleculeCounter::IsTimeCheckedForConsistency ( ) const
inline

Definition at line 165 of file G4MoleculeCounter.hh.

References fCheckTimeIsConsistentWithScheduler.

void G4MoleculeCounter::RegisterAll ( )
inlineoverridevirtual

Reimplemented from G4VMoleculeCounter.

Definition at line 234 of file G4MoleculeCounter.hh.

References fDontRegister.

void G4MoleculeCounter::RemoveAMoleculeAtTime ( G4MolecularConfiguration molecule,
G4double  time,
const G4ThreeVector position = nullptr,
int  number = 1 
)
overridevirtual

Implements G4VMoleculeCounter.

Definition at line 272 of file G4MoleculeCounter.cc.

References FatalErrorInArgument, FatalException, compDoubleWithPrecision::fPrecision, G4BestUnit, G4cout, G4endl, G4Exception(), G4MolecularConfiguration::GetDefinition(), G4MolecularConfiguration::GetName(), G4Scheduler::Instance(), and G4MolecularConfiguration::PrintState().

+ Here is the call graph for this function:

void G4MoleculeCounter::ResetCounter ( )
inlineoverridevirtual

Implements G4VMoleculeCounter.

Definition at line 183 of file G4MoleculeCounter.hh.

References fCounterMap, fpLastSearch, fVerbose, G4cout, and G4endl.

Referenced by ScoreSpecies::EndOfEvent().

+ Here is the caller graph for this function:

G4bool G4MoleculeCounter::SearchTimeMap ( G4MolecularConfiguration molecule)
protected

Definition at line 97 of file G4MoleculeCounter.cc.

int G4MoleculeCounter::SearchUpperBoundTime ( double  time,
bool  sameTypeOfMolecule 
)
protected

Definition at line 129 of file G4MoleculeCounter.cc.

void G4MoleculeCounter::SetTimeSlice ( double  timeSlice)

Definition at line 90 of file G4MoleculeCounter.cc.

References compDoubleWithPrecision::fPrecision.

void G4MoleculeCounter::SetVerbose ( G4int  level)
inline

Definition at line 203 of file G4MoleculeCounter.hh.

References fVerbose.

Friends And Related Function Documentation

friend class G4Molecule
friend

Definition at line 117 of file G4MoleculeCounter.hh.

friend class G4VMoleculeCounter
friend

Definition at line 118 of file G4MoleculeCounter.hh.

Member Data Documentation

G4bool G4MoleculeCounter::fCheckTimeIsConsistentWithScheduler
protected

Definition at line 97 of file G4MoleculeCounter.hh.

Referenced by IsTimeCheckedForConsistency().

CounterMapType G4MoleculeCounter::fCounterMap
protected

Definition at line 93 of file G4MoleculeCounter.hh.

Referenced by GetNbMoleculeAgainstTime(), and ResetCounter().

std::map<const G4MoleculeDefinition*, G4bool> G4MoleculeCounter::fDontRegister
protected

Definition at line 94 of file G4MoleculeCounter.hh.

Referenced by DontRegister(), IsRegistered(), and RegisterAll().

std::unique_ptr<Search> G4MoleculeCounter::fpLastSearch
protected

Definition at line 109 of file G4MoleculeCounter.hh.

Referenced by ResetCounter().

G4int G4MoleculeCounter::fVerbose
protected

Definition at line 96 of file G4MoleculeCounter.hh.

Referenced by GetVerbose(), ResetCounter(), and SetVerbose().


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