Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VITManager::iterator Class Reference

#include <G4ITManager.hh>

+ Inheritance diagram for G4VITManager::iterator:

Public Member Functions

 iterator (G4ITBox *)
 
virtual ~iterator ()
 
virtual G4bool begin ()
 
virtual G4bool end ()
 
iteratoroperator= (const iterator &i)
 
iteratoroperator++ (G4int)
 
G4IToperator* ()
 
G4ITBoxGetBox ()
 

Protected Member Functions

void PrintNext () const
 

Protected Attributes

G4ITfNextIT
 
G4ITBoxfCurrentBox
 

Detailed Description

Definition at line 97 of file G4ITManager.hh.

Constructor & Destructor Documentation

◆ iterator()

G4VITManager::iterator::iterator ( G4ITBox box)

Definition at line 40 of file G4ITManager_iterator.cc.

41{
42 if(box)
43 {
44 fCurrentBox = box ;
45 }
46 else
47 {
48 fCurrentBox = 0;
49 }
50
51 fNextIT = 0;
52}

◆ ~iterator()

virtual G4VITManager::iterator::~iterator ( )
inlinevirtual

Definition at line 101 of file G4ITManager.hh.

101{;}

Member Function Documentation

◆ begin()

G4bool G4VITManager::iterator::begin ( )
virtual

Definition at line 55 of file G4ITManager_iterator.cc.

56{
57 if(fCurrentBox)
58 {
60
61 if(fNextIT)
62 {
63// G4cout << "G4VITManager::allbox_iterator, fNextIT :" << fNextIT -> GetName()<< G4endl;
64 return true;
65 }
66 }
67
68 return false;
69}
G4IT * GetFirstIT()
Definition: G4ITBox.hh:104

◆ end()

G4bool G4VITManager::iterator::end ( )
virtual

Definition at line 86 of file G4ITManager_iterator.cc.

87{
88 if(fNextIT) return false;
89 return true ;
90}

◆ GetBox()

G4ITBox * G4VITManager::iterator::GetBox ( )

Definition at line 113 of file G4ITManager_iterator.cc.

114{
115 return fCurrentBox;
116}

◆ operator*()

G4IT * G4VITManager::iterator::operator* ( )

Definition at line 106 of file G4ITManager_iterator.cc.

107{
108 return fNextIT;
109}

◆ operator++()

G4VITManager::iterator & G4VITManager::iterator::operator++ ( G4int  )

Definition at line 72 of file G4ITManager_iterator.cc.

73{
74 if(fCurrentBox)
75 {
76 if(fNextIT)
77 {
79 }
80 }
81 return *this;
82}
G4IT * GetNext()
Definition: G4IT.hh:197

◆ operator=()

G4VITManager::iterator & G4VITManager::iterator::operator= ( const iterator i)

Definition at line 94 of file G4ITManager_iterator.cc.

95{
96 if(this != &i)
97 {
98 fNextIT = i.fNextIT;
99 fCurrentBox = i.fCurrentBox;
100 }
101 return *this;
102}

◆ PrintNext()

void G4VITManager::iterator::PrintNext ( ) const
protected

Definition at line 120 of file G4ITManager_iterator.cc.

121{
122 if(fNextIT)
123 {
124 if(fNextIT->GetTrack())
125 {
126 G4cout
128 << "\t"
129 << fNextIT->GetName()
130 << G4endl;
131 }
132 }
133 else
134 {
135 G4cout<<"fNextIT = 0"<<G4endl;
136 }
137}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
virtual const G4String & GetName() const =0
G4Track * GetTrack()
Definition: G4IT.hh:207
G4int GetTrackID() const

Member Data Documentation

◆ fCurrentBox

G4ITBox* G4VITManager::iterator::fCurrentBox
protected

◆ fNextIT

G4IT* G4VITManager::iterator::fNextIT
protected

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