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

#include <G4TrackLogger.hh>

Public Member Functions

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

Detailed Description

Definition at line 47 of file G4TrackLogger.hh.

Member Function Documentation

◆ FirstEnterance()

G4bool G4TrackLogger::FirstEnterance ( G4int trid)

Definition at line 45 of file G4TrackLogger.cc.

46{
47 G4bool first = true;
48 auto n = fTrackIDsSet.count(trid);
49 if (n == 1) {
50 first = false;
51 }
52 else if (n == 0) {
53 fTrackIDsSet.insert(trid);
54 }
55 else if (n > 1) {
56 G4cout << "Error G4TrackLogger::FirstEnterance: "
57 << "more than one elm in set!" << G4endl;
58 }
59 return first;
60}
bool G4bool
Definition G4Types.hh:86
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

Referenced by G4PSPopulation::ProcessHits().

◆ SetEventID()

void G4TrackLogger::SetEventID ( G4int id)

Definition at line 37 of file G4TrackLogger.cc.

38{
39 if (id != fPreviousEventID) {
40 fTrackIDsSet.clear();
41 fPreviousEventID = id;
42 }
43}

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