Geant4  10.01.p03
G4ITTrackHolder.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 /*
27  * G4MIMolecularTracks.cc
28  *
29  * Created on: 17 sept. 2014
30  * Author: kara
31  */
32 
33 #include <G4Scheduler.hh>
34 #include <G4VScheduler.hh>
35 #include "G4ITTrackHolder.hh"
36 #include "G4IT.hh"
37 #include "G4Track.hh"
38 #include "G4UnitsTable.hh"
39 #include "G4AutoLock.hh"
40 #include "G4Threading.hh"
41 
42 using namespace std;
43 
45  G4TrackList::Watcher(), fpMainList(0), fpWaitingList(0)
46 {
47 }
48 
50  G4TrackList::Watcher(),
51  fpMainList(right.fpMainList),
52  fpWaitingList(right.fpWaitingList)
53 {
54 }
55 
57 {
58  if (fpMainList)
59  {
60  delete fpMainList;
61  fpMainList = 0;
62  }
63  if (fpWaitingList)
64  {
65  delete fpWaitingList;
66  fpWaitingList = 0;
67  }
68 }
69 
71 {
72  if (__list == fpMainList)
73  {
74  fpMainList = 0;
75  StopWatching(fpMainList);
76  }
77  else if (__list == fpWaitingList)
78  {
79  fpWaitingList = 0;
80  StopWatching(fpWaitingList);
81  }
82 }
83 
85  G4TrackManyList& allMainList)
86 {
87  fpMainList = __list;
88  allMainList.Add(__list);
89  Watch(fpMainList);
90 }
91 
93 {
94  G4TrackList* trackList = new G4TrackList();
95  NewMainList(trackList, allMainList);
96  return fpMainList;
97 }
98 
100  G4TrackManyList& allMainList)
101 {
102  if (fpMainList == 0)
103  {
104  NewMainList(allMainList);
105  }
106  fpMainList->push_back(__track);
107 }
108 
110  G4TrackManyList& allMainList)
111 {
112  if (fpMainList)
113  {
114  __list->transferTo(fpMainList);
115  delete __list;
116  __list = 0;
117  }
118  else
119  {
120  NewMainList(__list, allMainList);
121  }
122 }
123 
125  G4TrackManyList& listOfAllSecondaries)
126 {
127  // if (priorityList->fSecondaries.empty())
129  {
130  listOfAllSecondaries.Add(&fSecondaries);
131  }
132  fSecondaries.push_back(__track);
133 }
134 
136 {
137  if (fpWaitingList == 0)
138  {
139  fpWaitingList = new G4TrackList();
140  }
141  fpWaitingList->push_back(__track);
142 }
143 
145 {
147 }
148 
150 {
151  if (fpMainList == 0) fpMainList = new G4TrackList();
152  fpMainList->push_back(track);
153 }
154 
156 {
157  if (fpMainList == 0) fpMainList = new G4TrackList();
158  trackList->transferTo(trackList);
159 }
160 
162 {
163  int nTracks = 0;
164 
165  if (fpMainList)
166  {
167  nTracks += fpMainList->size();
168  }
169 
170  if (fpWaitingList)
171  {
172  nTracks += fpWaitingList->size();
173  }
174 
175  nTracks += fSecondaries.size();
176 
177  return nTracks;
178 }
179 
180 //=============================================================================
181 // G4ITTrackHolder
182 //=============================================================================
183 
186 
189 
191 {
192  if (fgInstance == 0)
193  {
194  fgInstance = new G4ITTrackHolder();
195  if(G4Threading::IsWorkerThread() == false ||
197  )
198  {
200  }
201 
202  }
203  return fgInstance;
204 }
205 
207 {
209  if (fgMasterInstance == 0)
210  {
212  }
213  lock.unlock();
214  return fgMasterInstance;
215 }
216 
219 {
220  fNbTracks = -1;
221  fMainListHaveBeenSet = false;
222  fVerbose = 0;
223 
225 // fPreActivityGlobalTime = -1;
226 }
227 
229 {
230  std::map<Key, PriorityList*>::iterator end = fLists.end();
231 
232  for (std::map<Key, PriorityList*>::iterator it = fLists.begin(); it != end;
233  it++)
234  {
235  delete it->second;
236  it->second = 0;
237  }
238 
239  if (!fDelayedList.empty())
240  {
241  MapOfDelayedLists::iterator fDelayedList_i = fDelayedList.begin();
242  MapOfDelayedLists::iterator fDelayedList_end = fDelayedList.end();
243 
244  for (; fDelayedList_i != fDelayedList_end; fDelayedList_i++)
245  {
246  std::map<Key, G4TrackList*>::iterator it = fDelayedList_i->second.begin();
247  std::map<Key, G4TrackList*>::iterator __end =
248  fDelayedList_i->second.end();
249 
250  for (; it != __end; it++)
251  {
252  if (it->second) delete (it->second);
253  it->second = 0;
254  }
255  }
256  fDelayedList.clear();
257  }
258 
261  fNbTracks = -1;
262 }
263 
264 /*
265  void G4MIMolecularTracks::Decide()
266  {
267  cout << "G4MIMolecularTracks::Decide" << endl;
268 
269  if (fDelayedList.empty())
270  {
271  cout << "fDelayedList.empty()" << endl;
272  return;
273  }
274  fPostActivityGlobalTime = GetNextTime();
275  // PushActivity(workspace->GetScheduler(), this);
276  }
277  */
278 
279 /*
280  * param time = time of the merged list
281  * returned = was there actually merged data ?
282  */
284 {
285 // G4cout << "G4ITTrackHolder::MergeNextTimeToMainList" << G4endl;
286  if (fDelayedList.empty())
287  {
288  return false;
289  }
290 
291 // G4cout << "fDelayedList.size = " << fDelayedList.size() <<G4endl;
292 
293  std::map<Key, G4TrackList*>::iterator it =
294  fDelayedList.begin()->second.begin();
295  std::map<Key, G4TrackList*>::iterator end =
296  fDelayedList.begin()->second.end();
297  if (it == end) return false;
298 
299  bool output = false;
300  for (; it != end; it++)
301  {
302  PriorityList* right_listUnion(0);
303 
304  std::map<Key, PriorityList*>::iterator it_listUnion = fLists.find(
305  it->first);
306  if (it_listUnion == fLists.end())
307  {
308  right_listUnion = (fLists[it->first] = new PriorityList());
309  }
310  else
311  {
312  if (it_listUnion->second == 0)
313  {
314  it_listUnion->second = new PriorityList();
315  }
316  right_listUnion = it_listUnion->second;
317  }
318 
319  if (it->second == 0) continue;
320 
321  /*
322  if (right_listUnion->GetMainList() == 0)
323  {
324  // right_listUnion->fpMainList = new G4TrackList();
325  // if(it->second)
326  // {
327  right_listUnion->NewMainList(it->second, fAllMainList);
328  // }
329  }
330  else
331  {
332  right_listUnion->TransferToMainList(it->second);
333  delete it->second;
334  }*/
335 
336  right_listUnion->TransferToMainList(it->second, fAllMainList);
337 
338  if (output == false)
339  {
340  if (right_listUnion->GetMainList()->size())
341  {
342  output = true;
343  }
344  }
345  it->second = 0;
346  }
347 
348  if (output) time = fDelayedList.begin()->first;
349  fDelayedList.erase(fDelayedList.begin());
350  return output;
351 }
352 
354 {
355  std::map<Key, PriorityList*>::iterator it = fLists.begin();
356  std::map<Key, PriorityList*>::iterator end = fLists.end();
357 
358  for (; it != end; it++)
359  {
360  if (it->second->GetMainList() == 0)
361  {
362  it->second->NewMainList(fAllMainList);
363  }
364 
365  it->second->TransferSecondariesToMainList();
366  }
367 }
368 
369 //_________________________________________________________________________
370 
372 {
373  //if(fNbTracks == 0) fNbTracks = -1;
374  track->SetTrackID(fNbTracks);
375  fNbTracks--;
376 }
377 
378 //_________________________________________________________________________
379 
381 {
382  if (G4VScheduler::Instance()->IsRunning())
383  {
384  G4ExceptionDescription exceptionDescription;
385  exceptionDescription
386  << "G4ITTrackHolder::PushTrack : You are trying to push tracks while the "
387  "ITStepManager is running";
388  G4Exception("G4ITTrackHolder::PushTrack", "ITStepManager012",
389  FatalErrorInArgument, exceptionDescription);
390  }
391  _PushTrack(track);
392 
393 // G4MIConstituent::NotifyEntityAdded(track);
394 }
395 //_________________________________________________________________________
397 {
398  int moleculeID = GetIT(track)->GetITSubType();
399  std::map<Key, PriorityList*>::iterator it = fLists.find(moleculeID);
400 
401  PriorityList* priorityList(0);
402 
403  if (it == fLists.end())
404  {
405  priorityList = new PriorityList();
406  fLists[moleculeID] = priorityList;
407  }
408  else
409  {
410  priorityList = it->second;
411  }
412 
413  switch (type)
414  {
416  {
417  priorityList->PushToMainList(track, fAllMainList);
418  break;
419  }
421  {
422  priorityList->PushToListOfSecondaries(track, fAllSecondariesList);
423  break;
424  }
426  {
427  priorityList->PushToWaitingList(track);
428  return;
429  break;
430  }
431 
432  default:
433  {
434  return;
435  break;
436  }
437  }
438 }
439 //_________________________________________________________________________
440 
442 {
443  if (track == 0)
444  {
445  G4ExceptionDescription exceptionDescription;
446  exceptionDescription
447  << "You are trying to push a non-existing track (track pointer is null)"
448  << G4endl;
449 
450  G4Exception("G4ITTrackHolder::_PushTrack", "ITStepManager014",
451  FatalErrorInArgument, exceptionDescription);
452  }
453 
454  G4double globalTime = track->GetGlobalTime();
455 
456  if (track->GetTrackID() == 0)
457  {
458  // Set track ID
459  AddTrackID(track);
460  }
461 
462  double currentGlobalTime = G4Scheduler::Instance()->GetGlobalTime();
463 
464 #ifdef G4VERBOSE
465  if (fVerbose > 5)
466  {
467  G4cout << G4endl;
468  G4cout << "\t"<< ">> Pushing a track --> ";
469  G4cout << GetIT(track)->GetName() << " (" << track->GetTrackID() <<")"
470  << " -- ";
471  G4cout << "Global current time: " << G4BestUnit(currentGlobalTime,"Time")
472  << "\t";
473  G4cout << "Track's time: " << G4BestUnit(track->GetGlobalTime(),"Time")
474  << G4endl;
475  }
476 #endif
477 
478  if (G4Scheduler::Instance()->IsRunning() == false)
479  {
480  if (globalTime < currentGlobalTime)
481  {
482  G4ExceptionDescription exceptionDescription;
483  exceptionDescription
484  << "You are trying to push a track with a global time"
485  << " inferior to the current simulation time." << G4endl<< "The time is going back : " << G4endl
486  << "The time in the step manager : "
487  << G4BestUnit(currentGlobalTime,"Time")
488  << G4endl
489  << "The time of the track : "
490  << G4BestUnit(globalTime,"Time")
491  << G4endl
492  << "(ITStepManager is not yet running)"
493  << G4endl;
494 
495  G4Exception("G4ITTrackHolder::_PushTrack", "ITStepManager014",
496  FatalErrorInArgument, exceptionDescription);
497  }
498 
499  // Push the track to the rigth track list :
500  // If the track time is the same as the main track list,
501  // it will be push to the main track list
502  // otherwise, it will be pushed to the delayed track list.
503  if (fMainListHaveBeenSet == false)
504  {
505  PushDelayed(track);
506  }
507  else
508  {
509  if (globalTime == currentGlobalTime)
510  {
512  }
513  else
514  {
515  PushDelayed(track);
516  }
517  }
518  }
519  else // Is running
520  {
521  double timeDifference = globalTime - currentGlobalTime;
522  double timeTolerance = G4Scheduler::Instance()->GetTimeTolerance();
523 
524  if (timeDifference < -1 * timeTolerance)
525  {
526  G4ExceptionDescription exceptionDescription;
527  exceptionDescription
528  << "You are trying to push a track with a global time"
529  << " inferior to the current simulation time." << G4endl<< "The time is going back : "
530  << G4endl
531  << "The time in the step manager : "
532  << G4BestUnit(timeDifference,"Time")
533  << G4endl
534  << "The time of the track : " << G4BestUnit(globalTime,"Time")
535  << G4endl
536  << "(ITStepManager is running)"
537  << G4endl;
538 
539  G4Exception("G4ITTrackHolder::_PushTrack", "ITStepManager015",
540  FatalErrorInArgument, exceptionDescription);
541  }
542 
543  // Push the track to the rigth track list :
544  // If the track time is the same as the main track list,
545  // it will be push to the secondary list
546  // otherwise, it will be pushed to the delayed track list.
547  if (fabs(timeDifference) < timeTolerance)
548  {
549 // G4cout << "Is pushing " << GetIT(track)->GetName() << G4endl;
550 
552  }
553  else // globalTime < fGlobalTime already taken into account above
554  {
555  G4ExceptionDescription exceptionDescription;
556  exceptionDescription
557  << "While running you cannot push a track"
558  << " with a bigger global time than the current global time" << G4endl<< "The time in the step manager : "
559  << G4BestUnit(currentGlobalTime,"Time")
560  << G4endl
561  << "The time of the track : " << G4BestUnit(globalTime,"Time")
562  << G4endl
563  << "(ITStepManager is running)"
564  << G4endl;
565 
566  G4Exception("G4ITTrackHolder::_PushTrack", "ITStepManager016",
567  FatalErrorInArgument, exceptionDescription);
568  // PushDelayed(track, globalTime);
569  }
570  }
571 }
572 
573 //_________________________________________________________________________
574 
576 {
577 #ifdef G4VERBOSE
578  if (fVerbose > 5)
579  {
580  G4cout << "\t" << ">> Pushing a delayed track" << G4endl;
581  }
582 #endif
583 
584  int moleculeID = GetIT(track)->GetITSubType();
585  // std::map<int, PriorityList>::iterator it = fLists.find(moleculeID);
586 
587  G4double globalTime = track->GetGlobalTime();
588 
589  std::map<double, std::map<Key, G4TrackList*> >::iterator it_delayed =
590  fDelayedList.find(globalTime);
591 
592  if (it_delayed == fDelayedList.end())
593  {
594  (fDelayedList[globalTime][moleculeID] = new G4TrackList())->push_back(
595  track);
596  }
597  else
598  {
599  std::map<Key, G4TrackList*>::iterator it_trackList =
600  it_delayed->second.find(moleculeID);
601 
602  if (it_trackList == it_delayed->second.end())
603  {
604  (it_delayed->second[moleculeID] = new G4TrackList())->push_back(track);
605  }
606  else
607  {
608  if (it_trackList->second != 0)
609  {
610  it_trackList->second->push_back(track);
611  }
612  }
613  }
614 
615  // fDelayedList[globalTime][moleculeID]
616 
617  /*
618  std::map<double,std::map<int, G4TrackList* > >::iterator it_delayed =
619  fDelayedList.begin();
620 
621  std::map<double,std::map<int, G4TrackList* > >::iterator end_delayed =
622  fDelayedList.end();
623 
624  for(it_delayed != end_delayed ; it_delayed++)
625  {
626  std::map<int, G4TrackList*> & trackListMap = it->second;
627 
628 
629  }
630  */
631  /*
632  std::map<double,G4TrackList* > :: iterator
633  fDelayedList_i = fDelayedList.find(globalTime) ;
634 
635  if(fDelayedList_i == fDelayedList.end())
636  {
637 
638  G4TrackList* newList = new G4TrackList ;
639  newList -> push_back(track);
640  fDelayedList[globalTime] = newList ;
641  }
642  else
643  {
644  fDelayedList_i->second-> push_back(track);
645  }
646  */
647 }
648 //______________________________________________________________________________
649 
651 {
652  if (fToBeKilledList.size() == 0) return;
653 #ifdef G4VERBOSE
654  if (fVerbose > 5)
655  {
656  G4cout << "*** G4ITTrackHolder::KillTracks , step #"
657 // << G4MIWorldEngine::Instance()->GetScheduler()->GetNbSteps()
658  << G4VScheduler::Instance()->GetNbSteps() << " ***" << G4endl;
659  G4cout << "Nb of tracks to kill "<< fToBeKilledList.size() << G4endl;
660  G4cout << setw(25) << left << "#Name"
661  << setw(25) << "track ID"<< G4endl;
662 
664  for(; it != fToBeKilledList.end();)
665  {
666  G4Track* toBeErased = *it;
667 
668  G4cout << setw(25) << GetIT(toBeErased)->GetName()
669  << setw(25) << toBeErased->GetTrackID()
670  << G4endl;
671 
672  it = fToBeKilledList.erase(toBeErased);
673  }
674  }
675  else
676 #endif
678 }
679 
681 {
684 // fAllMainList.RemoveLists();
685 // fAllSecondariesList.RemoveLists();
686 
687  std::map<Key, PriorityList*>::iterator it = fLists.begin();
688 
689  for (; it != fLists.end(); it++)
690  {
691  if (it->second) delete it->second;
692  it->second = 0;
693  }
694  fLists.clear();
695 
696  MapOfDelayedLists::iterator it1 = fDelayedList.begin();
697 
698  for (; it1 != fDelayedList.end(); it1++)
699  {
700  std::map<Key, G4TrackList*>::iterator it2 = it1->second.begin();
701 
702  for (; it2 != it1->second.end(); it2++)
703  {
704  if (it2->second) delete it2->second;
705  it2->second = 0;
706  }
707  }
708 
709  fDelayedList.clear();
710 
711 // fAllMainList.ClearLists();
712 // fAllSecondariesList.ClearLists();
715  KillTracks();
716 
717  fNbTracks = -1;
718 }
719 
721 {
722  std::map<Key, PriorityList*>::iterator it = fLists.find(i);
723  if (it == fLists.end()) return 0;
724  return it->second;
725 }
726 
728 {
729  PriorityList* priorityList = GetPriorityList(i);
730  if (priorityList)
731  {
732  return priorityList->GetMainList();
733  }
734  return 0;
735 }
736 
738  G4TrackList::Watcher* watcher,
739  PriorityList::Type type)
740 {
741  std::map<Key, PriorityList*>::iterator it = fLists.find(id);
742  if (it == fLists.end()) return false;
743 
744  G4TrackList* trackList = it->second->Get(type);
745  if (trackList == 0) return false;
746  trackList->AddWatcher(watcher);
747  return true;
748 }
749 
751 {
752  G4ITTrackHolder* trackHolder = MasterInstance();
753 
755  trackHolder->PushDelayed(track);
756  lock.unlock();
757 }
758 
760 {
761  size_t nTracks(0);
762  nTracks += fAllMainList.size();
763  nTracks += fAllSecondariesList.size();
764 
765  // G4cout << "nTracks = " << nTracks << G4endl;
766 
767  MapOfDelayedLists::iterator delayedmap_it = fDelayedList.begin();
768  MapOfDelayedLists::iterator delayedmap_end = fDelayedList.end();
769 
770  for (; delayedmap_it != delayedmap_end; delayedmap_it++)
771  {
772  std::map<Key, G4TrackList*>::iterator it = delayedmap_it->second.begin();
773  std::map<Key, G4TrackList*>::iterator end = delayedmap_it->second.end();
774 
775  for (; it != end; it++)
776  {
777  if (it->second) nTracks += it->second->size();
778  }
779  }
780 
781  // G4cout << "nTracks = " << nTracks << G4endl;
782 
783  return nTracks;
784 }
785 
787 {
788  MapOfPriorityLists::iterator it = fLists.begin();
789  MapOfPriorityLists::iterator end = fLists.end();
790  for (; it != end; it++)
791  {
792  if (PriorityList* lists = it->second)
793  {
794  lists->SetWaitingList(lists->GetMainList());
795  //TODO
796  }
797  }
799 }
800 
802 {
803  MapOfDelayedLists::iterator __it = fDelayedList.begin();
804  MapOfDelayedLists::iterator __end = fDelayedList.end();
805  for (; __it != __end; __it++)
806  {
807  std::map<Key, G4TrackList*>& mapOfLists = __it->second;
808  if (mapOfLists.empty() == false)
809  {
810  std::map<Key, G4TrackList*>::iterator it = mapOfLists.begin();
811  std::map<Key, G4TrackList*>::iterator end = mapOfLists.end();
812  for (; it != end; it++)
813  {
814  if (G4TrackList* mainList = it->second)
815  {
816  if (!(mainList->empty())) return true;
817  }
818  }
819  }
820  }
821  return false;
822 }
823 
825  PriorityList::Type type)
826 {
827  MapOfPriorityLists::iterator it = mapOfLists.begin();
828  MapOfPriorityLists::iterator end = mapOfLists.end();
829  for (; it != end; it++)
830  {
831  if (PriorityList* lists = it->second)
832  {
833  if (G4TrackList* trackList = lists->Get(type))
834  {
835  if (!(trackList->empty())) return true;
836  }
837  }
838  }
839  return false;
840 }
G4TrackList fToBeKilledList
G4int size() const
Definition: G4FastList.hh:311
void AddWatcher(Watcher *watcher)
Definition: G4FastList.hh:292
G4TrackManyList * GetMainList()
virtual void Push(G4Track *)
void MergeSecondariesWithMainList()
G4FastList_iterator enables to go through the tracks contained by a list.
Definition: G4FastList.hh:62
bool CheckMapIsNOTEmpty(MapOfPriorityLists &mapOfLists, PriorityList::Type type)
double GetTimeTolerance() const
Definition: G4Scheduler.hh:391
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void AddTrackID(G4Track *track)
std::map< Key, PriorityList * > fLists
double fPostActivityGlobalTime
static G4VScheduler * Instance()
Definition: G4VScheduler.cc:48
G4TrackList * fpWaitingList
void PushDelayed(G4Track *track)
G4ITTrackHolder is an empty interface that permits to push tracks to the IT system without actually d...
virtual G4int GetNbSteps() const
Definition: G4VScheduler.hh:85
void MoveMainToWaitingList()
G4Mutex pushToTheMasterInstance
virtual void NotifyDeletingList(G4TrackList *__list)
static G4ITTrackHolder * fgMasterInstance
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
virtual const G4String & GetName() const =0
G4TrackList * GetMainList()
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
static G4Scheduler * Instance()
Definition: G4Scheduler.cc:118
void PushToMainList(G4Track *__track, G4TrackManyList &allMainList)
void PushToWaitingList(G4Track *__track)
iterator erase(OBJECT *)
void Add(G4FastList< OBJECT > *__list)
iterator begin()
void MergeWithMainList(G4TrackList *trackList)
G4Mutex creationOfTheMasterInstance
G4IT * GetIT(const G4Track *track)
Definition: G4IT.cc:49
G4GLOB_DLL std::ostream G4cout
iterator end()
void _PushTrack(G4Track *track)
virtual ~PriorityList()
static G4ThreadLocal G4ITTrackHolder * fgInstance
G4FastList< G4Track > G4TrackList
Definition: G4TrackList.hh:57
void PushTo(G4Track *, PriorityList::Type)
G4TrackList fSecondaries
bool MergeNextTimeToMainList(double &time)
G4int GetTrackID() const
bool IsRunning()
Definition: G4Scheduler.hh:108
G4double GetGlobalTime() const
G4TrackManyList fAllMainList
G4bool IsMultithreadedApplication()
Definition: G4Threading.cc:134
virtual size_t GetNTracks()
void TransferToMainList(G4TrackList *&__list, G4TrackManyList &allMainList)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4bool IsWorkerThread()
Definition: G4Threading.cc:128
static G4ITTrackHolder * MasterInstance()
G4int G4Mutex
Definition: G4Threading.hh:173
void push_back(OBJECT *__track)
PriorityList * GetPriorityList(Key)
G4FastListNode< G4FastList< OBJECT > > * GetListNode()
Definition: G4FastList.hh:287
virtual G4ITType GetITSubType() const
Definition: G4IT.hh:168
MapOfDelayedLists fDelayedList
std::map< Key, PriorityList * > MapOfPriorityLists
size_t size() const
static void PushToMaster(G4Track *)
void PushToListOfSecondaries(G4Track *__track, G4TrackManyList &listOfAllSecondaries)
void transferTo(G4FastList< OBJECT > *)
static G4ITTrackHolder * Instance()
#define G4endl
Definition: G4ios.hh:61
virtual ~G4ITTrackHolder()
G4TrackList * fpMainList
G4double GetGlobalTime() const
Definition: G4Scheduler.hh:349
void NewMainList(G4TrackList *__list, G4TrackManyList &allMainList)
void TransferSecondariesToMainList()
double G4double
Definition: G4Types.hh:76
G4TrackManyList fAllSecondariesList
void SetTrackID(const G4int aValue)
bool AddWatcher(int, G4TrackList::Watcher *, PriorityList::Type=PriorityList::MainList)