Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: G4GraphicsSystemList.cc,v 1.3 2001/07/11 10:09:18 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
#include "G4GraphicsSystemList.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Scene.cc,v 1.11 2001/08/24 20:47:41 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4Scene.cc,v 1.13 2003/06/16 17:14:15 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Scene data John Allison 19th July 1996.
@@ -122,12 +122,14 @@ G4bool G4Scene::AddEndOfEventModel (G4VModel* pModel, G4bool warn) {
fEndOfEventModelList [i] -> GetGlobalDescription ()) break;
}
if (i < nModels) {
delete fEndOfEventModelList[i];
fEndOfEventModelList[i] = pModel;
if (warn) {
G4cout << "G4Scene::AddEndOfEventModel: model \""
G4cout << "G4Scene::AddEndOfEventModel: a model \""
<< pModel -> GetGlobalDescription ()
<< "\"\n is already in the run-duration list of scene \""
<< fName
<< "\"."
<< fName <<
"\".\n The old model has been deleted; this new model replaces it."
<< G4endl;
}
return false;
@@ -146,7 +148,7 @@ void G4Scene::Clear () {
}
}
G4std::ostream& operator << (G4std::ostream& os, const G4Scene& s) {
std::ostream& operator << (std::ostream& os, const G4Scene& s) {
size_t i;
@@ -22,7 +22,7 @@
//
//
// $Id: G4SceneHandlerList.cc,v 1.3 2001/07/11 10:09:18 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
#include "G4SceneHandlerList.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: G4SceneList.cc,v 1.5 2001/07/11 10:09:18 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
#include "G4SceneList.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VGraphicsSystem.cc,v 1.9 2001/08/05 02:29:09 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VGraphicsSystem.cc,v 1.10 2003/06/16 17:14:16 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// John Allison 27th March 1996
@@ -58,7 +58,7 @@ G4VGraphicsSystem::G4VGraphicsSystem (const G4String& name,
fDescription (description),
fFunctionality (f) {}
G4std::ostream& operator << (G4std::ostream& os, const G4VGraphicsSystem& gs) {
std::ostream& operator << (std::ostream& os, const G4VGraphicsSystem& gs) {
G4VisManager* pVMan = G4VisManager::GetInstance ();
const G4SceneHandlerList& scenes = pVMan -> GetAvailableSceneHandlers ();
os << "Graphics System: " << gs.GetName ();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VSceneHandler.cc,v 1.25 2002/11/11 18:37:13 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VSceneHandler.cc,v 1.27 2003/06/16 17:14:17 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// John Allison 19th July 1996
@@ -31,7 +31,7 @@
#include "G4VSceneHandler.hh"
#include "G4ios.hh"
#include "g4std/strstream"
#include <strstream>
#include "G4VisManager.hh"
#include "G4VGraphicsSystem.hh"
@@ -88,8 +88,8 @@ G4VSceneHandler::G4VSceneHandler (G4VGraphicsSystem& system, G4int id, const G4S
fpScene = pVMan -> GetCurrentScene ();
if (name == "") {
char charname [50];
G4std::ostrstream ost (charname, 50);
ost << fSystem.GetName () << '-' << fSceneHandlerId << G4std::ends;
std::ostrstream ost (charname, 50);
ost << fSystem.GetName () << '-' << fSceneHandlerId << std::ends;
fName = charname;
}
else {
@@ -427,7 +427,7 @@ void G4VSceneHandler::RequestPrimitives (const G4VSolid& solid) {
EndPrimitives ();
}
void G4VSceneHandler::ProcessScene (G4VViewer& view) {
void G4VSceneHandler::ProcessScene (G4VViewer&) {
fReadyForTransients = false;
@@ -436,7 +436,7 @@ void G4VSceneHandler::ProcessScene (G4VViewer& view) {
// Traverse geometry tree and send drawing primitives to window(s).
const G4std::vector<G4VModel*>& runDurationModelList =
const std::vector<G4VModel*>& runDurationModelList =
fpScene -> GetRunDurationModelList ();
if (runDurationModelList.size ()) {
@@ -622,7 +622,7 @@ G4double G4VSceneHandler::GetMarkerSize (const G4VMarker& marker,
return size;
}
G4std::ostream& operator << (G4std::ostream& os, const G4VSceneHandler& s) {
std::ostream& operator << (std::ostream& os, const G4VSceneHandler& s) {
os << "Scene handler " << s.fName << " has "
<< s.fViewerList.size () << " viewer(s):";
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VViewer.cc,v 1.16 2001/08/14 18:34:47 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VViewer.cc,v 1.17 2003/06/16 17:14:18 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// John Allison 27th March 1996
@@ -31,7 +31,7 @@
#include "G4VViewer.hh"
#include "G4ios.hh"
#include "g4std/strstream"
#include <strstream>
#include "G4VisManager.hh"
#include "G4VGraphicsSystem.hh"
@@ -49,8 +49,8 @@ fNeedKernelVisit (true)
{
if (name == "") {
char charname [50];
G4std::ostrstream ost (charname, 50);
ost << fSceneHandler.GetName () << '-' << fViewId << G4std::ends;
std::ostrstream ost (charname, 50);
ost << fSceneHandler.GetName () << '-' << fViewId << std::ends;
fName = charname;
}
else {
@@ -134,7 +134,7 @@ void G4VViewer::SetViewParameters (const G4ViewParameters& vp) {
fModified = true;
}
G4std::ostream& operator << (G4std::ostream& os, const G4VViewer& v) {
std::ostream& operator << (std::ostream& os, const G4VViewer& v) {
os << "View " << v.fName << ":\n";
os << v.fVP;
return os;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VVisCommand.cc,v 1.11 2002/11/27 12:32:31 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VVisCommand.cc,v 1.12 2003/06/16 17:14:19 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// Base class for visualization commands - John Allison 9th August 1998
// It is really a messenger - we have one command per messenger.
@@ -31,17 +31,17 @@
#include "G4UImanager.hh"
#include "G4UnitsTable.hh"
#include "g4std/strstream"
#include <strstream>
G4VVisCommand::~G4VVisCommand () {}
G4VisManager* G4VVisCommand::fpVisManager = 0;
G4std::vector <G4UIcommand*> G4VVisCommand::sceneNameCommands;
std::vector <G4UIcommand*> G4VVisCommand::sceneNameCommands;
G4std::vector <G4UIcommand*> G4VVisCommand::sceneHandlerNameCommands;
std::vector <G4UIcommand*> G4VVisCommand::sceneHandlerNameCommands;
G4std::vector <G4UIcommand*> G4VVisCommand::viewerNameCommands;
std::vector <G4UIcommand*> G4VVisCommand::viewerNameCommands;
G4double G4VVisCommand::ValueOf(G4String unitName) {
return G4UnitDefinition::GetValueOf(unitName);
@@ -60,8 +60,8 @@ G4String G4VVisCommand::ConvertToString
G4double uv = ValueOf(unitName);
char st[50];
G4std::ostrstream os(st,50);
os << x/uv << " " << y/uv << " " << unitName << G4std::ends;
std::ostrstream os(st,50);
os << x/uv << " " << y/uv << " " << unitName << std::ends;
G4String vl = st;
return vl;
}
@@ -69,8 +69,8 @@ G4String G4VVisCommand::ConvertToString
G4String G4VVisCommand::ConvertToString(const G4ThreeVector& vec)
{
char st[100];
G4std::ostrstream os(st,100);
os << vec.x() << " " << vec.y() << " " << vec.z() << G4std::ends;
std::ostrstream os(st,100);
os << vec.x() << " " << vec.y() << " " << vec.z() << std::ends;
G4String vl = st;
return vl;
}
@@ -89,7 +89,7 @@ G4int G4VVisCommand::GetNewIntValue(const G4String& paramString)
{
G4int vl;
const char* t = paramString;
G4std::istrstream is((char*)t);
std::istrstream is((char*)t);
is >> vl;
return vl;
}
@@ -100,7 +100,7 @@ G4ThreeVector G4VVisCommand::GetNew3VectorValue(const G4String& paramString)
G4double vy;
G4double vz;
const char* t = paramString;
G4std::istrstream is((char*)t);
std::istrstream is((char*)t);
is >> vx >> vy >> vz;
return G4ThreeVector(vx,vy,vz);
}
@@ -113,7 +113,7 @@ void G4VVisCommand::GetNewDoublePairValue(const G4String& paramString,
char unts[30];
const char* t = paramString;
G4std::istrstream is((char*)t);
std::istrstream is((char*)t);
is >> x >> y >> unts;
G4String unt = unts;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ViewParameters.cc,v 1.14 2001/08/05 02:29:12 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4ViewParameters.cc,v 1.15 2003/06/16 17:14:20 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// John Allison 19th July 1996
@@ -272,7 +272,7 @@ void G4ViewParameters::PrintDifferences (const G4ViewParameters& v) const {
}
}
G4std::ostream& operator << (G4std::ostream& os,
std::ostream& operator << (std::ostream& os,
const G4ViewParameters::DrawingStyle& style) {
switch (style) {
case G4ViewParameters::wireframe:
@@ -288,7 +288,7 @@ G4std::ostream& operator << (G4std::ostream& os,
return os;
}
G4std::ostream& operator << (G4std::ostream& os, const G4ViewParameters& v) {
std::ostream& operator << (std::ostream& os, const G4ViewParameters& v) {
os << "View parameters and options:";
os << "\n Drawing style: " << v.fDrawingStyle;
@@ -22,7 +22,7 @@
//
//
// $Id: G4ViewerList.cc,v 1.3 2001/07/11 10:09:18 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
#include "G4ViewerList.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommands.cc,v 1.6 2001/09/10 10:54:30 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VisCommands.cc,v 1.7 2003/05/30 13:01:28 johna Exp $
// GEANT4 tag $Name: geant4-05-02 $
// /vis/ top level commands - John Allison 5th February 2001
@@ -53,7 +53,7 @@ G4VisCommandEnable::~G4VisCommandEnable () {
delete fpCommand1;
}
G4String G4VisCommandEnable::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandEnable::GetCurrentValue (G4UIcommand*) {
return G4String();
}
@@ -83,11 +83,11 @@ G4VisCommandVerbose::~G4VisCommandVerbose () {
delete fpCommand;
}
G4String G4VisCommandVerbose::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandVerbose::GetCurrentValue (G4UIcommand*) {
return G4String();
}
void G4VisCommandVerbose::SetNewValue (G4UIcommand* command,
void G4VisCommandVerbose::SetNewValue (G4UIcommand*,
G4String newValue) {
G4VisManager::Verbosity verbosity =
fpVisManager->GetVerbosityValue(newValue);
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsCompound.cc,v 1.23 2002/10/24 15:12:26 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VisCommandsCompound.cc,v 1.25 2003/06/16 17:14:21 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// Compound /vis/ commands - John Allison 15th May 2000
@@ -56,12 +56,11 @@ G4VisCommandDrawTree::~G4VisCommandDrawTree() {
delete fpCommand;
}
void G4VisCommandDrawTree::SetNewValue
(G4UIcommand* command, G4String newValue) {
void G4VisCommandDrawTree::SetNewValue(G4UIcommand*, G4String newValue) {
G4String pvname, system;
const char* t = newValue;
G4std::istrstream is((char*)t);
std::istrstream is((char*)t);
is >> pvname >> system;
G4UImanager* UImanager = G4UImanager::GetUIpointer();
@@ -117,8 +116,7 @@ G4VisCommandDrawView::~G4VisCommandDrawView() {
delete fpCommand;
}
void G4VisCommandDrawView::SetNewValue
(G4UIcommand* command, G4String newValue) {
void G4VisCommandDrawView::SetNewValue(G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -141,7 +139,7 @@ void G4VisCommandDrawView::SetNewValue
G4String dolly;
G4String dollyUnit;
const char* t = newValue;
G4std::istrstream is((char*)t);
std::istrstream is((char*)t);
is >> thetaDeg >> phiDeg >> panRight >> panUp >> panUnit
>> zoomFactor >> dolly >> dollyUnit;
@@ -189,8 +187,7 @@ G4VisCommandDrawVolume::~G4VisCommandDrawVolume() {
delete fpCommand;
}
void G4VisCommandDrawVolume::SetNewValue
(G4UIcommand* command, G4String newValue) {
void G4VisCommandDrawVolume::SetNewValue(G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4UImanager* UImanager = G4UImanager::GetUIpointer();
G4int keepVerbose = UImanager->GetVerboseLevel();
@@ -249,10 +246,10 @@ G4VisCommandOpen::~G4VisCommandOpen() {
delete fpCommand;
}
void G4VisCommandOpen::SetNewValue (G4UIcommand* command, G4String newValue) {
void G4VisCommandOpen::SetNewValue (G4UIcommand*, G4String newValue) {
G4String systemName, windowSizeHint;
const char* t = newValue;
G4std::istrstream is((char*)t);
std::istrstream is((char*)t);
is >> systemName >> windowSizeHint;
G4UImanager* UImanager = G4UImanager::GetUIpointer();
G4int keepVerbose = UImanager->GetVerboseLevel();
@@ -284,8 +281,7 @@ G4VisCommandSpecify::~G4VisCommandSpecify() {
delete fpCommand;
}
void G4VisCommandSpecify::SetNewValue
(G4UIcommand* command, G4String newValue) {
void G4VisCommandSpecify::SetNewValue(G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4UImanager* UImanager = G4UImanager::GetUIpointer();
G4int keepVerbose = UImanager->GetVerboseLevel();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsScene.cc,v 1.30 2001/11/12 18:22:11 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VisCommandsScene.cc,v 1.32 2003/06/16 17:14:22 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// /vis/scene commands - John Allison 9th August 1998
@@ -36,7 +36,7 @@
#include "G4UIcommand.hh"
#include "G4UIcmdWithAString.hh"
#include "G4ios.hh"
#include "g4std/strstream"
#include <strstream>
G4VVisCommandScene::G4VVisCommandScene () {}
@@ -85,17 +85,16 @@ G4VisCommandSceneCreate::~G4VisCommandSceneCreate () {
G4String G4VisCommandSceneCreate::NextName () {
char nextName [20];
G4std::ostrstream ost (nextName, 20);
ost << "scene-" << fId << G4std::ends;
std::ostrstream ost (nextName, 20);
ost << "scene-" << fId << std::ends;
return nextName;
}
G4String G4VisCommandSceneCreate::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneCreate::GetCurrentValue (G4UIcommand*) {
return NextName ();
}
void G4VisCommandSceneCreate::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneCreate::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -150,17 +149,16 @@ G4VisCommandSceneEdit::~G4VisCommandSceneEdit () {
delete fpCommand;
}
G4String G4VisCommandSceneEdit::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneEdit::GetCurrentValue (G4UIcommand*) {
return CurrentSceneName ();
}
void G4VisCommandSceneEdit::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneEdit::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4String sceneName;
G4std::istrstream is ((char*)newValue.data());
std::istrstream is ((char*)newValue.data());
is >> sceneName;
G4SceneList& sceneList = fpVisManager -> SetSceneList ();
@@ -215,18 +213,17 @@ G4VisCommandSceneEndOfEventAction::~G4VisCommandSceneEndOfEventAction () {
delete fpCommand;
}
G4String G4VisCommandSceneEndOfEventAction::GetCurrentValue
(G4UIcommand* command) {
G4String G4VisCommandSceneEndOfEventAction::GetCurrentValue(G4UIcommand*) {
return "";
}
void G4VisCommandSceneEndOfEventAction::SetNewValue (G4UIcommand* command,
void G4VisCommandSceneEndOfEventAction::SetNewValue (G4UIcommand*,
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4String action;
G4std::istrstream is ((char*)newValue.data());
std::istrstream is ((char*)newValue.data());
is >> action;
G4Scene* pScene = fpVisManager->GetCurrentScene();
@@ -288,14 +285,13 @@ G4VisCommandSceneList::~G4VisCommandSceneList () {
delete fpCommand;
}
G4String G4VisCommandSceneList::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneList::GetCurrentValue (G4UIcommand*) {
return "";
}
void G4VisCommandSceneList::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneList::SetNewValue (G4UIcommand*, G4String newValue) {
G4String name, verbosityString;
G4std::istrstream is ((char*)newValue.data());
std::istrstream is ((char*)newValue.data());
is >> name >> verbosityString;
G4VisManager::Verbosity verbosity =
fpVisManager->GetVerbosityValue(verbosityString);
@@ -381,18 +377,17 @@ G4VisCommandSceneNotifyHandlers::~G4VisCommandSceneNotifyHandlers () {
delete fpCommand;
}
G4String G4VisCommandSceneNotifyHandlers::GetCurrentValue
(G4UIcommand* command) {
G4String G4VisCommandSceneNotifyHandlers::GetCurrentValue(G4UIcommand*) {
return CurrentSceneName ();
}
void G4VisCommandSceneNotifyHandlers::SetNewValue (G4UIcommand* command,
void G4VisCommandSceneNotifyHandlers::SetNewValue (G4UIcommand*,
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4String sceneName, refresh_flush;
G4std::istrstream is ((char*)newValue.data());
std::istrstream is ((char*)newValue.data());
is >> sceneName >> refresh_flush;
G4bool flush(false);
if (refresh_flush(0) == 'f') flush = true;
@@ -489,12 +484,11 @@ G4VisCommandSceneRemove::~G4VisCommandSceneRemove () {
delete fpCommand;
}
G4String G4VisCommandSceneRemove::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneRemove::GetCurrentValue (G4UIcommand*) {
return CurrentSceneName ();
}
void G4VisCommandSceneRemove::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneRemove::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -564,12 +558,11 @@ G4VisCommandSceneSelect::~G4VisCommandSceneSelect () {
delete fpCommand;
}
G4String G4VisCommandSceneSelect::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneSelect::GetCurrentValue (G4UIcommand*) {
return CurrentSceneName ();
}
void G4VisCommandSceneSelect::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneSelect::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -21,9 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsSceneAdd.cc,v 1.34 2002/12/11 16:10:06 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VisCommandsSceneAdd.cc,v 1.38 2003/06/16 17:14:23 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// /vis/scene commands - John Allison 9th August 1998
#include "G4VisCommandsSceneAdd.hh"
@@ -50,7 +49,7 @@
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithoutParameter.hh"
#include "G4ios.hh"
#include "g4std/strstream"
#include <strstream>
// Local function with some frequently used error printing...
static void G4VisCommandsSceneAddUnsuccessful
@@ -100,8 +99,7 @@ G4String G4VisCommandSceneAddAxes::GetCurrentValue (G4UIcommand*) {
return "";
}
void G4VisCommandSceneAddAxes::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneAddAxes::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4bool warn(verbosity >= G4VisManager::warnings);
@@ -117,7 +115,7 @@ void G4VisCommandSceneAddAxes::SetNewValue (G4UIcommand* command,
G4String unitString;
G4double x0, y0, z0, length;
const char* s = newValue;
G4std::istrstream is ((char*)s);
std::istrstream is ((char*)s);
is >> x0 >> y0 >> z0 >> length >> unitString;
G4double unit = ValueOf(unitString);
@@ -156,12 +154,11 @@ G4VisCommandSceneAddGhosts::~G4VisCommandSceneAddGhosts () {
delete fpCommand;
}
G4String G4VisCommandSceneAddGhosts::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneAddGhosts::GetCurrentValue (G4UIcommand*) {
return "";
}
void G4VisCommandSceneAddGhosts::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneAddGhosts::SetNewValue(G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4bool warn(verbosity >= G4VisManager::warnings);
@@ -175,6 +172,7 @@ void G4VisCommandSceneAddGhosts::SetNewValue (G4UIcommand* command,
}
const G4String& currentSceneName = pScene -> GetName ();
// Gets the G4GlobalFastSimulationManager pointer if any.
G4VGlobalFastSimulationManager* theGlobalFastSimulationManager;
if(!(theGlobalFastSimulationManager =
G4VGlobalFastSimulationManager::GetConcreteInstance ())){
@@ -184,61 +182,73 @@ void G4VisCommandSceneAddGhosts::SetNewValue (G4UIcommand* command,
return;
}
// Gets the G4ParticleTable pointer.
G4ParticleTable* theParticleTable=G4ParticleTable::GetParticleTable();
if(newValue=="all") {
G4VFlavoredParallelWorld* CurrentFlavoredWorld = 0;
G4bool successful(false);
for (G4int iParticle=0; iParticle<theParticleTable->entries();
iParticle++)
CurrentFlavoredWorld = theGlobalFastSimulationManager->
GetFlavoredWorldForThis(theParticleTable->GetParticle(iParticle));
if(CurrentFlavoredWorld)
successful = pScene -> AddRunDurationModel
(new G4FlavoredParallelWorldModel (CurrentFlavoredWorld), warn);
if (successful) {
if (verbosity >= G4VisManager::confirmations) {
G4cout << "Ghosts have been added to scene \""
<< currentSceneName << "\"."
<< G4endl;
}
}
else {
G4VisCommandsSceneAddUnsuccessful(verbosity);
// If "all" (the default) loops on all known particles
if(newValue=="all")
{
G4VFlavoredParallelWorld* CurrentFlavoredWorld = 0;
G4bool successful(false);
for (G4int iParticle=0; iParticle<theParticleTable->entries();
iParticle++)
{
CurrentFlavoredWorld = theGlobalFastSimulationManager->
GetFlavoredWorldForThis(theParticleTable->GetParticle(iParticle));
if(CurrentFlavoredWorld)
successful = successful || pScene ->
AddRunDurationModel(new G4FlavoredParallelWorldModel
(CurrentFlavoredWorld), warn);
}
if (successful)
{
if (verbosity >= G4VisManager::confirmations)
G4cout << "Ghosts have been added to scene \""
<< currentSceneName << "\"."
<< G4endl;
UpdateVisManagerScene (currentSceneName);
}
else
{
G4cout << "ERROR: There are no ghosts."<<G4endl;
G4VisCommandsSceneAddUnsuccessful(verbosity);
}
return;
}
}
// Given a particle name looks just for the concerned Ghosts, if any.
G4ParticleDefinition* currentParticle =
theParticleTable->FindParticle(newValue);
if (currentParticle == NULL) {
if (verbosity >= G4VisManager::errors) {
G4cout << "ERROR: \"" << newValue
<< "\": not found this particle name!" << G4endl;
if (currentParticle == NULL)
{
if (verbosity >= G4VisManager::errors)
G4cout << "ERROR: \"" << newValue
<< "\": not found this particle name!" << G4endl;
return;
}
return;
}
G4VFlavoredParallelWorld* worldForThis =
theGlobalFastSimulationManager->GetFlavoredWorldForThis(currentParticle);
if(worldForThis) {
G4bool successful = pScene -> AddRunDurationModel
(new G4FlavoredParallelWorldModel (worldForThis), warn);
if (successful) {
if (verbosity >= G4VisManager::confirmations) {
G4cout << "Ghosts have been added to scene \""
<< currentSceneName << "\"."
<< G4endl;
if(worldForThis)
{
G4bool successful = pScene -> AddRunDurationModel
(new G4FlavoredParallelWorldModel (worldForThis), warn);
if (successful) {
if (verbosity >= G4VisManager::confirmations)
G4cout << "Ghosts have been added to scene \""
<< currentSceneName << "\"."
<< G4endl;
UpdateVisManagerScene (currentSceneName);
}
}
}
else {
if (verbosity >= G4VisManager::errors) {
G4cout << "ERROR: There are no ghosts for \""<<newValue<<"\""<<G4endl;
G4VisCommandsSceneAddUnsuccessful(verbosity);
}
}
UpdateVisManagerScene (currentSceneName);
else
if (verbosity >= G4VisManager::errors)
{
G4cout << "ERROR: There are no ghosts for \""<<newValue<<"\""<<G4endl;
G4VisCommandsSceneAddUnsuccessful(verbosity);
}
}
@@ -257,12 +267,11 @@ G4VisCommandSceneAddHits::~G4VisCommandSceneAddHits () {
delete fpCommand;
}
G4String G4VisCommandSceneAddHits::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneAddHits::GetCurrentValue (G4UIcommand*) {
return "";
}
void G4VisCommandSceneAddHits::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneAddHits::SetNewValue (G4UIcommand*, G4String) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4bool warn(verbosity >= G4VisManager::warnings);
@@ -321,7 +330,7 @@ G4String G4VisCommandSceneAddLogicalVolume::GetCurrentValue (G4UIcommand*) {
return "";
}
void G4VisCommandSceneAddLogicalVolume::SetNewValue (G4UIcommand* command,
void G4VisCommandSceneAddLogicalVolume::SetNewValue (G4UIcommand*,
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -338,7 +347,7 @@ void G4VisCommandSceneAddLogicalVolume::SetNewValue (G4UIcommand* command,
G4String name;
G4int requestedDepthOfDescent;
const char* s = newValue;
G4std::istrstream is ((char*)s);
std::istrstream is ((char*)s);
is >> name >> requestedDepthOfDescent;
G4LogicalVolumeStore *pLVStore = G4LogicalVolumeStore::GetInstance();
@@ -430,8 +439,7 @@ G4String G4VisCommandSceneAddScale::GetCurrentValue (G4UIcommand*) {
return "";
}
void G4VisCommandSceneAddScale::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneAddScale::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4bool warn(verbosity >= G4VisManager::warnings);
@@ -446,7 +454,7 @@ void G4VisCommandSceneAddScale::SetNewValue (G4UIcommand* command,
G4double userLength, red, green, blue, xmid, ymid, zmid;
G4String userLengthUnit, direction, auto_manual, positionUnit;
G4std::istrstream is (newValue);
std::istrstream is (newValue);
is >> userLength >> userLengthUnit >> direction
>> red >> green >> blue
>> auto_manual
@@ -457,8 +465,8 @@ void G4VisCommandSceneAddScale::SetNewValue (G4UIcommand* command,
xmid *= unit; ymid *= unit; zmid *= unit;
char tempcharstring [50];
G4std::ostrstream ost (tempcharstring, 50);
ost << userLength << ' ' << userLengthUnit << G4std::ends;
std::ostrstream ost (tempcharstring, 50);
ost << userLength << ' ' << userLengthUnit << std::ends;
G4String annotation(tempcharstring);
G4Scale::Direction scaleDirection (G4Scale::x);
@@ -658,8 +666,7 @@ G4String G4VisCommandSceneAddText::GetCurrentValue (G4UIcommand*) {
return "";
}
void G4VisCommandSceneAddText::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneAddText::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4bool warn(verbosity >= G4VisManager::warnings);
@@ -675,7 +682,7 @@ void G4VisCommandSceneAddText::SetNewValue (G4UIcommand* command,
G4String text, unitString;
G4double x, y, z, font_size, x_offset, y_offset;
const char* s = newValue;
G4std::istrstream is ((char*)s);
std::istrstream is ((char*)s);
is >> x >> y >> z >> unitString >> font_size >> x_offset >> y_offset >> text;
G4double unit = ValueOf(unitString);
@@ -729,12 +736,12 @@ G4VisCommandSceneAddTrajectories::~G4VisCommandSceneAddTrajectories () {
delete fpCommand;
}
G4String G4VisCommandSceneAddTrajectories::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneAddTrajectories::GetCurrentValue (G4UIcommand*) {
return "";
}
void G4VisCommandSceneAddTrajectories::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneAddTrajectories::SetNewValue (G4UIcommand*,
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4bool warn(verbosity >= G4VisManager::warnings);
@@ -749,19 +756,18 @@ void G4VisCommandSceneAddTrajectories::SetNewValue (G4UIcommand* command,
G4int drawingMode;
const char* s = newValue;
G4std::istrstream is ((char*)s);
std::istrstream is ((char*)s);
is >> drawingMode;
G4TrajectoriesModel* model = new G4TrajectoriesModel(drawingMode);
const G4String& currentSceneName = pScene -> GetName ();
G4bool successful = pScene -> AddEndOfEventModel (model, warn);
if (successful) {
if (verbosity >= G4VisManager::confirmations) {
G4cout << "Trajectories will be drawn in scene \""
<< currentSceneName << "\"."
<< G4endl;
}
pScene -> AddEndOfEventModel (model, warn);
if (verbosity >= G4VisManager::confirmations) {
G4cout << "Trajectories will be drawn with mode "
<< drawingMode
<< " in scene \""
<< currentSceneName << "\"."
<< G4endl;
}
else G4VisCommandsSceneAddUnsuccessful(verbosity);
}
////////////// /vis/scene/add/volume ///////////////////////////////////////
@@ -799,11 +805,11 @@ G4VisCommandSceneAddVolume::~G4VisCommandSceneAddVolume () {
delete fpCommand;
}
G4String G4VisCommandSceneAddVolume::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneAddVolume::GetCurrentValue (G4UIcommand*) {
return "world 0 -1";
}
void G4VisCommandSceneAddVolume::SetNewValue (G4UIcommand* command,
void G4VisCommandSceneAddVolume::SetNewValue (G4UIcommand*,
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -821,7 +827,7 @@ void G4VisCommandSceneAddVolume::SetNewValue (G4UIcommand* command,
G4int copyNo;
G4int requestedDepthOfDescent;
const char* s = newValue;
G4std::istrstream is ((char*)s);
std::istrstream is ((char*)s);
is >> name >> copyNo >> requestedDepthOfDescent;
G4VPhysicalVolume* world =
G4TransportationManager::GetTransportationManager ()
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsSceneHandler.cc,v 1.22 2001/09/10 10:56:55 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VisCommandsSceneHandler.cc,v 1.24 2003/06/16 17:14:24 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// /vis/sceneHandler commands - John Allison 10th October 1998
@@ -35,7 +35,7 @@
#include "G4UIcommand.hh"
#include "G4UIcmdWithAString.hh"
#include "G4ios.hh"
#include "g4std/strstream"
#include <strstream>
G4VVisCommandSceneHandler::G4VVisCommandSceneHandler () {}
@@ -85,12 +85,12 @@ G4VisCommandSceneHandlerAttach::~G4VisCommandSceneHandlerAttach () {
delete fpCommand;
}
G4String G4VisCommandSceneHandlerAttach::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneHandlerAttach::GetCurrentValue (G4UIcommand*) {
G4Scene* pScene = fpVisManager -> GetCurrentScene ();
return pScene ? pScene -> GetName () : G4String("");
}
void G4VisCommandSceneHandlerAttach::SetNewValue (G4UIcommand* command,
void G4VisCommandSceneHandlerAttach::SetNewValue (G4UIcommand*,
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -206,13 +206,12 @@ G4VisCommandSceneHandlerCreate::~G4VisCommandSceneHandlerCreate () {
G4String G4VisCommandSceneHandlerCreate::NextName () {
char nextName [20];
G4std::ostrstream ost (nextName, 20);
ost << "scene-handler-" << fId << G4std::ends;
std::ostrstream ost (nextName, 20);
ost << "scene-handler-" << fId << std::ends;
return nextName;
}
G4String G4VisCommandSceneHandlerCreate::GetCurrentValue
(G4UIcommand* command) {
G4String G4VisCommandSceneHandlerCreate::GetCurrentValue(G4UIcommand*) {
G4String graphicsSystemName;
const G4VGraphicsSystem* graphicsSystem =
@@ -234,13 +233,13 @@ G4String G4VisCommandSceneHandlerCreate::GetCurrentValue
return graphicsSystemName + " " + NextName ();
}
void G4VisCommandSceneHandlerCreate::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneHandlerCreate::SetNewValue (G4UIcommand*,
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4String graphicsSystem, newName;
G4std::istrstream is ((char*)newValue.data());
std::istrstream is ((char*)newValue.data());
is >> graphicsSystem >> newName;
const G4GraphicsSystemList& gsl =
@@ -348,14 +347,14 @@ G4VisCommandSceneHandlerList::~G4VisCommandSceneHandlerList () {
delete fpCommand;
}
G4String G4VisCommandSceneHandlerList::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneHandlerList::GetCurrentValue (G4UIcommand*) {
return "";
}
void G4VisCommandSceneHandlerList::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneHandlerList::SetNewValue (G4UIcommand*,
G4String newValue) {
G4String name, verbosityString;
G4std::istrstream is ((char*)newValue.data());
std::istrstream is ((char*)newValue.data());
is >> name >> verbosityString;
G4VisManager::Verbosity verbosity =
fpVisManager->GetVerbosityValue(verbosityString);
@@ -403,7 +402,7 @@ G4VisCommandSceneHandlerRemove::~G4VisCommandSceneHandlerRemove () {
delete fpCommand;
}
G4String G4VisCommandSceneHandlerRemove::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandSceneHandlerRemove::GetCurrentValue (G4UIcommand*) {
G4VSceneHandler* sceneHandler = fpVisManager -> GetCurrentSceneHandler ();
if (sceneHandler) {
return sceneHandler -> GetName ();
@@ -413,8 +412,8 @@ G4String G4VisCommandSceneHandlerRemove::GetCurrentValue (G4UIcommand* command)
}
}
void G4VisCommandSceneHandlerRemove::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneHandlerRemove::SetNewValue (G4UIcommand*,
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -477,8 +476,7 @@ G4VisCommandSceneHandlerSelect::~G4VisCommandSceneHandlerSelect () {
delete fpCommand;
}
G4String G4VisCommandSceneHandlerSelect::GetCurrentValue
(G4UIcommand* command) {
G4String G4VisCommandSceneHandlerSelect::GetCurrentValue (G4UIcommand*) {
G4VSceneHandler* sceneHandler = fpVisManager -> GetCurrentSceneHandler ();
if (sceneHandler) {
return sceneHandler -> GetName ();
@@ -488,8 +486,8 @@ G4String G4VisCommandSceneHandlerSelect::GetCurrentValue
}
}
void G4VisCommandSceneHandlerSelect::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandSceneHandlerSelect::SetNewValue (G4UIcommand*,
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsViewer.cc,v 1.35 2002/04/26 21:23:31 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VisCommandsViewer.cc,v 1.37 2003/06/16 17:14:25 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// /vis/viewer commands - John Allison 25th October 1998
@@ -38,7 +38,7 @@
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UnitsTable.hh"
#include "G4ios.hh"
#include "g4std/strstream"
#include <strstream>
G4VVisCommandViewer::G4VVisCommandViewer () {}
@@ -103,7 +103,7 @@ G4VisCommandViewerClear::~G4VisCommandViewerClear () {
delete fpCommand;
}
G4String G4VisCommandViewerClear::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandViewerClear::GetCurrentValue (G4UIcommand*) {
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
if (viewer) {
return viewer -> GetName ();
@@ -113,8 +113,7 @@ G4String G4VisCommandViewerClear::GetCurrentValue (G4UIcommand* command) {
}
}
void G4VisCommandViewerClear::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandViewerClear::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -177,7 +176,7 @@ G4VisCommandViewerCreate::~G4VisCommandViewerCreate () {
G4String G4VisCommandViewerCreate::NextName () {
const int charLength = 100;
char nextName [charLength];
G4std::ostrstream ost (nextName, charLength);
std::ostrstream ost (nextName, charLength);
G4VSceneHandler* sceneHandler = fpVisManager -> GetCurrentSceneHandler ();
ost << "viewer-" << fId << " (";
if (sceneHandler) {
@@ -186,11 +185,11 @@ G4String G4VisCommandViewerCreate::NextName () {
else {
ost << "no_scene_handlers";
}
ost << ")" << G4std::ends;
ost << ")" << std::ends;
return nextName;
}
G4String G4VisCommandViewerCreate::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandViewerCreate::GetCurrentValue (G4UIcommand*) {
G4String currentValue;
G4VSceneHandler* currentSceneHandler =
fpVisManager -> GetCurrentSceneHandler ();
@@ -210,14 +209,13 @@ G4String G4VisCommandViewerCreate::GetCurrentValue (G4UIcommand* command) {
return currentValue;
}
void G4VisCommandViewerCreate::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandViewerCreate::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4String sceneHandlerName, newName;
G4int windowSizeHint;
G4std::istrstream is ((char*)newValue.data());
std::istrstream is ((char*)newValue.data());
is >> sceneHandlerName;
// Now need to handle the possibility that the second string
@@ -424,7 +422,7 @@ G4VisCommandViewerFlush::~G4VisCommandViewerFlush () {
}
G4String G4VisCommandViewerFlush::GetCurrentValue
(G4UIcommand* command) {
(G4UIcommand*) {
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
if (viewer) {
return viewer -> GetName ();
@@ -434,8 +432,7 @@ G4String G4VisCommandViewerFlush::GetCurrentValue
}
}
void G4VisCommandViewerFlush::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandViewerFlush::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -524,7 +521,7 @@ G4String G4VisCommandViewerLights::GetCurrentValue (G4UIcommand* command) {
}
void G4VisCommandViewerLights::SetNewValue (G4UIcommand* command,
G4String newValue) {
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
if (command == fpCommandLightsThetaPhi) {
if (verbosity >= G4VisManager::warnings) {
@@ -574,14 +571,13 @@ G4VisCommandViewerList::~G4VisCommandViewerList () {
delete fpCommand;
}
G4String G4VisCommandViewerList::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandViewerList::GetCurrentValue (G4UIcommand*) {
return "";
}
void G4VisCommandViewerList::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandViewerList::SetNewValue (G4UIcommand*, G4String newValue) {
G4String name, verbosityString;
G4std::istrstream is ((char*)newValue.data());
std::istrstream is ((char*)newValue.data());
is >> name >> verbosityString;
G4String shortName = fpVisManager -> ViewerShortName (name);
G4VisManager::Verbosity verbosity =
@@ -714,7 +710,7 @@ G4String G4VisCommandViewerPan::GetCurrentValue (G4UIcommand* command) {
}
void G4VisCommandViewerPan::SetNewValue (G4UIcommand* command,
G4String newValue) {
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -770,8 +766,7 @@ G4VisCommandViewerRefresh::~G4VisCommandViewerRefresh () {
delete fpCommand;
}
G4String G4VisCommandViewerRefresh::GetCurrentValue
(G4UIcommand* command) {
G4String G4VisCommandViewerRefresh::GetCurrentValue (G4UIcommand*) {
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
if (viewer) {
return viewer -> GetName ();
@@ -781,8 +776,7 @@ G4String G4VisCommandViewerRefresh::GetCurrentValue
}
}
void G4VisCommandViewerRefresh::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandViewerRefresh::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
G4bool warn(verbosity >= G4VisManager::warnings);
@@ -864,7 +858,7 @@ G4VisCommandViewerRemove::~G4VisCommandViewerRemove () {
delete fpCommand;
}
G4String G4VisCommandViewerRemove::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandViewerRemove::GetCurrentValue (G4UIcommand*) {
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
if (viewer) {
return viewer -> GetName ();
@@ -874,8 +868,7 @@ G4String G4VisCommandViewerRemove::GetCurrentValue (G4UIcommand* command) {
}
}
void G4VisCommandViewerRemove::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandViewerRemove::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -940,7 +933,7 @@ G4VisCommandViewerReset::~G4VisCommandViewerReset () {
delete fpCommand;
}
G4String G4VisCommandViewerReset::GetCurrentValue (G4UIcommand* command) {
G4String G4VisCommandViewerReset::GetCurrentValue (G4UIcommand*) {
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
if (viewer) {
return viewer -> GetName ();
@@ -950,8 +943,7 @@ G4String G4VisCommandViewerReset::GetCurrentValue (G4UIcommand* command) {
}
}
void G4VisCommandViewerReset::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandViewerReset::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -989,8 +981,7 @@ G4VisCommandViewerSelect::~G4VisCommandViewerSelect () {
delete fpCommand;
}
G4String G4VisCommandViewerSelect::GetCurrentValue
(G4UIcommand* command) {
G4String G4VisCommandViewerSelect::GetCurrentValue (G4UIcommand*) {
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
if (viewer) {
return viewer -> GetName ();
@@ -1000,8 +991,7 @@ G4String G4VisCommandViewerSelect::GetCurrentValue
}
}
void G4VisCommandViewerSelect::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandViewerSelect::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -1064,8 +1054,7 @@ G4VisCommandViewerUpdate::~G4VisCommandViewerUpdate () {
delete fpCommand1;
}
G4String G4VisCommandViewerUpdate::GetCurrentValue
(G4UIcommand* command) {
G4String G4VisCommandViewerUpdate::GetCurrentValue (G4UIcommand*) {
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
if (viewer) {
return viewer -> GetName ();
@@ -1075,8 +1064,7 @@ G4String G4VisCommandViewerUpdate::GetCurrentValue
}
}
void G4VisCommandViewerUpdate::SetNewValue (G4UIcommand* command,
G4String newValue) {
void G4VisCommandViewerUpdate::SetNewValue (G4UIcommand*, G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -1160,7 +1148,7 @@ G4String G4VisCommandViewerViewpoint::GetCurrentValue (G4UIcommand* command) {
}
void G4VisCommandViewerViewpoint::SetNewValue (G4UIcommand* command,
G4String newValue) {
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -1230,7 +1218,7 @@ G4String G4VisCommandViewerZoom::GetCurrentValue (G4UIcommand* command) {
}
void G4VisCommandViewerZoom::SetNewValue (G4UIcommand* command,
G4String newValue) {
G4String newValue) {
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsViewerSet.cc,v 1.20 2002/11/27 12:33:28 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VisCommandsViewerSet.cc,v 1.21 2003/06/16 17:14:26 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// /vis/viewer/set commands - John Allison 16th May 2000
@@ -414,7 +414,7 @@ void G4VisCommandsViewerSet::SetNewValue
G4String cullingOption, stringFlag, unit;
G4double density;
G4bool boolFlag;
G4std::istrstream is ((char*)newValue.data());
std::istrstream is ((char*)newValue.data());
is >> cullingOption >> stringFlag >> density >> unit;
boolFlag = GetNewBoolValue(stringFlag);
if (cullingOption == "global") {
@@ -637,7 +637,7 @@ void G4VisCommandsViewerSet::SetNewValue
else if (newValue[iPos] == 'p') { // "perspective"
G4String dummy;
G4String unit;
G4std::istrstream is ((char*)newValue.data());
std::istrstream is ((char*)newValue.data());
is >> dummy >> fieldHalfAngle >> unit;
fieldHalfAngle *= ValueOf(unit);
if (fieldHalfAngle > 89.5 * deg || fieldHalfAngle <= 0.0) {
@@ -675,7 +675,7 @@ void G4VisCommandsViewerSet::SetNewValue
G4String choice, unit;
G4double x, y, z, nx, ny, nz;
const char* t = newValue;
G4std::istrstream is ((char*)t);
std::istrstream is ((char*)t);
is >> choice >> x >> y >> z >> unit >> nx >> ny >> nz;
G4int iSelector = -1;
@@ -22,7 +22,7 @@
//
//
// $Id: G4VisFeaturesOfDAWNFILE.cc,v 1.5 2001/07/11 10:09:19 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
#include "G4VisFeaturesOfDAWNFILE.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: G4VisFeaturesOfFukuiRenderer.cc,v 1.4 2001/07/11 10:09:19 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VisFeaturesOfOpenGL.cc,v 1.4 2001/07/11 10:09:19 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VisFeaturesOfOpenInventor.cc,v 1.4 2001/07/11 10:09:19 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisManager.cc,v 1.49 2003/01/20 14:12:36 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VisManager.cc,v 1.50 2003/06/16 17:14:27 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// GEANT4 Visualization Manager - John Allison 02/Jan/1996.
@@ -629,13 +629,13 @@ void G4VisManager::GeometryHasChanged () {
G4int iScene, nScenes = sceneList.size ();
for (iScene = 0; iScene < nScenes; iScene++) {
G4Scene* pScene = sceneList [iScene];
G4std::vector<G4VModel*>& modelList = pScene -> SetRunDurationModelList ();
std::vector<G4VModel*>& modelList = pScene -> SetRunDurationModelList ();
if (modelList.size ()) {
G4bool modelInvalid;
do { // Remove, if required, one at a time.
modelInvalid = false;
G4std::vector<G4VModel*>::iterator iterModel;
std::vector<G4VModel*>::iterator iterModel;
for (iterModel = modelList.begin();
iterModel != modelList.end();
++iterModel) {
@@ -1012,7 +1012,7 @@ void G4VisManager::EndOfEvent () {
ClearTransientStoreIfMarked();
fVisManagerModelingParameters
= *(fpSceneHandler -> CreateModelingParameters ());
const G4std::vector<G4VModel*>& EOEModelList =
const std::vector<G4VModel*>& EOEModelList =
fpScene -> GetEndOfEventModelList ();
for (size_t i = 0; i < EOEModelList.size (); i++) {
G4VModel* pModel = EOEModelList [i];
@@ -1123,7 +1123,7 @@ G4VisManager::GetVerbosityValue(const G4String& verbosityString) {
else {
G4int intVerbosity;
const char* t = s;
G4std::istrstream is((char*)t);
std::istrstream is((char*)t);
is >> intVerbosity;
if (!is) {
G4cout << "ERROR: G4VisManager::GetVerbosityValue: invalid verbosity \""
@@ -22,7 +22,7 @@
//
//
// $Id: G4VisStateDependent.cc,v 1.5 2002/12/05 01:37:37 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
#include "G4VisStateDependent.hh"