Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes
G4IT Class Referenceabstract

#include <G4IT.hh>

Inheritance diagram for G4IT:
G4VUserTrackInformation G4Molecule

Public Member Functions

 G4IT ()
 
 G4IT (G4Track *)
 
virtual ~G4IT ()
 
voidoperator new (size_t)
 
void operator delete (void *aIT)
 
virtual void Print () const
 
virtual const G4StringGetName () const =0
 
virtual G4bool diff (const G4IT &right) const =0
 
virtual G4bool equal (const G4IT &right) const =0
 
G4bool operator< (const G4IT &right) const
 
G4bool operator== (const G4IT &right) const
 
G4bool operator!= (const G4IT &right) const
 
void SetTrack (G4Track *)
 
G4TrackGetTrack ()
 
const G4TrackGetTrack () const
 
void RecordCurrentPositionNTime ()
 
void SetPrevious (G4IT *)
 
void SetNext (G4IT *)
 
G4ITGetPrevious ()
 
G4ITGetNext ()
 
const G4ITGetPrevious () const
 
const G4ITGetNext () const
 
void SetITBox (G4ITBox *)
 
const G4ITBoxGetITBox () const
 
void TakeOutBox ()
 
void SetNode (G4KDNode *)
 
void SetParentID (int, int)
 
void GetParentID (int &, int &)
 
const G4ThreeVectorGetPreStepPosition () const
 
G4double GetPreStepLocalTime () const
 
G4double GetPreStepGlobalTime () const
 
G4KDNodeGetNode () const
 
G4TrackingInformationGetTrackingInfo ()
 
G4TrackListNodeGetTrackListNode ()
 
void SetTrackListNode (G4TrackListNode *node)
 
virtual const G4ITType GetITType () const =0
 
- Public Member Functions inherited from G4VUserTrackInformation
 G4VUserTrackInformation ()
 
 G4VUserTrackInformation (const G4String &infoType)
 
 G4VUserTrackInformation (const G4VUserTrackInformation &)
 
G4VUserTrackInformationoperator= (const G4VUserTrackInformation &)
 
virtual ~G4VUserTrackInformation ()
 
const G4StringGetType () const
 

Protected Member Functions

 G4IT (const G4IT &)
 
G4IToperator= (const G4IT &)
 

Protected Attributes

G4TrackfpTrack
 
- Protected Attributes inherited from G4VUserTrackInformation
G4StringpType
 

Detailed Description

G4IT is a interface which allows the inheriting object :

Definition at line 82 of file G4IT.hh.

Constructor & Destructor Documentation

G4IT::G4IT ( )

Definition at line 61 of file G4IT.cc.

References aITAllocator.

61  : G4VUserTrackInformation("G4IT"),
62  fpTrack (0),
63  fpPreviousIT(0), fpNextIT(0),
64  fTrackingInformation()
65 // fpTrackingInformation(new G4TrackingInformation())
66 {
68  fpITBox=0;
69  fpKDNode = 0 ;
70  fpTrackNode = 0;
71  fParentID_A = 0;
72  fParentID_B = 0;
73 }
G4ThreadLocal G4Allocator< G4IT > * aITAllocator
Definition: G4IT.cc:43
G4Track * fpTrack
Definition: G4IT.hh:144
G4IT::G4IT ( G4Track aTrack)

Definition at line 112 of file G4IT.cc.

References aITAllocator, fpTrack, and RecordCurrentPositionNTime().

112  : G4VUserTrackInformation("G4IT"),
113  fpPreviousIT(0), fpNextIT(0),
114  fTrackingInformation()
115 // fpTrackingInformation(new G4TrackingInformation())
116 {
118  fpITBox = 0;
119  fpTrack = aTrack;
120  fpKDNode = 0 ;
121  fpTrackNode = 0;
122  fParentID_A = 0;
123  fParentID_B = 0;
125 }
G4ThreadLocal G4Allocator< G4IT > * aITAllocator
Definition: G4IT.cc:43
void RecordCurrentPositionNTime()
Definition: G4IT.cc:159
G4Track * fpTrack
Definition: G4IT.hh:144
G4IT::~G4IT ( )
virtual

Definition at line 141 of file G4IT.cc.

References TakeOutBox().

142 {
143  TakeOutBox();
144 
145 // if(fpTrackingInformation)
146 // {
147 // delete fpTrackingInformation;
148 // fpTrackingInformation = 0;
149 // }
150 
151  // Note :
152  // G4ITTrackingManager will delete fTrackNode.
153  // fKDNode will be deleted when the KDTree is rebuilt
154 }
void TakeOutBox()
Definition: G4IT.cc:127
G4IT::G4IT ( const G4IT )
protected

Definition at line 76 of file G4IT.cc.

