37 std::string
name =
"/persistency/";
41 std::string cmd = name +
"verbose";
53 std::string vname = name +
"select";
61 vname = name +
"store/";
66 wrObj.push_back(
"HepMC");
67 wrObj.push_back(
"MCTruth");
68 wrObj.push_back(
"Hits");
73 for ( i = 0; i < 3; i++ )
75 cmd = vname +
wrObj[i];
76 guidance =
"Store " + wrObj[i] +
" objects for output";
78 storeObj[i]->SetGuidance(guidance.c_str());
79 if ( wrObj[i] ==
"HepMC" ) {
80 storeObj[i]->SetCandidates(
"on off recycle");
82 storeObj[i]->SetCandidates(
"on off");
90 cmd = vname +
"hitIO";
95 vname = name +
"set/";
99 vname +=
"writeFile/";
103 for ( i = 0; i < 3; i++ )
105 cmd = vname +
wrObj[i];
106 guidance =
"Set an output file name for " + wrObj[i] +
".";
108 setWrFile[i]->SetGuidance(guidance.c_str());
109 setWrFile[i]->SetParameterName(
"file name",
true,
true);
112 vname = name +
"set/ReadFile/";
116 rdObj.push_back(
"Hits");
118 cmd = vname +
rdObj[0];
119 guidance =
"Set an input file name for " + rdObj[0] +
".";
121 setRdFile[0]->SetGuidance(guidance.c_str());
122 setRdFile[0]->SetParameterName(
"file name",
true,
true);
124 cmd = name +
"printall";
142 for (
int i = 0; i < 3; i++ )
168 pc -> SetReadFile (
rdObj[0],newValues);
176 for(
int i=0; i<3; i++ ) {
180 if( newValues ==
"on" ) {
182 }
else if ( newValues ==
"off" ) {
184 }
else if ( newValues ==
"recycle" ) {
187 G4cerr <<
"Unrecognized keyword - \"" << newValues <<
"\"."
225 for(
int i=0; i<3; i++ ) {
256 if ( text.length() <= 0 )
return "";
259 for (
int i = 0; i <
n; i++ ) {
260 p1 = text.find_first_of(delim,p0+1);
261 while( p1 == p0+1 ) {
263 p1 = text.find_first_of(delim,p0+1);
267 if ( i+1 < n )
return "";
274 return text.substr(p,p1-p);
void SetGuidance(const char *aGuidance)
std::string CurrentWriteFile(std::string objName)
void SetDefaultValue(G4int defVal)
std::vector< std::string > rdObj
void AddHCIOmanager(std::string detName, std::string colName)
void SetRange(const char *rs)
std::string CurrentHCIOmanager()
G4bool SetWriteFile(std::string objName, std::string writeFileName)
StoreMode CurrentStoreMode(std::string objName)
G4UIcmdWithAString * select
std::string PopWord(std::string text, int n, std::string delim)
std::vector< std::string > wrObj
G4UIcmdWithAString * regHitIO
void SetNewValue(G4UIcommand *command, G4String newValues)
static constexpr double pc
const std::string CurrentSystem()
std::vector< G4UIcmdWithAString * > setRdFile
void SetCandidates(const char *candidateList)
G4GLOB_DLL std::ostream G4cerr
G4UIcmdWithoutParameter * printAll
std::vector< G4UIcmdWithAString * > storeObj
std::string CurrentReadFile(std::string objName)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4String GetCurrentValue(G4UIcommand *command)
void SetVerboseLevel(int v)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
std::vector< G4UIcmdWithAString * > setWrFile
static G4int GetNewIntValue(const char *paramString)
void SetStoreMode(std::string objName, StoreMode mode)
G4UIcmdWithAnInteger * verboseCmd
G4PersistencyCenterMessenger(G4PersistencyCenter *p)
void SelectSystem(std::string systemName)
G4UIdirectory * directory
~G4PersistencyCenterMessenger()