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

#include <G4TrackLogger.hh>

Public Types

typedef std::set< G4intTrackIDsSet
 

Public Member Functions

 G4TrackLogger ()
 
 ~G4TrackLogger ()
 
void SetEventID (G4int id)
 
G4bool FirstEnterance (G4int trid)
 

Detailed Description

Definition at line 46 of file G4TrackLogger.hh.

Member Typedef Documentation

◆ TrackIDsSet

typedef std::set<G4int > G4TrackLogger::TrackIDsSet

Definition at line 58 of file G4TrackLogger.hh.

Constructor & Destructor Documentation

◆ G4TrackLogger()

G4TrackLogger::G4TrackLogger ( )

Definition at line 37 of file G4TrackLogger.cc.

37 :
38 fPreviousEventID(-1)
39{}

◆ ~G4TrackLogger()

G4TrackLogger::~G4TrackLogger ( )

Definition at line 41 of file G4TrackLogger.cc.

41{}

Member Function Documentation

◆ FirstEnterance()

G4bool G4TrackLogger::FirstEnterance ( G4int  trid)

Definition at line 51 of file G4TrackLogger.cc.

51 {
52 G4bool first = true;
53 G4int n = fTrackIDsSet.count(trid);
54 if (n==1) {
55 first=false;
56 }
57 else if(n==0) {
58 fTrackIDsSet.insert(trid);
59 }
60 else if (n>1) {
61 G4cout << "Error G4TrackLogger::FirstEnterance: "
62 << "more than one elm in set!" << G4endl;
63
64 }
65 return first;
66}
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

Referenced by G4PSPopulation::ProcessHits().

◆ SetEventID()

void G4TrackLogger::SetEventID ( G4int  id)

Definition at line 44 of file G4TrackLogger.cc.

44 {
45 if (id != fPreviousEventID) {
46 fTrackIDsSet.clear();
47 fPreviousEventID =id;
48 }
49}

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