Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PriorityList Class Reference

#include <G4ITTrackHolder.hh>

Inheritance diagram for PriorityList:
Collaboration diagram for PriorityList:

Public Types

enum  Type { MainList = 0, SecondariesList = 1, WaitingList = 2, Undefined = -1 }
 

Public Member Functions

 PriorityList ()
 
 PriorityList (G4TrackManyList &allMainList)
 
 PriorityList (const PriorityList &right)
 
virtual ~PriorityList ()
 
virtual void NotifyDeletingList (G4TrackList *__list)
 
void NewMainList (G4TrackList *__list, G4TrackManyList &allMainList)
 
G4TrackListNewMainList (G4TrackManyList &allMainList)
 
void PushToMainList (G4Track *__track, G4TrackManyList &allMainList)
 
void TransferToMainList (G4TrackList *&__list, G4TrackManyList &allMainList)
 
void PushToListOfSecondaries (G4Track *__track, G4TrackManyList &listOfAllSecondaries)
 
void PushToWaitingList (G4Track *__track)
 
void TransferSecondariesToMainList ()
 
void PushToMainList (G4Track *track)
 
void MergeWithMainList (G4TrackList *trackList)
 
G4TrackListGetMainList ()
 
G4TrackListGetSecondariesList ()
 
void SetWaitingList (G4TrackList *__list)
 
G4TrackListGet (Type type)
 
int GetNTracks ()
 

Detailed Description

Definition at line 40 of file G4ITTrackHolder.hh.

Member Enumeration Documentation

Enumerator
MainList 
SecondariesList 
WaitingList 
Undefined 

Definition at line 43 of file G4ITTrackHolder.hh.

Constructor & Destructor Documentation

PriorityList::PriorityList ( )

Definition at line 44 of file G4ITTrackHolder.cc.

44  :
45  G4TrackList::Watcher(), fpMainList(0), fpWaitingList(0)
46 {
47 }
PriorityList::PriorityList ( G4TrackManyList allMainList)

Definition at line 49 of file G4ITTrackHolder.cc.

49  :
50  G4TrackList::Watcher(), fpMainList(0), fpWaitingList(0)
51 {
52  NewMainList(allMainList);
53 }
void NewMainList(G4TrackList *__list, G4TrackManyList &allMainList)

Here is the call graph for this function:

PriorityList::PriorityList ( const PriorityList right)

Definition at line 55 of file G4ITTrackHolder.cc.

55  :
56  G4TrackList::Watcher(),
57  fpMainList(right.fpMainList),
58  fpWaitingList(right.fpWaitingList)
59 {
60 }
PriorityList::~PriorityList ( )
virtual

Definition at line 62 of file G4ITTrackHolder.cc.

63 {
64  if (fpMainList)
65  {
66  delete fpMainList;
67  fpMainList = 0;
68  }
69  if (fpWaitingList)
70  {
71  delete fpWaitingList;
72  fpWaitingList = 0;
73  }
74 }

Member Function Documentation

G4TrackList* PriorityList::Get ( Type  type)
inline

Definition at line 92 of file G4ITTrackHolder.hh.

93  {
94  switch (type)
95  {
96  case MainList:
97  return fpMainList;
98  break;
99  case SecondariesList:
100  return &fSecondaries;
101  break;
102  case WaitingList:
103  return fpWaitingList;
104  break;
105  case Undefined:
106  return 0;
107  }
108  return 0;
109  }
G4TrackList* PriorityList::GetMainList ( )
inline

Definition at line 77 of file G4ITTrackHolder.hh.

78  {
79  return fpMainList;
80  }

Here is the caller graph for this function:

int PriorityList::GetNTracks ( )

Definition at line 167 of file G4ITTrackHolder.cc.

168 {
169  int nTracks = 0;
170 
171  if (fpMainList)
172  {
173  nTracks += fpMainList->size();
174  }
175 
176  if (fpWaitingList)
177  {
178  nTracks += fpWaitingList->size();
179  }
180 
181  nTracks += fSecondaries.size();
182 
183  return nTracks;
184 }
G4int size() const
Definition: G4FastList.hh:359

Here is the call graph for this function:

G4TrackList* PriorityList::GetSecondariesList ( )
inline

Definition at line 82 of file G4ITTrackHolder.hh.

83  {
84  return &fSecondaries;
85  }
void PriorityList::MergeWithMainList ( G4TrackList trackList)

Definition at line 161 of file G4ITTrackHolder.cc.

