Import Geant4 7.0.0 source tree
This commit is contained in:
@@ -21,12 +21,12 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ASCIITreeMessenger.cc,v 1.6 2003/05/30 13:01:23 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4ASCIITreeMessenger.cc,v 1.8 2004/09/22 20:01:18 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
// A scene handler to dump geometry hierarchy.
|
||||
// A scene handler to dump geometry hierarchy in readable ASCII.
|
||||
// Based on a provisional G4ASCIITreeGraphicsScene (was in modeling).
|
||||
|
||||
#include "G4ASCIITreeMessenger.hh"
|
||||
@@ -35,35 +35,63 @@
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
|
||||
G4ASCIITreeMessenger::G4ASCIITreeMessenger
|
||||
(G4ASCIITree* ASCIITree):
|
||||
fpASCIITree(ASCIITree) {
|
||||
G4bool omitable, currentAsDefault;
|
||||
|
||||
fpDirectory = new G4UIdirectory ("/vis/ASCIITree/");
|
||||
fpDirectory -> SetGuidance ("Commands for ASCIITree control.");
|
||||
|
||||
fpDirectorySet = new G4UIdirectory ("/vis/ASCIITree/set/");
|
||||
fpDirectorySet -> SetGuidance ("Settings for ASCIITree control.");
|
||||
|
||||
fpCommandVerbose = new G4UIcmdWithAnInteger ("/vis/ASCIITree/verbose", this);
|
||||
fpCommandVerbose -> SetGuidance ("/vis/ASCIITree/verbose [<verbosity>]");
|
||||
fpCommandVerbose -> SetGuidance
|
||||
("0 (default) mimimum - 10 maximum printing.");
|
||||
fpCommandVerbose -> SetParameterName ("verbosity",
|
||||
omitable = true,
|
||||
currentAsDefault = true);
|
||||
currentAsDefault = false);
|
||||
fpCommandSetOutFile = new G4UIcmdWithAString ("/vis/ASCIITree/set/outFile", this
|
||||
);
|
||||
fpCommandSetOutFile -> SetGuidance
|
||||
("/vis/ASCIITree/set/OutFile <out-filename>");
|
||||
fpCommandSetOutFile -> SetParameterName ("out-filename",
|
||||
omitable = true,
|
||||
currentAsDefault = false);
|
||||
fpCommandSetOutFile -> SetDefaultValue ("G4cout");
|
||||
}
|
||||
|
||||
G4ASCIITreeMessenger::~G4ASCIITreeMessenger() {
|
||||
delete fpCommandSetOutFile;
|
||||
delete fpDirectorySet;
|
||||
delete fpCommandVerbose;
|
||||
delete fpDirectory;
|
||||
}
|
||||
|
||||
G4String G4ASCIITreeMessenger::GetCurrentValue(G4UIcommand*) {
|
||||
return "0";
|
||||
return "";
|
||||
}
|
||||
|
||||
void G4ASCIITreeMessenger::SetNewValue(G4UIcommand*, G4String newValue) {
|
||||
fpASCIITree->SetVerbosity
|
||||
(fpCommandVerbose->GetNewIntValue(newValue));
|
||||
G4cout << "G4ASCIITree verbosity now "
|
||||
<< fpASCIITree->GetVerbosity()
|
||||
<< G4endl;
|
||||
void G4ASCIITreeMessenger::SetNewValue
|
||||
(G4UIcommand* command,
|
||||
G4String newValue) {
|
||||
if (command == fpCommandVerbose)
|
||||
{
|
||||
fpASCIITree->SetVerbosity
|
||||
(fpCommandVerbose->GetNewIntValue(newValue));
|
||||
G4cout << "G4ASCIITree verbosity now "
|
||||
<< fpASCIITree->GetVerbosity()
|
||||
<< G4endl;
|
||||
}
|
||||
else if (command == fpCommandSetOutFile)
|
||||
{
|
||||
fpASCIITree -> SetOutFileName (newValue);
|
||||
G4cout << "G4ASCIITree out filename now "
|
||||
<< fpASCIITree -> GetOutFileName()
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user