40 directory->
SetGuidance(
"Control commands for Persistency package");
45 verboseCmd->
SetGuidance(
"Set the verbose level of G4PersistencyManager.");
47 verboseCmd->
SetGuidance(
" 1 : Display main topics");
48 verboseCmd->
SetGuidance(
" 2 : Display event-level topics");
49 verboseCmd->
SetGuidance(
" 3 : Display debug information");
52 verboseCmd->
SetRange(
"level >=0 && level <=3");
58 select->
SetGuidance(
"Selection of a persistency package");
62 vname = name +
"store/";
65 subdir1->
SetGuidance(
"Specifiy object types for 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");
92 subdir2->
SetGuidance(
"Select I/O manager for store");
94 cmd = vname +
"hitIO";
99 vname = name +
"set/";
103 vname +=
"writeFile/";
105 subdir4->
SetGuidance(
"Set output file names for object types");
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/";
118 subdir5->
SetGuidance(
"Set input file names for object types");
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)
158 if(command == verboseCmd)
162 else if(command == select)
164 pc->SelectSystem(newValues);
166 else if(command == regHitIO)
168 pc->AddHCIOmanager(PopWord(newValues, 1,
" "), PopWord(newValues, 2,
" "));
170 else if(command == setRdFile[0])
172 pc->SetReadFile(rdObj[0], newValues);
174 else if(command == printAll)
180 for(
G4int i = 0; i < 3; ++i)
182 if(command == storeObj[i])
185 if(newValues ==
"on")
189 else if(newValues ==
"off")
193 else if(newValues ==
"recycle")
199 G4cerr <<
"Unrecognized keyword - \"" << newValues <<
"\"." <<
G4endl;
201 pc->SetStoreMode(wrObj[i], mode);
204 else if(command == setWrFile[i])
206 pc->SetWriteFile(wrObj[i], newValues);
218 if(command == verboseCmd)
222 else if(command == select)
224 return pc->CurrentSystem();
226 else if(command == regHitIO)
228 return pc->CurrentHCIOmanager();
230 else if(command == setRdFile[0])
232 return pc->CurrentReadFile(rdObj[0]);
236 for(
G4int i = 0; i < 3; ++i)
238 if(command == storeObj[i])
240 switch(pc->CurrentStoreMode(wrObj[i]))
256 else if(command == setWrFile[i])
258 return pc->CurrentWriteFile(wrObj[i]);
270 if(text.length() <= 0)
272 std::size_t p = 0, p0 = 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);
283 if(p1 == G4String::npos)
294 return text.substr(p, p1 - p);
G4GLOB_DLL std::ostream G4cerr
void SetNewValue(G4UIcommand *command, G4String newValues)
~G4PersistencyCenterMessenger()
G4String GetCurrentValue(G4UIcommand *command)
G4PersistencyCenterMessenger(G4PersistencyCenter *p)
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)