Geant4-11
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions
G4ITReactionPerTrack Class Reference

#include <G4ITReaction.hh>

Inheritance diagram for G4ITReactionPerTrack:

Public Member Functions

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

Static Public Member Functions

static G4ITReactionPerTrackPtr New ()
 

Protected Attributes

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

Private Member Functions

 G4ITReactionPerTrack ()=default
 

Detailed Description

Definition at line 124 of file G4ITReaction.hh.

Constructor & Destructor Documentation

◆ G4ITReactionPerTrack()

G4ITReactionPerTrack::G4ITReactionPerTrack ( )
privatedefault

Referenced by New().

◆ ~G4ITReactionPerTrack()

virtual G4ITReactionPerTrack::~G4ITReactionPerTrack ( )
inlinevirtual

Definition at line 133 of file G4ITReaction.hh.

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

References 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

References 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 }

References fReactions.

◆ GetListOfIterators()

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

Definition at line 172 of file G4ITReaction.hh.

173 {
174 return fReactionSetIt;
175 }

References fReactionSetIt.

◆ GetReactionList()

G4ITReactionList & G4ITReactionPerTrack::GetReactionList ( )
inline

Definition at line 167 of file G4ITReaction.hh.

168 {
169 return fReactions;
170 }

References fReactions.

◆ New()

static G4ITReactionPerTrackPtr G4ITReactionPerTrack::New ( )
inlinestatic

Definition at line 128 of file G4ITReaction.hh.

129 {
131 }
G4shared_ptr< G4ITReactionPerTrack > G4ITReactionPerTrackPtr
Definition: G4ITReaction.hh:62
G4ITReactionPerTrack()=default

References G4ITReactionPerTrack().

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 }

References fReactions, and fReactionSetIt.

◆ 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()

References fReactions, G4ITReactionSet::Instance(), and G4ITReactionSet::RemoveReactionPerTrack().

Field 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: