35 :guidance(NULL),broadcastCommands(
true)
39 :guidance(NULL),broadcastCommands(
true)
48 for( i=0; i < n_treeEntry; i++ )
65 G4String remainingPath = commandPath;
67 if( remainingPath.
isNull() )
78 if( i ==
G4int(std::string::npos) )
82 for(
G4int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
84 if( remainingPath ==
command[i_thCommand]->GetCommandName() )
89 command.push_back( newCommand );
96 nextPath.
append(remainingPath(0,i+1));
98 for(
G4int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
103 tree[i_thTree]->AddNewCommand( newCommand, workerThreadOnly );
108 tree.push_back( newTree );
119 G4String remainingPath = commandPath;
121 if( remainingPath.
isNull() )
128 if( i ==
G4int(std::string::npos) )
132 for(
G4int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
134 if( remainingPath ==
command[i_thCommand]->GetCommandName() )
145 nextPath.
append(remainingPath(0,i+1));
147 for(
G4int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
151 tree[i_thTree]->RemoveCommand( aCommand );
152 G4int n_commandRemain =
tree[i_thTree]->GetCommandEntry();
154 if(n_commandRemain == 0 && n_treeRemain == 0)
172 G4String remainingPath = commandPath;
177 if( i ==
G4int(std::string::npos) )
181 for(
G4int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
183 if( remainingPath ==
command[i_thCommand]->GetCommandName() )
184 {
return command[i_thCommand]; }
191 nextPath.
append(remainingPath(0,i+1));
193 for(
G4int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
196 {
return tree[i_thTree]->FindPath( commandPath ); }
210 G4String remainingPath = commandPath;
215 if( i !=
G4int(std::string::npos) )
219 nextPath.
append(remainingPath(0,i+1));
221 for(
G4int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
224 return tree[i_thTree];
227 return tree[i_thTree]->FindCommandTree( commandPath );
239 G4String remainingPath = aCommandPath;
245 if(jpre !=
G4int(G4String::npos)) pName.
remove(jpre+1);
252 if( pName.
index( pName ) == std::string::npos )
return empty;
254 std::vector<G4String> paths;
264 for(
G4int idir=1; idir<=Ndir; idir++) {
267 if( fpdir.
index(remainingPath, 0) == 0) {
269 matchingPath = fpdir;
274 paths.push_back(fpdir);
278 if (paths.size()>=2) {
280 for(
unsigned int i_thCommand = 0; i_thCommand < paths.size(); i_thCommand++ ) {
286 std::vector<G4String> commands;
288 for(
G4int icmd=1; icmd<=Ncmd; icmd++){
292 if( fpcmd.
index(remainingPath, 0) ==0) {
294 matchingPath= fpcmd +
" ";
300 commands.push_back(fpcmd+
" ");
304 if (commands.size()>=2) {
306 for(
unsigned int i_thCommand = 0; i_thCommand < commands.size(); i_thCommand++ ) {
320 int nlen1= str1.length();
321 int nlen2= str2.length();
323 int nmin = nlen1<nlen2 ? nlen1 : nlen2;
326 for(
size_t i=0;
G4int(i)<nmin; i++){
327 if(str1[i]==str2[i]) {
328 strMatched+= str1[i];
343 for(
G4int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
345 G4cout <<
" " <<
tree[i_thTree]->GetPathName();
355 for(
G4int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
358 if(
command[i_thCommand]->IsWorkerThreadOnly())
373 for(
G4int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
376 G4cout <<
" " << i <<
") " <<
tree[i_thTree]->GetPathName()
377 <<
" " <<
tree[i_thTree]->GetTitle() <<
G4endl;
381 for(
G4int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
384 G4cout <<
" " << i <<
") " <<
command[i_thCommand]->GetCommandName()
393 for(
G4int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
398 for(
G4int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
400 tree[i_thTree]->List();
408 while((idxs=fn.
index(
"/"))!=
G4int(std::string::npos))
428 sx +=
"&";
break;
439 std::ofstream oF(ofileName, std::ios::out);
450 oF <<
"<p><hr><p>" <<
G4endl;
452 oF <<
"<h2>Sub-directories : </h2><dl>" <<
G4endl;
453 for(
size_t i_thTree = 0; i_thTree <
tree.size(); ++i_thTree )
458 tree[i_thTree]->CreateHTML();
461 oF <<
"</dl><p><hr><p>" <<
G4endl;
463 oF <<
"<h2>Commands : </h2><dl>" <<
G4endl;
464 for(
size_t i_thCommand = 0; i_thCommand <
command.size(); ++i_thCommand )
474 oF <<
"<p><dd>" <<
G4endl;
479 std::vector<G4ApplicationState>* availabelStateList = cmd->
GetStateList();
480 if(availabelStateList->size()==6)
481 { oF <<
"<p><dd>Available at all Geant4 states." <<
G4endl; }
484 oF <<
"<p><dd>Available Geant4 state(s) : ";
485 for(
size_t ias=0;ias<availabelStateList->size();++ias)
490 oF <<
"<p><dd>Parameters<table border=1>" <<
G4endl;
499 oF <<
"Omittable : ";
501 { oF <<
"current value is used as the default value." <<
G4endl; }
511 oF <<
"</table>" <<
G4endl;
516 oF <<
"</dl></body></html>" <<
G4endl;