Analysis Software
Documentation for sPHENIX simulation 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 static std::map<int, std::string> stepstatus;
11 
13 {
14  if (stepstatus.empty())
15  {
16  // std::cout << "filling stepstatus map" << std::endl;
17  stepstatus[fWorldBoundary] = "fWorldBoundary";
18  stepstatus[fGeomBoundary] = "fGeomBoundary";
19  stepstatus[fAtRestDoItProc] = "fAtRestDoItProc";
20  stepstatus[fAlongStepDoItProc] = "fAlongStepDoItProc";
21  stepstatus[fPostStepDoItProc] = "fPostStepDoItProc";
22  stepstatus[fUserDefinedLimit] = "fUserDefinedLimit";
23  stepstatus[fExclusivelyForcedProc] = "fExclusivelyForcedProc";
24  stepstatus[fUndefined] = "fUndefined";
25  }
26  if (stepstatus.find(istatus) == stepstatus.end())
27  {
28  std::cout << "could not find status " << istatus << " in stepstatus map" << std::endl;
29  gSystem->Exit(1);
30  }
31  return stepstatus[istatus];
32 }