Geant4 9.6.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 47 of file G4TrackLogger.hh.

Member Typedef Documentation

◆ TrackIDsSet

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

Definition at line 59 of file G4TrackLogger.hh.

Constructor & Destructor Documentation

◆ G4TrackLogger()

G4TrackLogger::G4TrackLogger ( )

Definition at line 38 of file G4TrackLogger.cc.

38 :
39 fPreviousEventID(-1)
40{}

◆ ~G4TrackLogger()

G4TrackLogger::~G4TrackLogger ( )

Definition at line 42 of file G4TrackLogger.cc.

42{}

Member Function Documentation

◆ FirstEnterance()

G4bool G4TrackLogger::FirstEnterance ( G4int  trid)

Definition at line 52 of file G4TrackLogger.cc.

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

Referenced by G4PSPopulation::ProcessHits().

◆ SetEventID()

void G4TrackLogger::SetEventID ( G4int  id)

Definition at line 45 of file G4TrackLogger.cc.

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

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