Geant4 11.1.1
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 59 of file G4TrackLogger.hh.

Constructor & Destructor Documentation

◆ G4TrackLogger()

G4TrackLogger::G4TrackLogger ( )

Definition at line 37 of file G4TrackLogger.cc.

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 52 of file G4TrackLogger.cc.

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

Referenced by G4PSPopulation::ProcessHits().

◆ SetEventID()

void G4TrackLogger::SetEventID ( G4int  id)

Definition at line 43 of file G4TrackLogger.cc.

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

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