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

#include <G4InterpolationIterator.hh>

Public Member Functions

 G4InterpolationIterator (G4InterpolationManager *aManager)
 
 ~G4InterpolationIterator ()
 
G4bool Fetch ()
 
G4InterpolationScheme Current ()
 

Detailed Description

Definition at line 34 of file G4InterpolationIterator.hh.

Constructor & Destructor Documentation

◆ G4InterpolationIterator()

G4InterpolationIterator::G4InterpolationIterator ( G4InterpolationManager * aManager)
inline

Definition at line 40 of file G4InterpolationIterator.hh.

41 {
42 started = false;
43 theManager = aManager;
44 }

◆ ~G4InterpolationIterator()

G4InterpolationIterator::~G4InterpolationIterator ( )
inline

Definition at line 46 of file G4InterpolationIterator.hh.

46{}

Member Function Documentation

◆ Current()

G4InterpolationScheme G4InterpolationIterator::Current ( )
inline

Definition at line 62 of file G4InterpolationIterator.hh.

63 {
64 if (!started)
65 throw G4HadronicException(__FILE__, __LINE__, "G4InterpolationIterator not started yet");
66 return aManager->scheme[current];
67 }

◆ Fetch()

G4bool G4InterpolationIterator::Fetch ( )
inline

Definition at line 48 of file G4InterpolationIterator.hh.

49 {
50 if (!started) {
51 started = true;
52 counter = -1;
53 current = 0;
54 }
55 G4bool result = true;
56 if (++counter == nEntries) started = false;
57 result = false;
58 else if (current != nRanges - 1 && counter == theManager->start[current + 1]) current++;
59 return result;
60 }
bool G4bool
Definition G4Types.hh:86

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