File indexing completed on 2025-08-05 08:17:52
0001 #include "PHG4StepStatusDecode.h"
0002
0003 #include <Geant4/G4StepStatus.hh>
0004
0005 #include <TSystem.h>
0006
0007 #include <iostream>
0008 #include <map>
0009
0010 static std::map<int, std::string> stepstatus;
0011
0012 std::string PHG4StepStatusDecode::GetStepStatus(const int istatus)
0013 {
0014 if (stepstatus.empty())
0015 {
0016
0017 stepstatus[fWorldBoundary] = "fWorldBoundary";
0018 stepstatus[fGeomBoundary] = "fGeomBoundary";
0019 stepstatus[fAtRestDoItProc] = "fAtRestDoItProc";
0020 stepstatus[fAlongStepDoItProc] = "fAlongStepDoItProc";
0021 stepstatus[fPostStepDoItProc] = "fPostStepDoItProc";
0022 stepstatus[fUserDefinedLimit] = "fUserDefinedLimit";
0023 stepstatus[fExclusivelyForcedProc] = "fExclusivelyForcedProc";
0024 stepstatus[fUndefined] = "fUndefined";
0025 }
0026 if (stepstatus.find(istatus) == stepstatus.end())
0027 {
0028 std::cout << "could not find status " << istatus << " in stepstatus map" << std::endl;
0029 gSystem->Exit(1);
0030 }
0031 return stepstatus[istatus];
0032 }