Geant4 10.7.0
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)
 
bool 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 120 of file G4ITReaction.hh.

Constructor & Destructor Documentation

◆ ~G4ITReactionPerTrack()

virtual G4ITReactionPerTrack::~G4ITReactionPerTrack ( )
inlinevirtual

Definition at line 129 of file G4ITReaction.hh.

130 {
131 fReactions.clear();
132 }
G4ITReactionList fReactions

Member Function Documentation

◆ AddIterator()

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

Definition at line 141 of file G4ITReaction.hh.

142 {
143 fReactionSetIt.push_back(it);
144 }
std::list< G4ITReactionPerTrackMap::iterator > fReactionSetIt

◆ AddReaction()

void G4ITReactionPerTrack::AddReaction ( G4ITReactionPtr  reaction)
inline

Definition at line 134 of file G4ITReaction.hh.

135 {
136 G4ITReactionList::iterator it =
137 fReactions.insert(fReactions.end(), reaction);
138 reaction->AddIterator(this->shared_from_this(), it);
139 }

◆ GetListOfIterators()

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

Definition at line 168 of file G4ITReaction.hh.

169 {
170 return fReactionSetIt;
171 }

◆ GetReactionList()

G4ITReactionList & G4ITReactionPerTrack::GetReactionList ( )
inline

Definition at line 163 of file G4ITReaction.hh.

164 {
165 return fReactions;
166 }

◆ New()

static G4ITReactionPerTrackPtr G4ITReactionPerTrack::New ( )
inlinestatic

Definition at line 124 of file G4ITReaction.hh.

125 {
127 }
G4shared_ptr< G4ITReactionPerTrack > G4ITReactionPerTrackPtr
Definition: G4ITReaction.hh:61

Referenced by G4ITReactionSet::AddReaction().

◆ RemoveMe()

void G4ITReactionPerTrack::RemoveMe ( )
inline

Definition at line 147 of file G4ITReaction.hh.

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

◆ RemoveThisReaction()

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

Definition at line 106 of file G4ITReaction.cc.

107{
108 // G4cout << "G4ITReactionPerTrack::RemoveReaction" << G4endl;
109 fReactions.erase(it);
110 if(fReactions.empty())
111 {
112 // G4cout << "G4ITReactionPerTrack is empty" << G4endl;
113 G4ITReactionSet::Instance()->RemoveReactionPerTrack(this->shared_from_this());
114 return true;
115 }
116 return false;
117}
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 175 of file G4ITReaction.hh.

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


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