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 SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4PersistencyCenterMessenger(G4PersistencyCenter *p)
std::string CurrentReadFile(std::string objName)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetNewValue(G4UIcommand *command, G4String newValues)
void AddHCIOmanager(std::string detName, std::string colName)
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithAString * select
std::vector< G4UIcmdWithAString * > setRdFile
std::vector< G4UIcmdWithAString * > storeObj
std::string PopWord(std::string text, int n, std::string delim)
void SelectSystem(std::string systemName)
std::vector< std::string > wrObj
StoreMode CurrentStoreMode(std::string objName)
G4UIcmdWithoutParameter * printAll
std::string CurrentHCIOmanager()
G4UIdirectory * directory
void SetRange(const char *rs)
void SetGuidance(const char *aGuidance)
G4String GetCurrentValue(G4UIcommand *command)
std::vector< G4UIcmdWithAString * > setWrFile
G4bool SetWriteFile(std::string objName, std::string writeFileName)
void SetStoreMode(std::string objName, StoreMode mode)
G4UIcmdWithAnInteger * verboseCmd
G4UIcmdWithAString * regHitIO
const std::string CurrentSystem()
void SetCandidates(const char *candidateList)
void SetDefaultValue(G4int defVal)
std::string CurrentWriteFile(std::string objName)
~G4PersistencyCenterMessenger()
G4GLOB_DLL std::ostream G4cerr
std::vector< std::string > rdObj
void SetVerboseLevel(int v)