162 {
163  if (fpMainList == 0) fpMainList = new G4TrackList();
164  trackList->transferTo(trackList);
165 }
G4FastList< G4Track > G4TrackList
Definition: G4TrackList.hh:57
void transferTo(G4FastList< OBJECT > *)

Here is the call graph for this function:

void PriorityList::NewMainList ( G4TrackList __list,
G4TrackManyList allMainList 
)

Definition at line 90 of file G4ITTrackHolder.cc.

92 {
93  fpMainList = __list;
94  allMainList.Add(__list);
95  Watch(fpMainList);
96 }
void Add(G4FastList< OBJECT > *__list)

Here is the call graph for this function:

Here is the caller graph for this function:

G4TrackList * PriorityList::NewMainList ( G4TrackManyList allMainList)

Definition at line 98 of file G4ITTrackHolder.cc.

99 {
100  G4TrackList* trackList = new G4TrackList();
101  NewMainList(trackList, allMainList);
102  return fpMainList;
103 }
G4FastList< G4Track > G4TrackList
Definition: G4TrackList.hh:57
void NewMainList(G4TrackList *__list, G4TrackManyList &allMainList)

Here is the call graph for this function:

void PriorityList::NotifyDeletingList ( G4TrackList __list)
virtual

Definition at line 76 of file G4ITTrackHolder.cc.

77 {
78  if (__list == fpMainList)
79  {
80 // StopWatching(fpMainList);
81  fpMainList = 0;
82  }
83  else if (__list == fpWaitingList)
84  {
85 // StopWatching(fpWaitingList);
86  fpWaitingList = 0;
87  }
88 }
void PriorityList::PushToListOfSecondaries ( G4Track __track,
G4TrackManyList listOfAllSecondaries 
)

Definition at line 130 of file G4ITTrackHolder.cc.

132 {
133  // if (priorityList->fSecondaries.empty())
134  if (fSecondaries.GetListNode())
135  {
136  listOfAllSecondaries.Add(&fSecondaries);
137  }
138  fSecondaries.push_back(__track);
139 }
void Add(G4FastList< OBJECT > *__list)
G4FastListNode< G4FastList< OBJECT > > * GetListNode()
Definition: G4FastList.hh:335
void push_back(OBJECT *__track)

Here is the call graph for this function:

Here is the caller graph for this function:

void PriorityList::PushToMainList ( G4Track __track,
G4TrackManyList allMainList 
)

Definition at line 105 of file G4ITTrackHolder.cc.

107 {
108  if (fpMainList == 0)
109  {
110  NewMainList(allMainList);
111  }
112  fpMainList->push_back(__track);
113 }
void push_back(OBJECT *__track)
void NewMainList(G4TrackList *__list, G4TrackManyList &allMainList)

Here is the call graph for this function:

Here is the caller graph for this function:

void PriorityList::PushToMainList ( G4Track track)

Definition at line 155 of file G4ITTrackHolder.cc.

156 {
157  if (fpMainList == 0) fpMainList = new G4TrackList();
158  fpMainList->push_back(track);
159 }
G4FastList< G4Track > G4TrackList
Definition: G4TrackList.hh:57
void push_back(OBJECT *__track)

Here is the call graph for this function:

void PriorityList::PushToWaitingList ( G4Track __track)

Definition at line 141 of file G4ITTrackHolder.cc.

142 {
143  if (fpWaitingList == 0)
144  {
145  fpWaitingList = new G4TrackList();
146  }
147  fpWaitingList->push_back(__track);
148 }
G4FastList< G4Track > G4TrackList
Definition: G4TrackList.hh:57
void push_back(OBJECT *__track)

Here is the call graph for this function:

Here is the caller graph for this function:

void PriorityList::SetWaitingList ( G4TrackList __list)
inline

Definition at line 87 of file G4ITTrackHolder.hh.

88  {
89  fpWaitingList = __list;
90  }
void PriorityList::TransferSecondariesToMainList ( )

Definition at line 150 of file G4ITTrackHolder.cc.

151 {
152  fSecondaries.transferTo(fpMainList);
153 }
void transferTo(G4FastList< OBJECT > *)

Here is the call graph for this function:

void PriorityList::TransferToMainList ( G4TrackList *&  __list,
G4TrackManyList allMainList 
)

Definition at line 115 of file G4ITTrackHolder.cc.

117 {
118  if (fpMainList)
119  {
120  __list->transferTo(fpMainList);
121  delete __list;
122  __list = 0;
123  }
124  else
125  {
126  NewMainList(__list, allMainList);
127  }
128 }
void transferTo(G4FastList< OBJECT > *)
void NewMainList(G4TrackList *__list, G4TrackManyList &allMainList)

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: