#include <G4MoleculeCounter.hh>
Definition at line 79 of file G4MoleculeCounter.hh.
 
  
  
      
        
          | G4MoleculeCounter::G4MoleculeCounter  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 51 of file G4MoleculeCounter.cc.
static constexpr double picosecond
 
static G4ThreadLocal double fPrecision
 
G4bool fCheckTimeIsConsistentWithScheduler
 
 
 
 
  
  
      
        
          | G4MoleculeCounter::~G4MoleculeCounter  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protectedvirtual   | 
  
 
 
Implements G4VMoleculeCounter.
Definition at line 217 of file G4MoleculeCounter.cc.
  225     G4cout << 
"G4MoleculeCounter::AddAMoleculeAtTime : " << molecule->
GetName()
 
  229   CounterMapType::iterator counterMap_i =
 
  235   else if (counterMap_i->second.empty()){
 
  236     counterMap_i->second[time] = number;
 
  239     NbMoleculeAgainstTime::reverse_iterator end = counterMap_i->second.rbegin();
 
  241     if (end->first <= time ||
 
  246       double newValue =  end->second + number;
 
  247       counterMap_i->second[time] = newValue;
 
  255         errMsg << 
"Time of species " 
  256             << molecule->
GetName() << 
" is " 
  258             << 
" global time is " 
  261         G4Exception(
"G4MoleculeCounter::RemoveAMoleculeAtTime",
 
const G4String & GetName() const 
 
std::ostringstream G4ExceptionDescription
 
CounterMapType fCounterMap
 
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1 
 
static G4Scheduler * Instance()
 
std::map< const G4MoleculeDefinition *, G4bool > fDontRegister
 
G4GLOB_DLL std::ostream G4cout
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
static G4ThreadLocal double fPrecision
 
const G4MoleculeDefinition * GetDefinition() const 
 
 
 
 
  
  
      
        
          | void G4MoleculeCounter::CheckTimeForConsistency  | 
          ( | 
          G4bool  | 
          flag | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
      
        
          | void G4MoleculeCounter::Dump  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 440 of file G4MoleculeCounter.cc.
  450     NbMoleculeAgainstTime::iterator it2 = it->second.begin();
 
  451     NbMoleculeAgainstTime::iterator end2 = it->second.end();
 
  453     for(;it2!=end2;++it2)
 
  456              << 
"    " << it2->second << 
G4endl;
 
const G4String & GetName() const 
 
CounterMapType fCounterMap
 
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1 
 
G4GLOB_DLL std::ostream G4cout
 
 
 
 
Definition at line 208 of file G4MoleculeCounter.cc.
int SearchUpperBoundTime(double time, bool sameTypeOfMolecule)
 
G4bool SearchTimeMap(G4MolecularConfiguration *molecule)
 
 
 
 
Definition at line 368 of file G4MoleculeCounter.cc.
  372     G4cout << 
"Entering in G4MoleculeCounter::RecordMolecules" << 
G4endl;
 
  375   CounterMapType::iterator it;
 
  380     output->push_back(it->first);
 
CounterMapType fCounterMap
 
std::unique_ptr< std::vector< G4MolecularConfiguration * > > RecordedMolecules
 
G4GLOB_DLL std::ostream G4cout
 
 
 
 
Definition at line 387 of file G4MoleculeCounter.cc.
  393   CounterMapType::iterator it;
 
  394   CounterMapType::const_iterator ite;
 
  396   NbMoleculeAgainstTime::iterator it2;
 
  397   NbMoleculeAgainstTime::const_iterator ite2;
 
  403     for (it2 = (it->second).begin(), ite2 = (it->second).end(); it2 != ite2;
 
  407       output->insert(it2->first);
 
CounterMapType fCounterMap
 
std::unique_ptr< std::set< G4double > > RecordedTimes
 
 
 
 
  
  
      
        
          | G4int G4MoleculeCounter::GetVerbose  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | void G4MoleculeCounter::Initialize  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
overridevirtual   | 
  
 
Implements G4VMoleculeCounter.
Definition at line 69 of file G4MoleculeCounter.cc.
   75   while ((mol_iterator)())
 
CounterMapType fCounterMap
 
bool IsRegistered(const G4MoleculeDefinition *) override
 
static G4MoleculeTable * Instance()
 
G4ConfigurationIterator GetConfigurationIterator()
 
 
 
 
  
  
      
        
          | G4bool G4MoleculeCounter::IsTimeCheckedForConsistency  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | void G4MoleculeCounter::RegisterAll  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
 
Implements G4VMoleculeCounter.
Definition at line 272 of file G4MoleculeCounter.cc.
  281     G4cout << 
"G4MoleculeCounter::RemoveAMoleculeAtTime : " 
  292       errMsg << 
"Time of species " 
  293           << molecule->
GetName() << 
" is " 
  295           << 
" global time is " 
  298       G4Exception(
"G4MoleculeCounter::RemoveAMoleculeAtTime",
 
  306   if (nbMolPerTime.empty())
 
  311         "You are trying to remove molecule " + molecule->
GetName()
 
  312         + 
" from the counter while this kind of molecules has not been registered yet";
 
  313     G4Exception(
"G4MoleculeCounter::RemoveAMoleculeAtTime", 
"",
 
  320     NbMoleculeAgainstTime::reverse_iterator it = nbMolPerTime.rbegin();
 
  322     if (it == nbMolPerTime.rend()){
 
  326       + 
" recorded at the time or even before the time asked";
 
  327       G4Exception(
"G4MoleculeCounter::RemoveAMoleculeAtTime", 
"",
 
  334       errMsg << 
"Is time going back?? " << molecule->
GetName()
 
  335              << 
" is being removed at time " << 
G4BestUnit(time, 
"Time")
 
  336              << 
" while last recorded time was " 
  338       G4Exception(
"G4MoleculeCounter::RemoveAMoleculeAtTime",
 
  339                   "RETURN_TO_THE_FUTUR",
 
  344     double finalN = it->second - number;
 
  349       errMsg << 
"After removal of " << number << 
" species of " 
  350           << molecule->
GetName() << 
" the final number at time " 
  351           << 
G4BestUnit(time, 
"Time") << 
" is less than zero and so not valid." 
  352           << 
" Global time is " 
  354           << 
". Previous selected time is " 
  357       G4Exception(
"G4MoleculeCounter::RemoveAMoleculeAtTime",
 
  362     nbMolPerTime[time] = finalN;
 
const G4String & GetName() const 
 
std::ostringstream G4ExceptionDescription
 
CounterMapType fCounterMap
 
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1 
 
static G4Scheduler * Instance()
 
std::map< const G4MoleculeDefinition *, G4bool > fDontRegister
 
G4GLOB_DLL std::ostream G4cout
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
static G4ThreadLocal double fPrecision
 
const G4MoleculeDefinition * GetDefinition() const 
 
std::map< G4double, G4int, compDoubleWithPrecision > NbMoleculeAgainstTime
 
G4bool fCheckTimeIsConsistentWithScheduler
 
 
 
 
  
  
      
        
          | void G4MoleculeCounter::ResetCounter  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
 
Definition at line 97 of file G4MoleculeCounter.cc.
  110   CounterMapType::iterator mol_it = 
fCounterMap.find(molecule);
 
CounterMapType fCounterMap
 
std::unique_ptr< Search > fpLastSearch
 
 
 
 
  
  
      
        
          | int G4MoleculeCounter::SearchUpperBoundTime  | 
          ( | 
          double  | 
          time,  | 
         
        
           | 
           | 
          bool  | 
          sameTypeOfMolecule  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Definition at line 129 of file G4MoleculeCounter.cc.
  132   CounterMapType::iterator mol_it = 
fpLastSearch->fLastMoleculeSearched;
 
  136   if (timeMap.empty()) 
return 0;
 
  138   NbMoleculeAgainstTime::iterator end_time = timeMap.end();
 
  140   if (sameTypeOfMolecule == 
true)
 
  148         NbMoleculeAgainstTime::iterator upperToLast = 
fpLastSearch 
  152         if (upperToLast == end_time)
 
  157         if (upperToLast->first > time)
 
  172   NbMoleculeAgainstTime::iterator up_time_it = timeMap.upper_bound(time);
 
  174   if (up_time_it == end_time)
 
  176     NbMoleculeAgainstTime::reverse_iterator last_time = timeMap.rbegin();
 
  180       return last_time->second;
 
  186   if (up_time_it == timeMap.begin())
 
CounterMapType fCounterMap
 
std::unique_ptr< Search > fpLastSearch
 
std::map< G4double, G4int, compDoubleWithPrecision > NbMoleculeAgainstTime
 
 
 
 
      
        
          | void G4MoleculeCounter::SetTimeSlice  | 
          ( | 
          double  | 
          timeSlice | ) | 
           | 
        
      
 
 
  
  
      
        
          | void G4MoleculeCounter::SetVerbose  | 
          ( | 
          G4int  | 
          level | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | G4bool G4MoleculeCounter::fCheckTimeIsConsistentWithScheduler | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | std::unique_ptr<Search> G4MoleculeCounter::fpLastSearch | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | G4int G4MoleculeCounter::fVerbose | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following files:
- source/geant4.10.03.p02/source/processes/electromagnetic/dna/molecules/management/include/G4MoleculeCounter.hh
 
- source/geant4.10.03.p02/source/processes/electromagnetic/dna/molecules/management/src/G4MoleculeCounter.cc