EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4StepStatusDecode.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4StepStatusDecode.cc
1 #include "PHG4StepStatusDecode.h"
2 
3 #include <Geant4/G4StepStatus.hh>
4 
5 #include <TSystem.h>
6 
7 #include <iostream>
8 #include <map>
9 
10 using namespace std;
11 static map<int, string> stepstatus;
12 
13 string PHG4StepStatusDecode::GetStepStatus(const int istatus)
14 {
15  if (stepstatus.empty())
16  {
17  cout << "filling stepstatus map" << endl;
18  stepstatus[fWorldBoundary] = "fWorldBoundary";
19  stepstatus[fGeomBoundary] = "fGeomBoundary";
20  stepstatus[fAtRestDoItProc] = "fAtRestDoItProc";
21  stepstatus[fAlongStepDoItProc] = "fAlongStepDoItProc";
22  stepstatus[fPostStepDoItProc] = "fPostStepDoItProc";
23  stepstatus[fUserDefinedLimit] = "fUserDefinedLimit";
24  stepstatus[fExclusivelyForcedProc] = "fExclusivelyForcedProc";
25  stepstatus[fUndefined] = "fUndefined";
26  }
27  if (stepstatus.find(istatus) == stepstatus.end())
28  {
29  cout << "could not find status " << istatus << " in stepstatus map" << endl;
30  gSystem->Exit(1);
31  }
32  return stepstatus[istatus];
33 }