Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ITReactionPerTrack Class Reference

#include <G4ITReaction.hh>

+ Inheritance diagram for G4ITReactionPerTrack:

Public Member Functions

virtual ~G4ITReactionPerTrack ()
 
void AddReaction (G4ITReactionPtr reaction)
 
void AddIterator (G4ITReactionPerTrackMap::iterator it)
 
G4bool RemoveThisReaction (G4ITReactionList::iterator it)
 
void RemoveMe ()
 
G4ITReactionListGetReactionList ()
 
std::list< G4ITReactionPerTrackMap::iterator > & GetListOfIterators ()
 

Static Public Member Functions

static G4ITReactionPerTrackPtr New ()
 

Protected Attributes

G4ITReactionList fReactions
 
std::list< G4ITReactionPerTrackMap::iterator > fReactionSetIt
 

Detailed Description

Definition at line 124 of file G4ITReaction.hh.

Constructor & Destructor Documentation

◆ ~G4ITReactionPerTrack()

virtual G4ITReactionPerTrack::~G4ITReactionPerTrack ( )
inlinevirtual

Definition at line 133 of file G4ITReaction.hh.

134 {
135 fReactions.clear();
136 }
G4ITReactionList fReactions

Member Function Documentation

◆ AddIterator()

void G4ITReactionPerTrack::AddIterator ( G4ITReactionPerTrackMap::iterator  it)
inline

Definition at line 145 of file G4ITReaction.hh.

146 {
147 fReactionSetIt.push_back(it);
148 }
std::list< G4ITReactionPerTrackMap::iterator > fReactionSetIt

◆ AddReaction()

void G4ITReactionPerTrack::AddReaction ( G4ITReactionPtr  reaction)
inline

Definition at line 138 of file G4ITReaction.hh.

139 {
140 auto it =
141 fReactions.insert(fReactions.end(), reaction);
142 reaction->AddIterator(this->shared_from_this(), it);
143 }

◆ GetListOfIterators()

std::list< G4ITReactionPerTrackMap::iterator > & G4ITReactionPerTrack::GetListOfIterators ( )
inline

Definition at line 172 of file G4ITReaction.hh.

173 {
174 return fReactionSetIt;
175 }

◆ GetReactionList()

G4ITReactionList & G4ITReactionPerTrack::GetReactionList ( )
inline

Definition at line 167 of file G4ITReaction.hh.

168 {
169 return fReactions;
170 }

◆ New()

static G4ITReactionPerTrackPtr G4ITReactionPerTrack::New ( )
inlinestatic

Definition at line 128 of file G4ITReaction.hh.

129 {
131 }
G4shared_ptr< G4ITReactionPerTrack > G4ITReactionPerTrackPtr
Definition: G4ITReaction.hh:62

Referenced by G4ITReactionSet::AddReaction().

◆ RemoveMe()

void G4ITReactionPerTrack::RemoveMe ( )
inline

Definition at line 151 of file G4ITReaction.hh.

152 {
153 G4ITReactionPerTrackPtr backMeUp = this->shared_from_this();
154
155 G4ITReactionList::iterator next;
156 for(auto it = fReactions.begin() ;
157 it != fReactions.end() ; it = next)
158 {
159 next = it;
160 ++next;
161 (*it)->RemoveMe();
162 }
163 fReactions.clear();
164 fReactionSetIt.clear();
165 }

◆ RemoveThisReaction()

G4bool G4ITReactionPerTrack::RemoveThisReaction ( G4ITReactionList::iterator  it)

Definition at line 103 of file G4ITReaction.cc.

104{
105 fReactions.erase(it);
106 if(fReactions.empty())
107 {
108 G4ITReactionSet::Instance()->RemoveReactionPerTrack(this->shared_from_this());
109 return true;
110 }
111 return false;
112}
void RemoveReactionPerTrack(G4ITReactionPerTrackPtr reactionPerTrack)
static G4ITReactionSet * Instance()

Member Data Documentation

◆ fReactions

G4ITReactionList G4ITReactionPerTrack::fReactions
protected

◆ fReactionSetIt

std::list<G4ITReactionPerTrackMap::iterator> G4ITReactionPerTrack::fReactionSetIt
protected

Definition at line 179 of file G4ITReaction.hh.

Referenced by AddIterator(), GetListOfIterators(), and RemoveMe().


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