45 #ifndef G4MoleculeCounter_h
46 #define G4MoleculeCounter_h
78 #if __cplusplus > 199711L && !defined __clang__
79 #define stdunique_ptr std::unique_ptr
81 #define stdunique_ptr std::auto_ptr
127 #ifdef MOLECULE_COUNTER_TESTING
194 fCheckTimeIsConsistentWithScheduler = flag;
202 G4cout <<
" ---> G4MoleculeCounter::ResetCounter" <<
G4endl;
The pointer G4MolecularConfiguration will be shared by all the molecules having the same molecule def...
void CheckTimeForConsistency(G4bool flag)
stdunique_ptr< Search > fpLastSearch
int SearchUpperBoundTime(double time, bool sameTypeOfMolecule)
CounterMapType fCounterMap
std::set< G4double >::iterator RecordedTimesIterator
static G4MoleculeCounter * GetMoleculeCounter()
virtual void RemoveAMoleculeAtTime(G4MolecularConfiguration *, G4double time, int number=1)
stdunique_ptr< std::vector< G4MolecularConfiguration * > > RecordedMolecules
G4bool SearchTimeMap(G4MolecularConfiguration *molecule)
std::map< const G4MoleculeDefinition *, G4bool > fDontRegister
int GetNMoleculesAtTime(G4MolecularConfiguration *molecule, double time)
virtual void RegisterAll()
RecordedMolecules GetRecordedMolecules()
virtual void DontRegister(const G4MoleculeDefinition *)
const NbMoleculeAgainstTime & GetNbMoleculeAgainstTime(G4MolecularConfiguration *molecule)
G4GLOB_DLL std::ostream G4cout
static G4MoleculeCounter * Instance()
std::map< G4MolecularConfiguration *, NbMoleculeAgainstTime > CounterMapType
stdunique_ptr< std::set< G4double > > RecordedTimes
G4bool IsTimeCheckedForConsistency() const
static void Use(G4bool flag=true)
virtual void AddAMoleculeAtTime(G4MolecularConfiguration *, G4double time, int number=1)
bool operator()(const double &a, const double &b) const
CounterMapType::iterator fLastMoleculeSearched
virtual void ResetCounter()
virtual bool IsRegistered(const G4MoleculeDefinition *)
static G4ThreadLocal double fPrecision
NbMoleculeAgainstTime::iterator fLowerBoundTime
static G4ThreadLocal G4MoleculeCounter * fpInstance
std::map< G4double, G4int, compDoubleWithPrecision > NbMoleculeAgainstTime
static void InitializeInstance()
G4bool fCheckTimeIsConsistentWithScheduler
RecordedTimes GetRecordedTimes()
Class Description The dynamic molecule holds all the data that change for a molecule It has a pointer...
virtual ~G4MoleculeCounter()
void SetTimeSlice(double)
static void DeleteInstance()