76  : G4VUserTrackInformation("G4IT"),
77  fpTrack (0),
78  fpPreviousIT(0), fpNextIT(0),
79  fTrackingInformation()
80 // fpTrackingInformation(new G4TrackingInformation())
81 {
82  fpITBox=0;
83  fpKDNode = 0 ;
84  fpTrackNode = 0;
85  fParentID_A = 0;
86  fParentID_B = 0;
87 }
G4Track * fpTrack
Definition: G4IT.hh:144

Member Function Documentation

virtual G4bool G4IT::diff ( const G4IT right) const
pure virtual

Referenced by operator<(), pysigh(), pythrg(), and tecalb().

virtual G4bool G4IT::equal ( const G4IT right) const
pure virtual

Referenced by operator==().

const G4ITBox * G4IT::GetITBox ( ) const
inline

Definition at line 173 of file G4IT.hh.

174 {
175  return fpITBox ;
176 }
virtual const G4ITType G4IT::GetITType ( ) const
pure virtual
virtual const G4String& G4IT::GetName ( ) const
pure virtual
G4IT * G4IT::GetNext ( )
inline

Definition at line 198 of file G4IT.hh.

Referenced by G4ITBox::Extract(), G4ITBox::TransferTo(), and G4ITBox::~G4ITBox().

199 {
200  return fpNextIT;
201 }
const G4IT * G4IT::GetNext ( ) const
inline

Definition at line 250 of file G4IT.hh.

251 {
252  return fpNextIT ;
253 }
G4KDNode * G4IT::GetNode ( ) const
inline

Definition at line 260 of file G4IT.hh.

261 {
262  return fpKDNode ;
263 }
void G4IT::GetParentID ( int p_a,
int p_b 
)
inline

Definition at line 224 of file G4IT.hh.

225 {
226  p_a = fParentID_A;
227  p_b = fParentID_B ;
228 }
G4double G4IT::GetPreStepGlobalTime ( ) const
inline

Definition at line 230 of file G4IT.hh.

References G4TrackingInformation::GetPreStepGlobalTime().

231 {
232  return fTrackingInformation.GetPreStepGlobalTime();
233 }
G4double GetPreStepGlobalTime() const
G4double G4IT::GetPreStepLocalTime ( ) const
inline

Definition at line 235 of file G4IT.hh.

References G4TrackingInformation::GetPreStepLocalTime().

236 {
237  return fTrackingInformation.GetPreStepLocalTime();
238 }
G4double GetPreStepLocalTime() const
const G4ThreeVector & G4IT::GetPreStepPosition ( ) const
inline

Definition at line 240 of file G4IT.hh.

References G4TrackingInformation::GetPreStepPosition().

241 {
242  return fTrackingInformation.GetPreStepPosition();
243 }
const G4ThreeVector & GetPreStepPosition() const
G4IT * G4IT::GetPrevious ( )
inline

Definition at line 193 of file G4IT.hh.

Referenced by G4ITBox::Extract(), and G4ITBox::FindIT().

194 {
195  return fpPreviousIT;
196 }
const G4IT * G4IT::GetPrevious ( ) const
inline

Definition at line 245 of file G4IT.hh.

246 {
247  return fpPreviousIT ;
248 }
G4Track * G4IT::GetTrack ( )
inline

Definition at line 208 of file G4IT.hh.

References fpTrack.

Referenced by G4ITStepProcessor::FindTransportationStep().

209 {
210  return fpTrack;
211 }
G4Track * fpTrack
Definition: G4IT.hh:144
const G4Track * G4IT::GetTrack ( ) const
inline

Definition at line 213 of file G4IT.hh.

References fpTrack.

214 {
215  return fpTrack;
216 }
G4Track * fpTrack
Definition: G4IT.hh:144
G4TrackingInformation* G4IT::GetTrackingInfo ( )
inline
G4TrackListNode* G4IT::GetTrackListNode ( )
inline

Definition at line 136 of file G4IT.hh.

Referenced by G4TrackList::Flag(), and G4TrackList::Unflag().

136 {return fpTrackNode;}
void G4IT::operator delete ( void aIT)
inline

Definition at line 168 of file G4IT.hh.

References aITAllocator.

169 {
170  aITAllocator->FreeSingle((G4IT *) aIT);
171 }
Definition: G4IT.hh:82
G4DLLIMPORT G4ThreadLocal G4Allocator< G4IT > * aITAllocator
Definition: G4IT.cc:43
void * G4IT::operator new ( size_t  )
inline

Definition at line 162 of file G4IT.hh.

References aITAllocator.

163 {
165  return (void *) aITAllocator->MallocSingle();
166 }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4IT > * aITAllocator
Definition: G4IT.cc:43
G4bool G4IT::operator!= ( const G4IT right) const

Definition at line 189 of file G4IT.cc.

References operator==().

