62 vname =
name +
"store/";
67 wrObj.push_back(
"HepMC");
68 wrObj.push_back(
"MCTruth");
69 wrObj.push_back(
"Hits");
74 for(i = 0; i < 3; ++i)
76 cmd = vname +
wrObj[i];
77 guidance =
"Store " +
wrObj[i] +
" objects for output";
79 storeObj[i]->SetGuidance(guidance.c_str());
80 if(
wrObj[i] ==
"HepMC")
82 storeObj[i]->SetCandidates(
"on off recycle");
86 storeObj[i]->SetCandidates(
"on off");
94 cmd = vname +
"hitIO";
99 vname =
name +
"set/";
103 vname +=
"writeFile/";
107 for(i = 0; i < 3; ++i)
109 cmd = vname +
wrObj[i];
110 guidance =
"Set an output file name for " +
wrObj[i] +
".";
112 setWrFile[i]->SetGuidance(guidance.c_str());
113 setWrFile[i]->SetParameterName(
"file name",
true,
true);
116 vname =
name +
"set/ReadFile/";
120 rdObj.push_back(
"Hits");
122 cmd = vname +
rdObj[0];
123 guidance =
"Set an input file name for " +
rdObj[0] +
".";
125 setRdFile[0]->SetGuidance(guidance.c_str());
126 setRdFile[0]->SetParameterName(
"file name",
true,
true);
128 cmd =
name +
"printall";
145 for(
G4int i = 0; i < 3; ++i)
162 else if(command ==
select)
180 for(
G4int i = 0; i < 3; ++i)
185 if(newValues ==
"on")
189 else if(newValues ==
"off")
193 else if(newValues ==
"recycle")
199 G4cerr <<
"Unrecognized keyword - \"" << newValues <<
"\"." <<
G4endl;
222 else if(command ==
select)
236 for(
G4int i = 0; i < 3; ++i)
270 if(text.length() <= 0)
274 for(
G4int i = 0; i <
n; ++i)
276 p1 = text.find_first_of(delim, p0 + 1);
280 p1 = text.find_first_of(delim, p0 + 1);
294 return text.substr(p, p1 - p);
static constexpr double pc
G4GLOB_DLL std::ostream G4cerr
void SetNewValue(G4UIcommand *command, G4String newValues)
G4UIcmdWithAnInteger * verboseCmd
std::vector< std::string > wrObj
~G4PersistencyCenterMessenger()
std::vector< G4UIcmdWithAString * > setWrFile
G4String PopWord(const G4String &text, G4int n, const G4String &delim)
std::vector< G4UIcmdWithAString * > storeObj
G4String GetCurrentValue(G4UIcommand *command)
std::vector< G4UIcmdWithAString * > setRdFile
G4UIcmdWithAString * select
G4UIcmdWithoutParameter * printAll
G4UIdirectory * directory
std::vector< std::string > rdObj
G4UIcmdWithAString * regHitIO
G4PersistencyCenterMessenger(G4PersistencyCenter *p)
G4bool SetWriteFile(const G4String &objName, const G4String &writeFileName)
G4bool SetReadFile(const G4String &objName, const G4String &readFileName)
void SetStoreMode(const G4String &objName, StoreMode mode)
G4String CurrentReadFile(const G4String &objName)
G4String CurrentHCIOmanager()
void AddHCIOmanager(const G4String &detName, const G4String &colName)
void SetVerboseLevel(G4int v)
StoreMode CurrentStoreMode(const G4String &objName)
const G4String & CurrentSystem()
G4String CurrentWriteFile(const G4String &objName)
void SelectSystem(const G4String &systemName)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetDefaultValue(G4int defVal)
static G4String ConvertToString(G4bool boolVal)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
const char * name(G4int ptype)