Import Geant4 3.2.0 source tree
This commit is contained in:
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VisCommandsCompound.cc,v 1.10 2001/02/23 15:43:26 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4VisCommandsCompound.cc,v 1.12.2.1 2001/06/28 19:16:15 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
|
||||
// Compound /vis/ commands - John Allison 15th May 2000
|
||||
|
||||
@@ -16,6 +32,46 @@
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
|
||||
////////////// /vis/drawTree ///////////////////////////////////////
|
||||
|
||||
G4VisCommandDrawTree::G4VisCommandDrawTree() {
|
||||
G4bool omitable;
|
||||
fpCommand = new G4UIcommand("/vis/drawTree", this);
|
||||
fpCommand->SetGuidance("/vis/drawTree [<physical-volume-name>] [<system>]");
|
||||
fpCommand->SetGuidance("Default: world ATree");
|
||||
fpCommand->SetGuidance
|
||||
("(DTREE) Creates a scene consisting of this physical volume and"
|
||||
"\n produces a represntation of the geometry hieracrhy.");
|
||||
fpCommand->SetGuidance("The scene becomes current.");
|
||||
G4UIparameter* parameter;
|
||||
parameter = new G4UIparameter("PVname", 's', omitable = true);
|
||||
parameter -> SetDefaultValue("world");
|
||||
fpCommand -> SetParameter (parameter);
|
||||
parameter = new G4UIparameter("system", 's', omitable = true);
|
||||
parameter -> SetDefaultValue("ATree");
|
||||
fpCommand -> SetParameter (parameter);
|
||||
}
|
||||
|
||||
G4VisCommandDrawTree::~G4VisCommandDrawTree() {
|
||||
delete fpCommand;
|
||||
}
|
||||
|
||||
void G4VisCommandDrawTree::SetNewValue
|
||||
(G4UIcommand* command, G4String newValue) {
|
||||
|
||||
G4String pvname, system;
|
||||
const char* t = newValue;
|
||||
G4std::istrstream is((char*)t);
|
||||
is >> pvname >> system;
|
||||
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
G4int keepVerbose = UImanager->GetVerboseLevel();
|
||||
UImanager->SetVerboseLevel(2);
|
||||
UImanager->ApplyCommand("/vis/open " + system);
|
||||
UImanager->ApplyCommand("/vis/drawVolume " + pvname);
|
||||
UImanager->SetVerboseLevel(keepVerbose);
|
||||
}
|
||||
|
||||
////////////// /vis/drawView ///////////////////////////////////////
|
||||
|
||||
G4VisCommandDrawView::G4VisCommandDrawView() {
|
||||
@@ -147,7 +203,7 @@ G4VisCommandOpen::G4VisCommandOpen() {
|
||||
const G4GraphicsSystemList& gslist =
|
||||
fpVisManager->GetAvailableGraphicsSystems();
|
||||
G4String candidates;
|
||||
for (int igslist = 0; igslist < gslist.size(); igslist++) {
|
||||
for (size_t igslist = 0; igslist < gslist.size(); igslist++) {
|
||||
const G4String& name = gslist[igslist]->GetName();
|
||||
const G4String& nickname = gslist[igslist]->GetNickname();
|
||||
if (nickname.isNull()) {
|
||||
|
||||
Reference in New Issue
Block a user