190 {
191  return !(this->operator==(right));
192 }
G4bool operator==(const G4IT &right) const
Definition: G4IT.cc:180
G4bool G4IT::operator< ( const G4IT right) const

Definition at line 167 of file G4IT.cc.

References diff(), and GetITType().

168 {
169  if(GetITType() == right.GetITType() )
170  {
171  return (this->diff(right)) ;
172  }
173  else
174  {
175  return (GetITType() < right.GetITType());
176  }
177  return false;
178 }
virtual G4bool diff(const G4IT &right) const =0
virtual const G4ITType GetITType() const =0
G4IT & G4IT::operator= ( const G4IT right)
protected

Definition at line 90 of file G4IT.cc.

References FatalException, fpTrack, and G4Exception().

91 {
92  G4ExceptionDescription exceptionDescription;
93  exceptionDescription << "The assignment operator of G4IT should not be used, this feature is not supported."
94  << "If really needed, please contact the developers.";
95  G4Exception("G4IT::operator=(const G4IT& right)","G4IT001",FatalException,exceptionDescription);
96 
97  if(this == &right) return *this;
98 
99  fpTrack = 0;
100  fpITBox = 0;
101  fpPreviousIT = 0;
102  fpNextIT = 0;
103  fpKDNode = 0 ;
104  fParentID_A = 0;
105  fParentID_B = 0;
106 // fpTrackingInformation = 0;
107  fpTrackNode = 0;
108 
109  return *this;
110 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4Track * fpTrack
Definition: G4IT.hh:144
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4bool G4IT::operator== ( const G4IT right) const

Definition at line 180 of file G4IT.cc.

References equal(), and GetITType().

Referenced by operator!=().

181 {
182  if(GetITType() == right.GetITType() )
183  {
184  return this->equal(right);
185  }
186  return false;
187 }
virtual G4bool equal(const G4IT &right) const =0
virtual const G4ITType GetITType() const =0
virtual void G4IT::Print ( void  ) const
inlinevirtual

Reimplemented from G4VUserTrackInformation.

Definition at line 92 of file G4IT.hh.

92 {;}
void G4IT::RecordCurrentPositionNTime ( )

Definition at line 159 of file G4IT.cc.

References fpTrack, and G4TrackingInformation::RecordCurrentPositionNTime().

Referenced by G4IT().

160 {
161  if(fpTrack)
162  {
163  fTrackingInformation.RecordCurrentPositionNTime(fpTrack);
164  }
165 }
void RecordCurrentPositionNTime(G4Track *)
G4Track * fpTrack
Definition: G4IT.hh:144
void G4IT::SetITBox ( G4ITBox aITBox)
inline

Definition at line 178 of file G4IT.hh.

Referenced by G4ITBox::Extract(), and G4ITBox::Push().

179 {
180  fpITBox = aITBox;
181 }
void G4IT::SetNext ( G4IT aIT)
inline

Definition at line 188 of file G4IT.hh.

Referenced by G4ITBox::Extract(), and G4ITBox::Push().

189 {
190  fpNextIT = aIT;
191 }
void G4IT::SetNode ( G4KDNode aNode)
inline

Definition at line 255 of file G4IT.hh.

256 {
257  fpKDNode = aNode ;
258 }
void G4IT::SetParentID ( int  p_a,
int  p_b 
)
inline

Definition at line 218 of file G4IT.hh.

219 {
220  fParentID_A = p_a;
221  fParentID_B = p_b;
222 }
void G4IT::SetPrevious ( G4IT aIT)
inline

Definition at line 183 of file G4IT.hh.

Referenced by G4ITBox::Extract(), and G4ITBox::Push().

184 {
185  fpPreviousIT = aIT;
186 }
void G4IT::SetTrack ( G4Track track)
inline

Definition at line 203 of file G4IT.hh.

References fpTrack.

204 {
205  fpTrack = track;
206 }
G4Track * fpTrack
Definition: G4IT.hh:144
void G4IT::SetTrackListNode ( G4TrackListNode node)
inline

Definition at line 137 of file G4IT.hh.

Referenced by G4TrackList::EraseTrackListNode(), and G4TrackList::Flag().

137 {fpTrackNode = node;}
void G4IT::TakeOutBox ( )

Definition at line 127 of file G4IT.cc.

References G4ITBox::Extract(), and InactiveNode().

Referenced by ~G4IT().

128 {
129  if(fpITBox)
130  {
131  fpITBox->Extract(this);
132  }
133 
134  if(fpKDNode)
135  {
136  InactiveNode(fpKDNode);
137  fpKDNode = 0;
138  }
139 }
void InactiveNode(G4KDNode *)
Definition: G4KDNode.cc:57
void Extract(G4IT *)
Definition: G4ITBox.cc:87

Field Documentation

G4Track* G4IT::fpTrack
protected

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