Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -1,4 +1,3 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
@@ -26,10 +25,15 @@
|
||||
// G4UIcommandTree
|
||||
//
|
||||
// Author: Makoto Asai (SLAC), 1998
|
||||
// Midified: Makoto Asai (SLAC), 2021
|
||||
// Improve output HTML file layout and add option to sort
|
||||
// command/directory names in alphabetic order
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4UIcommandTree.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4StateManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include <fstream>
|
||||
#include "G4ios.hh"
|
||||
|
||||
@@ -73,43 +77,68 @@ void G4UIcommandTree::AddNewCommand(G4UIcommand* newCommand,
|
||||
{
|
||||
G4String commandPath = newCommand->GetCommandPath();
|
||||
G4String remainingPath = commandPath;
|
||||
remainingPath.remove(0, pathName.length());
|
||||
if(remainingPath.isNull())
|
||||
remainingPath.erase(0, pathName.length());
|
||||
if(remainingPath.empty())
|
||||
{
|
||||
if(!guidance)
|
||||
{
|
||||
guidance = newCommand;
|
||||
if(!(newCommand->ToBeBroadcasted()))
|
||||
broadcastCommands = false;
|
||||
{ broadcastCommands = false; }
|
||||
if(workerThreadOnly)
|
||||
newCommand->SetWorkerThreadOnly();
|
||||
{ newCommand->SetWorkerThreadOnly(); }
|
||||
}
|
||||
return;
|
||||
}
|
||||
G4int i = remainingPath.first('/');
|
||||
|
||||
if(guidance)
|
||||
{
|
||||
G4UIdirectory* dir = static_cast<G4UIdirectory*>(guidance);
|
||||
ifSort = dir->IfSort();
|
||||
}
|
||||
G4int i = remainingPath.find('/');
|
||||
if(i == G4int(std::string::npos))
|
||||
{
|
||||
// Find command
|
||||
// Adding a new command to this directory
|
||||
G4int n_commandEntry = command.size();
|
||||
for(G4int i_thCommand = 0; i_thCommand < n_commandEntry; ++i_thCommand)
|
||||
{
|
||||
if(remainingPath == command[i_thCommand]->GetCommandName())
|
||||
{
|
||||
// a command of same name has already defined. do nothing and return.
|
||||
if(G4UImanager::GetUIpointer()->GetVerboseLevel() > 8)
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Command <" << commandPath << "> already exist. New command is not added.";
|
||||
G4Exception("G4UIcommandTree::AddNewCommand","UI_ComTree_001",
|
||||
//FatalException,
|
||||
JustWarning,
|
||||
ed);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!broadcastCommands)
|
||||
newCommand->SetToBeBroadcasted(false);
|
||||
{ newCommand->SetToBeBroadcasted(false); }
|
||||
if(workerThreadOnly)
|
||||
newCommand->SetWorkerThreadOnly();
|
||||
command.push_back(newCommand);
|
||||
{ newCommand->SetWorkerThreadOnly(); }
|
||||
if(ifSort)
|
||||
{
|
||||
auto j = command.begin();
|
||||
for(; j != command.end(); ++j) {
|
||||
if (newCommand->GetCommandPath() < (*j)->GetCommandPath()) { break; }
|
||||
}
|
||||
command.insert(j,newCommand);
|
||||
}
|
||||
else
|
||||
{ command.push_back(newCommand); }
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Find path
|
||||
// Adding a new command to a sub-directory
|
||||
G4String nextPath = pathName;
|
||||
nextPath.append(remainingPath(0, i + 1));
|
||||
nextPath.append(remainingPath.substr(0, i + 1));
|
||||
G4int n_treeEntry = tree.size();
|
||||
for(G4int i_thTree = 0; i_thTree < n_treeEntry; ++i_thTree)
|
||||
{
|
||||
@@ -121,10 +150,23 @@ void G4UIcommandTree::AddNewCommand(G4UIcommand* newCommand,
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Creating a new sub-directory
|
||||
G4UIcommandTree* newTree = new G4UIcommandTree(nextPath);
|
||||
tree.push_back(newTree);
|
||||
if(ifSort)
|
||||
{
|
||||
auto j = tree.begin();
|
||||
for(; j != tree.end(); ++j) {
|
||||
if (newTree->GetPathName() < (*j)->GetPathName()) { break; }
|
||||
}
|
||||
tree.insert(j,newTree);
|
||||
}
|
||||
else
|
||||
{ tree.push_back(newTree); }
|
||||
if(!broadcastCommands)
|
||||
newCommand->SetToBeBroadcasted(false);
|
||||
{ newCommand->SetToBeBroadcasted(false); }
|
||||
// In case a new sub-directry is created with a new G4UIdirectory
|
||||
// (most-likely this is the case), inherit the sort flag
|
||||
newCommand->SetDefaultSortFlag(ifSort);
|
||||
newTree->AddNewCommand(newCommand, workerThreadOnly);
|
||||
return;
|
||||
}
|
||||
@@ -138,14 +180,14 @@ void G4UIcommandTree::RemoveCommand(G4UIcommand* aCommand,
|
||||
return;
|
||||
G4String commandPath = aCommand->GetCommandPath();
|
||||
G4String remainingPath = commandPath;
|
||||
remainingPath.remove(0, pathName.length());
|
||||
if(remainingPath.isNull())
|
||||
remainingPath.erase(0, pathName.length());
|
||||
if(remainingPath.empty())
|
||||
{
|
||||
guidance = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4int i = remainingPath.first('/');
|
||||
G4int i = remainingPath.find('/');
|
||||
if(i == G4int(std::string::npos))
|
||||
{
|
||||
// Find command
|
||||
@@ -163,7 +205,7 @@ void G4UIcommandTree::RemoveCommand(G4UIcommand* aCommand,
|
||||
{
|
||||
// Find path
|
||||
G4String nextPath = pathName;
|
||||
nextPath.append(remainingPath(0, i + 1));
|
||||
nextPath.append(remainingPath.substr(0, i + 1));
|
||||
G4int n_treeEntry = tree.size();
|
||||
for(G4int i_thTree = 0; i_thTree < n_treeEntry; ++i_thTree)
|
||||
{
|
||||
@@ -191,12 +233,12 @@ G4UIcommand* G4UIcommandTree::FindPath(const char* commandPath) const
|
||||
// This function tries to match a command name
|
||||
|
||||
G4String remainingPath = commandPath;
|
||||
if(remainingPath.index(pathName) == std::string::npos)
|
||||
if(remainingPath.find(pathName) == std::string::npos)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
remainingPath.remove(0, pathName.length());
|
||||
G4int i = remainingPath.first('/');
|
||||
remainingPath.erase(0, pathName.length());
|
||||
G4int i = remainingPath.find('/');
|
||||
if(i == G4int(std::string::npos))
|
||||
{
|
||||
// Find command
|
||||
@@ -213,7 +255,7 @@ G4UIcommand* G4UIcommandTree::FindPath(const char* commandPath) const
|
||||
{
|
||||
// Find path
|
||||
G4String nextPath = pathName;
|
||||
nextPath.append(remainingPath(0, i + 1));
|
||||
nextPath.append(remainingPath.substr(0, i + 1));
|
||||
G4int n_treeEntry = tree.size();
|
||||
for(G4int i_thTree = 0; i_thTree < n_treeEntry; ++i_thTree)
|
||||
{
|
||||
@@ -234,17 +276,17 @@ G4UIcommandTree* G4UIcommandTree::FindCommandTree(const char* commandPath)
|
||||
// @return the commandTree found or nullptr if not
|
||||
|
||||
G4String remainingPath = commandPath;
|
||||
if(remainingPath.index(pathName) == std::string::npos)
|
||||
if(remainingPath.find(pathName) == std::string::npos)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
remainingPath.remove(0, pathName.length());
|
||||
G4int i = remainingPath.first('/');
|
||||
remainingPath.erase(0, pathName.length());
|
||||
G4int i = remainingPath.find('/');
|
||||
if(i != G4int(std::string::npos))
|
||||
{
|
||||
// Find path
|
||||
G4String nextPath = pathName;
|
||||
nextPath.append(remainingPath(0, i + 1));
|
||||
nextPath.append(remainingPath.substr(0, i + 1));
|
||||
G4int n_treeEntry = tree.size();
|
||||
for(G4int i_thTree = 0; i_thTree < n_treeEntry; ++i_thTree)
|
||||
{
|
||||
@@ -274,9 +316,9 @@ G4String G4UIcommandTree::CompleteCommandPath(const G4String& aCommandPath)
|
||||
G4String matchingPath = empty;
|
||||
|
||||
// find the tree
|
||||
G4int jpre = pName.last('/');
|
||||
if(jpre != G4int(G4String::npos))
|
||||
pName.remove(jpre + 1);
|
||||
auto jpre = pName.rfind('/');
|
||||
if(jpre != G4String::npos)
|
||||
pName.erase(jpre + 1);
|
||||
G4UIcommandTree* aTree = FindCommandTree(pName);
|
||||
|
||||
if(!aTree)
|
||||
@@ -284,7 +326,7 @@ G4String G4UIcommandTree::CompleteCommandPath(const G4String& aCommandPath)
|
||||
return empty;
|
||||
}
|
||||
|
||||
if(pName.index(pName) == std::string::npos)
|
||||
if(pName.find(pName) == std::string::npos)
|
||||
return empty;
|
||||
|
||||
std::vector<G4String> paths;
|
||||
@@ -301,7 +343,7 @@ G4String G4UIcommandTree::CompleteCommandPath(const G4String& aCommandPath)
|
||||
{
|
||||
G4String fpdir = aTree->GetTree(idir)->GetPathName();
|
||||
// matching test
|
||||
if(fpdir.index(remainingPath, 0) == 0)
|
||||
if(fpdir.find(remainingPath, 0) == 0)
|
||||
{
|
||||
if(nMatch == 0)
|
||||
{
|
||||
@@ -333,7 +375,7 @@ G4String G4UIcommandTree::CompleteCommandPath(const G4String& aCommandPath)
|
||||
G4String fpcmd =
|
||||
aTree->GetPathName() + aTree->GetCommand(icmd)->GetCommandName();
|
||||
// matching test
|
||||
if(fpcmd.index(remainingPath, 0) == 0)
|
||||
if(fpcmd.find(remainingPath, 0) == 0)
|
||||
{
|
||||
if(nMatch == 0)
|
||||
{
|
||||
@@ -472,9 +514,9 @@ G4String G4UIcommandTree::CreateFileName(const char* pName)
|
||||
{
|
||||
G4String fn = pName;
|
||||
G4int idxs;
|
||||
while((idxs = fn.index("/")) != G4int(std::string::npos))
|
||||
while((idxs = fn.find("/")) != G4int(std::string::npos))
|
||||
{
|
||||
fn(idxs) = '_';
|
||||
fn[idxs] = '_';
|
||||
}
|
||||
fn += ".html";
|
||||
return fn;
|
||||
@@ -487,7 +529,7 @@ G4String G4UIcommandTree::ModStr(const char* strS)
|
||||
G4String str = strS;
|
||||
for(G4int i = 0; i < G4int(str.length()); ++i)
|
||||
{
|
||||
char c = str(i);
|
||||
char c = str[i];
|
||||
switch(c)
|
||||
{
|
||||
case '<':
|
||||
@@ -507,15 +549,91 @@ G4String G4UIcommandTree::ModStr(const char* strS)
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
void G4UIcommandTree::CreateHTML()
|
||||
void G4UIcommandTree::CreateHTML(G4String sideBar)
|
||||
{
|
||||
G4String ofileName = CreateFileName(pathName);
|
||||
std::ofstream oF(ofileName, std::ios::out);
|
||||
|
||||
oF << "<html><head><title>Commands in " << ModStr(pathName)
|
||||
<< "</title></head>" << G4endl;
|
||||
oF << "<body bgcolor=\"#ffffff\"><h2>" << ModStr(pathName) << "</h2><p>"
|
||||
<< G4endl;
|
||||
oF << "<style> \
|
||||
table,table td,table th { \
|
||||
border:1px solid #eee \
|
||||
} \
|
||||
table td,table th { \
|
||||
padding:5px 20px; \
|
||||
line-height:1.3; \
|
||||
text-align:inherit \
|
||||
} \
|
||||
a { \
|
||||
color:#17a81a; \
|
||||
text-decoration:none; \
|
||||
transition-duration:0.3s \
|
||||
} \
|
||||
a:hover { \
|
||||
color:#17a81a \
|
||||
} \
|
||||
table { \
|
||||
border-collapse:collapse; \
|
||||
border-spacing:0; \
|
||||
margin-bottom:5px; \
|
||||
} \
|
||||
h1 { \
|
||||
font-size:2.25em; \
|
||||
font-weight:300; \
|
||||
letter-spacing:-1px; \
|
||||
line-height:1.15em; \
|
||||
margin-bottom:0.5em; \
|
||||
word-wrap:break-word \
|
||||
} \
|
||||
h2 { \
|
||||
font-size:1.5em; \
|
||||
font-weight:300; \
|
||||
letter-spacing:-1px; \
|
||||
line-height:1.15em; \
|
||||
margin-bottom:0.5em; \
|
||||
word-wrap:break-word \
|
||||
} \
|
||||
h3 { \
|
||||
color:#26282a; \
|
||||
font-weight:300; \
|
||||
font-size:1.3em; \
|
||||
padding:15px 0 15px 0; \
|
||||
border-bottom:2px #eee solid; \
|
||||
word-wrap:break-word \
|
||||
} \
|
||||
.sidebar { \
|
||||
display:block; \
|
||||
position:relative; \
|
||||
position:sticky; \
|
||||
float:left; \
|
||||
-webkit-box-sizing:border-box; \
|
||||
-moz-box-sizing:border-box; \
|
||||
-ms-box-sizing:border-box; \
|
||||
box-sizing:border-box; \
|
||||
width:20%; \
|
||||
padding-right:20px \
|
||||
} \
|
||||
.context { \
|
||||
width:80%; \
|
||||
display:inline-block; \
|
||||
background-color:#fff; \
|
||||
padding: 25px 35px 20px 30px; \
|
||||
-webkit-box-sizing:border-box; \
|
||||
-moz-box-sizing:border-box; \
|
||||
-ms-box-sizing:border-box; \
|
||||
box-sizing:border-box \
|
||||
} \
|
||||
</style>"<< G4endl;
|
||||
oF << "<body bgcolor=\"#ffffff\">" << G4endl;
|
||||
|
||||
// Left Panel
|
||||
if (createHTMLTreeLevel == 0 ) {
|
||||
oF << "<div class=\"sidebar\">" << sideBar << "</div>" << G4endl;
|
||||
}
|
||||
// Right Panel
|
||||
oF << "<div class=\"context\">";
|
||||
oF << "<h1>" << ModStr(pathName) << "</h1>" << G4endl;
|
||||
|
||||
if(guidance != nullptr)
|
||||
{
|
||||
@@ -524,100 +642,127 @@ void G4UIcommandTree::CreateHTML()
|
||||
oF << ModStr(guidance->GetGuidanceLine(i)) << "<br>" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
oF << "<p><hr><p>" << G4endl;
|
||||
|
||||
oF << "<h2>Sub-directories : </h2><dl>" << G4endl;
|
||||
for(std::size_t i_thTree = 0; i_thTree < tree.size(); ++i_thTree)
|
||||
{
|
||||
oF << "<p><br><p><dt><a href=\""
|
||||
<< CreateFileName(tree[i_thTree]->GetPathName()) << "\">"
|
||||
<< ModStr(tree[i_thTree]->GetPathName()) << "</a>" << G4endl;
|
||||
oF << "<p><dd>" << ModStr(tree[i_thTree]->GetTitle()) << G4endl;
|
||||
tree[i_thTree]->CreateHTML();
|
||||
if (tree.size() >0 ){
|
||||
G4String menu = "";
|
||||
G4String newSideBar = "";
|
||||
menu += "<h2>Sub-directories </h2><table>";
|
||||
newSideBar += "<h2><a href=\"" + ofileName + "\">Top level </a></h2><table>";
|
||||
// Build menu short version
|
||||
for(std::size_t i_thTree = 0; i_thTree < tree.size(); ++i_thTree)
|
||||
{
|
||||
newSideBar += "<tr><td><a href=\""
|
||||
+ CreateFileName(tree[i_thTree]->GetPathName()) + "\">"
|
||||
+ ModStr(tree[i_thTree]->GetPathName()) + "</a>";
|
||||
}
|
||||
// Build menu
|
||||
for(std::size_t i_thTree = 0; i_thTree < tree.size(); ++i_thTree)
|
||||
{
|
||||
menu += "<tr><td><a href=\""
|
||||
+ CreateFileName(tree[i_thTree]->GetPathName()) + "\">"
|
||||
+ ModStr(tree[i_thTree]->GetPathName()) + "</a>";
|
||||
menu += "</td><td>" + ModStr(tree[i_thTree]->GetTitle()) + "</tr>";
|
||||
}
|
||||
menu += "</table>";
|
||||
newSideBar += "</table>";
|
||||
for(std::size_t i_thTree = 0; i_thTree < tree.size(); ++i_thTree)
|
||||
{
|
||||
createHTMLTreeLevel ++;
|
||||
tree[i_thTree]->CreateHTML(newSideBar);
|
||||
createHTMLTreeLevel --;
|
||||
}
|
||||
oF << menu << G4endl;
|
||||
}
|
||||
|
||||
oF << "</dl><p><hr><p>" << G4endl;
|
||||
|
||||
oF << "<h2>Commands : </h2><dl>" << G4endl;
|
||||
for(std::size_t i_thCommand = 0; i_thCommand < command.size(); ++i_thCommand)
|
||||
{
|
||||
G4UIcommand* cmd = command[i_thCommand];
|
||||
oF << "<p><br><p><dt><b>" << ModStr(cmd->GetCommandName());
|
||||
if(cmd->GetParameterEntries() > 0)
|
||||
if (command.size() >0 ){
|
||||
oF << "<h2>Commands </h2>" << G4endl;
|
||||
|
||||
// resume
|
||||
oF << "<table>" << G4endl;
|
||||
for(std::size_t i_thCommand = 0; i_thCommand < command.size(); ++i_thCommand)
|
||||
{
|
||||
for(std::size_t i_thParam = 0; i_thParam < cmd->GetParameterEntries();
|
||||
++i_thParam)
|
||||
G4UIcommand* cmd = command[i_thCommand];
|
||||
oF << "<tr><td><a href=\"#c"<< i_thCommand << "\">"<< ModStr(cmd->GetCommandName());
|
||||
oF << "</a></td></tr>" << G4endl;
|
||||
}
|
||||
oF << "</table>" << G4endl;
|
||||
for(std::size_t i_thCommand = 0; i_thCommand < command.size(); ++i_thCommand)
|
||||
{
|
||||
G4UIcommand* cmd = command[i_thCommand];
|
||||
oF << "<h3 id=\"c" << i_thCommand << "\">" << ModStr(cmd->GetCommandName());
|
||||
if(cmd->GetParameterEntries() > 0)
|
||||
{
|
||||
oF << " [<i>"
|
||||
<< ModStr(cmd->GetParameter(i_thParam)->GetParameterName())
|
||||
<< "</i>]";
|
||||
}
|
||||
}
|
||||
oF << "</b>" << G4endl;
|
||||
oF << "<p><dd>" << G4endl;
|
||||
for(std::size_t i = 0; i < cmd->GetGuidanceEntries(); ++i)
|
||||
{
|
||||
oF << ModStr(cmd->GetGuidanceLine(i)) << "<br>" << G4endl;
|
||||
}
|
||||
if(!(cmd->GetRange()).isNull())
|
||||
{
|
||||
oF << "<p><dd>Range : " << ModStr(cmd->GetRange()) << G4endl;
|
||||
}
|
||||
std::vector<G4ApplicationState>* availabelStateList = cmd->GetStateList();
|
||||
if(availabelStateList->size() == 6)
|
||||
{
|
||||
oF << "<p><dd>Available at all Geant4 states." << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
oF << "<p><dd>Available Geant4 state(s) : ";
|
||||
for(std::size_t ias = 0; ias < availabelStateList->size(); ++ias)
|
||||
{
|
||||
oF << G4StateManager::GetStateManager()->GetStateString(
|
||||
(*availabelStateList)[ias])
|
||||
<< " " << G4endl;
|
||||
}
|
||||
}
|
||||
if(cmd->GetParameterEntries() > 0)
|
||||
{
|
||||
oF << "<p><dd>Parameters<table border=1>" << G4endl;
|
||||
for(std::size_t i_thParam = 0; i_thParam < cmd->GetParameterEntries();
|
||||
++i_thParam)
|
||||
{
|
||||
G4UIparameter* prm = cmd->GetParameter(i_thParam);
|
||||
oF << "<tr><td>" << ModStr(prm->GetParameterName()) << G4endl;
|
||||
oF << "<td>type " << prm->GetParameterType() << G4endl;
|
||||
oF << "<td>";
|
||||
if(prm->IsOmittable())
|
||||
for(std::size_t i_thParam = 0; i_thParam < cmd->GetParameterEntries();
|
||||
++i_thParam)
|
||||
{
|
||||
oF << "Omittable : ";
|
||||
if(prm->GetCurrentAsDefault())
|
||||
oF << " [<i>"
|
||||
<< ModStr(cmd->GetParameter(i_thParam)->GetParameterName())
|
||||
<< "</i>]";
|
||||
}
|
||||
}
|
||||
oF << "</h3>" << G4endl;
|
||||
oF << "<p>" << G4endl;
|
||||
for(std::size_t i = 0; i < cmd->GetGuidanceEntries(); ++i)
|
||||
{
|
||||
oF << ModStr(cmd->GetGuidanceLine(i)) << "<br>" << G4endl;
|
||||
}
|
||||
if(!(cmd->GetRange()).empty())
|
||||
{
|
||||
oF << "<p>Range : " << ModStr(cmd->GetRange()) << G4endl;
|
||||
}
|
||||
std::vector<G4ApplicationState>* availabelStateList = cmd->GetStateList();
|
||||
if(availabelStateList->size() == 6)
|
||||
{
|
||||
oF << "<p>Available at all Geant4 states." << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
oF << "<p>Available Geant4 state(s) : ";
|
||||
for(std::size_t ias = 0; ias < availabelStateList->size(); ++ias)
|
||||
{
|
||||
oF << G4StateManager::GetStateManager()->GetStateString(
|
||||
(*availabelStateList)[ias])
|
||||
<< " " << G4endl;
|
||||
}
|
||||
}
|
||||
if(cmd->GetParameterEntries() > 0)
|
||||
{
|
||||
oF << "<p>Parameters<table border=1>" << G4endl;
|
||||
for(std::size_t i_thParam = 0; i_thParam < cmd->GetParameterEntries();
|
||||
++i_thParam)
|
||||
{
|
||||
G4UIparameter* prm = cmd->GetParameter(i_thParam);
|
||||
oF << "<tr><td>" << ModStr(prm->GetParameterName()) << G4endl;
|
||||
oF << "<td>type " << prm->GetParameterType() << G4endl;
|
||||
oF << "<td>";
|
||||
if(prm->IsOmittable())
|
||||
{
|
||||
oF << "current value is used as the default value." << G4endl;
|
||||
oF << "Omittable : ";
|
||||
if(prm->GetCurrentAsDefault())
|
||||
{
|
||||
oF << "current value is used as the default value." << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
oF << "default value = " << prm->GetDefaultValue() << G4endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
oF << "<td>";
|
||||
if(!(prm->GetParameterRange()).empty())
|
||||
{
|
||||
oF << "default value = " << prm->GetDefaultValue() << G4endl;
|
||||
oF << "Parameter range : " << ModStr(prm->GetParameterRange())
|
||||
<< G4endl;
|
||||
}
|
||||
else if(!(prm->GetParameterCandidates()).empty())
|
||||
{
|
||||
oF << "Parameter candidates : "
|
||||
<< ModStr(prm->GetParameterCandidates()) << G4endl;
|
||||
}
|
||||
}
|
||||
oF << "<td>";
|
||||
if(!(prm->GetParameterRange()).isNull())
|
||||
{
|
||||
oF << "Parameter range : " << ModStr(prm->GetParameterRange())
|
||||
<< G4endl;
|
||||
}
|
||||
else if(!(prm->GetParameterCandidates()).isNull())
|
||||
{
|
||||
oF << "Parameter candidates : "
|
||||
<< ModStr(prm->GetParameterCandidates()) << G4endl;
|
||||
}
|
||||
oF << "</table>" << G4endl;
|
||||
}
|
||||
oF << "</table>" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
oF << "</dl></body></html>" << G4endl;
|
||||
oF << "</div></body></html>" << G4endl;
|
||||
oF.close();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user