45 #ifndef G4MoleculeCounter_h
46 #define G4MoleculeCounter_h
71 typedef std::map<G4double, G4int, compDoubleWithPrecision>
85 typedef std::unique_ptr<std::vector<G4MolecularConfiguration*> >
111 #ifdef MOLECULE_COUNTER_TESTING
133 int number = 1)
override;
137 int number = 1)
override;
187 G4cout <<
" ---> G4MoleculeCounter::ResetCounter" <<
G4endl;
void AddAMoleculeAtTime(G4MolecularConfiguration *, G4double time, const G4ThreeVector *position=nullptr, int number=1) override
void CheckTimeForConsistency(G4bool flag)
int SearchUpperBoundTime(double time, bool sameTypeOfMolecule)
std::vector< ExP01TrackerHit * > a
void ResetCounter() override
CounterMapType fCounterMap
std::set< G4double >::iterator RecordedTimesIterator
bool IsRegistered(const G4MoleculeDefinition *) override
std::unique_ptr< std::vector< G4MolecularConfiguration * > > RecordedMolecules
void RemoveAMoleculeAtTime(G4MolecularConfiguration *, G4double time, const G4ThreeVector *position=nullptr, int number=1) override
G4bool SearchTimeMap(G4MolecularConfiguration *molecule)
std::map< const G4MoleculeDefinition *, G4bool > fDontRegister
int GetNMoleculesAtTime(G4MolecularConfiguration *molecule, double time)
std::unique_ptr< Search > fpLastSearch
void RegisterAll() override
RecordedMolecules GetRecordedMolecules()
const NbMoleculeAgainstTime & GetNbMoleculeAgainstTime(G4MolecularConfiguration *molecule)
G4GLOB_DLL std::ostream G4cout
static G4MoleculeCounter * Instance()
std::map< G4MolecularConfiguration *, NbMoleculeAgainstTime > CounterMapType
void Initialize() override
G4bool IsTimeCheckedForConsistency() const
bool operator()(const double &a, const double &b) const
CounterMapType::iterator fLastMoleculeSearched
std::unique_ptr< std::set< G4double > > RecordedTimes
static G4ThreadLocal double fPrecision
NbMoleculeAgainstTime::iterator fLowerBoundTime
void DontRegister(const G4MoleculeDefinition *) override
std::map< G4double, G4int, compDoubleWithPrecision > NbMoleculeAgainstTime
G4bool fCheckTimeIsConsistentWithScheduler
RecordedTimes GetRecordedTimes()
virtual ~G4MoleculeCounter()
void SetTimeSlice(double)