#include <G4ITTrackHolder.hh>
Definition at line 121 of file G4ITTrackHolder.hh.
G4ITTrackHolder::G4ITTrackHolder |
( |
| ) |
|
Definition at line 223 of file G4ITTrackHolder.cc.
double fPostActivityGlobalTime
bool fMainListHaveBeenSet
G4ITTrackHolder::~G4ITTrackHolder |
( |
| ) |
|
|
virtual |
Definition at line 234 of file G4ITTrackHolder.cc.
236 std::map<Key, PriorityList*>::iterator end =
fLists.end();
238 for (std::map<Key, PriorityList*>::iterator it =
fLists.begin(); it != end;
247 MapOfDelayedLists::iterator fDelayedList_i =
fDelayedList.begin();
248 MapOfDelayedLists::iterator fDelayedList_end =
fDelayedList.end();
250 for (; fDelayedList_i != fDelayedList_end; fDelayedList_i++)
252 std::map<Key, G4TrackList*>::iterator it = fDelayedList_i->second.begin();
253 std::map<Key, G4TrackList*>::iterator __end =
254 fDelayedList_i->second.end();
256 for (; it != __end; it++)
258 if (it->second)
delete (it->second);
std::map< Key, PriorityList * > fLists
G4TrackManyList fAllMainList
MapOfDelayedLists fDelayedList
G4TrackManyList fAllSecondariesList
Definition at line 447 of file G4ITTrackHolder.cc.
453 <<
"You are trying to push a non-existing track (track pointer is null)"
456 G4Exception(
"G4ITTrackHolder::_PushTrack",
"ITStepManager014",
474 G4cout <<
"\t"<<
">> Pushing a track --> ";
486 if (globalTime < currentGlobalTime)
490 <<
"You are trying to push a track with a global time"
491 <<
" inferior to the current simulation time." << G4endl<<
"The time is going back : " << G4endl
492 <<
"The time in the step manager : "
495 <<
"The time of the track : "
498 <<
"(ITStepManager is not yet running)"
501 G4Exception(
"G4ITTrackHolder::_PushTrack",
"ITStepManager014",
515 if (globalTime == currentGlobalTime)
521 G4cout <<
"\t"<<
">> Pushing to *main* list --> ";
539 G4cout <<
"\t"<<
">> Pushing to *delayed* list --> ";
554 double timeDifference = globalTime - currentGlobalTime;
557 if (timeDifference < -1 * timeTolerance)
561 <<
"You are trying to push a track with a global time"
562 <<
" inferior to the current simulation time." << G4endl<<
"The time is going back : "
564 <<
"The time in the step manager : "
567 <<
"The time of the track : " <<
G4BestUnit(globalTime,
"Time")
569 <<
"(ITStepManager is running)"
572 G4Exception(
"G4ITTrackHolder::_PushTrack",
"ITStepManager015",
580 if (fabs(timeDifference) < timeTolerance)
588 G4cout <<
"\t"<<
">> Pushing to *secondary* list --> ";
603 <<
"While running you cannot push a track"
604 <<
" with a bigger global time than the current global time" << G4endl<<
"The time in the step manager : "
607 <<
"The time of the track : " <<
G4BestUnit(globalTime,
"Time")
609 <<
"(ITStepManager is running)"
612 G4Exception(
"G4ITTrackHolder::_PushTrack",
"ITStepManager016",
double GetTimeTolerance() const
std::ostringstream G4ExceptionDescription
void AddTrackID(G4Track *track)
void PushDelayed(G4Track *track)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
virtual const G4String & GetName() const =0
static G4Scheduler * Instance()
G4IT * GetIT(const G4Track *track)
G4GLOB_DLL std::ostream G4cout
void PushTo(G4Track *, PriorityList::Type)
G4double GetGlobalTime() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
bool fMainListHaveBeenSet
G4double GetGlobalTime() const
Definition at line 783 of file G4ITTrackHolder.cc.
787 std::map<Key, PriorityList*>::iterator it =
fLists.find(
id);
788 if (it ==
fLists.end())
return false;
791 if (trackList == 0)
return false;
std::map< Key, PriorityList * > fLists
void AddWatcher(Watcher *watcher)
void G4ITTrackHolder::AddWatcherForKillList |
( |
G4TrackList::Watcher * |
watcher | ) |
|
void G4ITTrackHolder::AddWatcherForMainList |
( |
G4TrackList::Watcher * |
watcher | ) |
|
Definition at line 796 of file G4ITTrackHolder.cc.
G4TrackManyList fAllMainList
void AddGlobalWatcher(typename G4FastList< OBJECT >::Watcher *watcher)
Definition at line 880 of file G4ITTrackHolder.cc.
883 MapOfPriorityLists::iterator it = mapOfLists.begin();
884 MapOfPriorityLists::iterator end = mapOfLists.end();
885 for (; it != end; it++)
891 if (!(trackList->empty()))
return true;
void G4ITTrackHolder::Clear |
( |
| ) |
|
Definition at line 726 of file G4ITTrackHolder.cc.
733 std::map<Key, PriorityList*>::iterator it =
fLists.begin();
735 for (; it !=
fLists.end(); it++)
737 if (it->second)
delete it->second;
746 std::map<Key, G4TrackList*>::iterator it2 = it1->second.begin();
748 for (; it2 != it1->second.end(); it2++)
750 if (it2->second)
delete it2->second;
std::map< Key, PriorityList * > fLists
G4TrackManyList fAllMainList
MapOfDelayedLists fDelayedList
G4TrackManyList fAllSecondariesList
bool G4ITTrackHolder::DelayListsNOTEmpty |
( |
| ) |
|
Definition at line 857 of file G4ITTrackHolder.cc.
859 MapOfDelayedLists::iterator __it =
fDelayedList.begin();
861 for (; __it != __end; __it++)
863 std::map<Key, G4TrackList*>& mapOfLists = __it->second;
864 if (mapOfLists.empty() ==
false)
866 std::map<Key, G4TrackList*>::iterator it = mapOfLists.begin();
867 std::map<Key, G4TrackList*>::iterator end = mapOfLists.end();
868 for (; it != end; it++)
872 if (!(mainList->empty()))
return true;
MapOfDelayedLists fDelayedList
Definition at line 773 of file G4ITTrackHolder.cc.
G4TrackList * GetMainList()
PriorityList * GetPriorityList(Key)
double G4ITTrackHolder::GetNextTime |
( |
| ) |
|
|
inline |
size_t G4ITTrackHolder::GetNTracks |
( |
| ) |
|
|
virtual |
Reimplemented from G4VITTrackHolder.
Definition at line 815 of file G4ITTrackHolder.cc.
823 MapOfDelayedLists::iterator delayedmap_it =
fDelayedList.begin();
824 MapOfDelayedLists::iterator delayedmap_end =
fDelayedList.end();
826 for (; delayedmap_it != delayedmap_end; delayedmap_it++)
828 std::map<Key, G4TrackList*>::iterator it = delayedmap_it->second.begin();
829 std::map<Key, G4TrackList*>::iterator end = delayedmap_it->second.end();
831 for (; it != end; it++)
833 if (it->second) nTracks += it->second->size();
G4TrackManyList fAllMainList
MapOfDelayedLists fDelayedList
G4TrackManyList fAllSecondariesList
Definition at line 766 of file G4ITTrackHolder.cc.
768 std::map<Key, PriorityList*>::iterator it =
fLists.find(i);
769 if (it ==
fLists.end())
return 0;
std::map< Key, PriorityList * > fLists
Definition at line 196 of file G4ITTrackHolder.cc.
205 fgMasterInstance = fgInstance;
G4bool IsMultithreadedApplication()
void G4ITTrackHolder::KillTracks |
( |
| ) |
|
Definition at line 696 of file G4ITTrackHolder.cc.
702 G4cout <<
"*** G4ITTrackHolder::KillTracks , step #"
706 G4cout << setw(25) << left <<
"#Name"
707 << setw(25) <<
"track ID"<<
G4endl;
G4TrackList fToBeKilledList
static G4VScheduler * Instance()
virtual G4int GetNbSteps() const
virtual const G4String & GetName() const =0
G4IT * GetIT(const G4Track *track)
G4GLOB_DLL std::ostream G4cout
bool G4ITTrackHolder::MainListsNOTEmpty |
( |
| ) |
|
|
inline |
Definition at line 215 of file G4ITTrackHolder.hh.
bool CheckMapIsNOTEmpty(MapOfPriorityLists &mapOfLists, PriorityList::Type type)
std::map< Key, PriorityList * > fLists
Definition at line 212 of file G4ITTrackHolder.cc.
215 if (fgMasterInstance == 0)
220 return fgMasterInstance;
G4Mutex creationOfTheMasterInstance
bool G4ITTrackHolder::MergeNextTimeToMainList |
( |
double & |
time | ) |
|
Definition at line 289 of file G4ITTrackHolder.cc.
299 std::map<Key, G4TrackList*>::iterator it =
301 std::map<Key, G4TrackList*>::iterator end =
303 if (it == end)
return false;
306 for (; it != end; it++)
310 std::map<Key, PriorityList*>::iterator it_listUnion =
fLists.find(
312 if (it_listUnion ==
fLists.end())
318 if (it_listUnion->second == 0)
322 right_listUnion = it_listUnion->second;
325 if (it->second == 0)
continue;
342 right_listUnion->TransferToMainList(it->second,
fAllMainList);
346 if (right_listUnion->GetMainList()->size())
std::map< Key, PriorityList * > fLists
G4TrackManyList fAllMainList
MapOfDelayedLists fDelayedList
void G4ITTrackHolder::MergeSecondariesWithMainList |
( |
| ) |
|
Definition at line 359 of file G4ITTrackHolder.cc.
361 std::map<Key, PriorityList*>::iterator it =
fLists.begin();
362 std::map<Key, PriorityList*>::iterator end =
fLists.end();
364 for (; it != end; it++)
366 if (it->second->GetMainList() == 0)
371 it->second->TransferSecondariesToMainList();
std::map< Key, PriorityList * > fLists
G4TrackManyList fAllMainList
void G4ITTrackHolder::MoveMainToWaitingList |
( |
| ) |
|
Definition at line 842 of file G4ITTrackHolder.cc.
844 MapOfPriorityLists::iterator it =
fLists.begin();
845 MapOfPriorityLists::iterator end =
fLists.end();
846 for (; it != end; it++)
850 lists->SetWaitingList(lists->GetMainList());
std::map< Key, PriorityList * > fLists
G4TrackManyList fAllMainList
Definition at line 621 of file G4ITTrackHolder.cc.
626 G4cout <<
"\t" <<
">> Pushing a delayed track" <<
G4endl;
635 std::map<double, std::map<Key, G4TrackList*> >::iterator it_delayed =
645 std::map<Key, G4TrackList*>::iterator it_trackList =
646 it_delayed->second.find(moleculeID);
648 if (it_trackList == it_delayed->second.end())
650 (it_delayed->second[moleculeID] =
new G4TrackList())->push_back(track);
654 if (it_trackList->second != 0)
656 it_trackList->second->push_back(track);
G4IT * GetIT(const G4Track *track)
G4GLOB_DLL std::ostream G4cout
G4FastList< G4Track > G4TrackList
G4double GetGlobalTime() const
virtual G4ITType GetITSubType() const
MapOfDelayedLists fDelayedList
Definition at line 402 of file G4ITTrackHolder.cc.
405 std::map<Key, PriorityList*>::iterator it =
fLists.find(moleculeID);
412 fLists[moleculeID] = priorityList;
416 priorityList = it->second;
433 priorityList->PushToWaitingList(track);
std::map< Key, PriorityList * > fLists
G4IT * GetIT(const G4Track *track)
G4TrackManyList fAllMainList
virtual G4ITType GetITSubType() const
G4TrackManyList fAllSecondariesList
Definition at line 164 of file G4ITTrackHolder.hh.
G4TrackList fToBeKilledList
void SetTrackStatus(const G4TrackStatus aTrackStatus)
G4TrackStatus GetTrackStatus() const
static void Pop(G4Track *)
void push_back(OBJECT *__track)
Definition at line 806 of file G4ITTrackHolder.cc.
void PushDelayed(G4Track *track)
G4Mutex pushToTheMasterInstance
static G4ITTrackHolder * MasterInstance()
bool G4ITTrackHolder::SecondaryListsNOTEmpty |
( |
| ) |
|
|
inline |
Definition at line 220 of file G4ITTrackHolder.hh.
bool CheckMapIsNOTEmpty(MapOfPriorityLists &mapOfLists, PriorityList::Type type)
std::map< Key, PriorityList * > fLists
void G4ITTrackHolder::SetVerbose |
( |
int |
verbose | ) |
|
|
inline |
bool G4ITTrackHolder::fMainListHaveBeenSet |
|
protected |
int G4ITTrackHolder::fNbTracks |
|
protected |
double G4ITTrackHolder::fPostActivityGlobalTime |
|
protected |
int G4ITTrackHolder::fVerbose |
|
protected |
The documentation for this class was generated from the following files: