Import Geant4 9.5.0 source tree
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#ifdef CEXMC_USE_ROOT
|
||||
|
||||
#include <G4UIcmdWithoutParameter.hh>
|
||||
#include <G4UIcmdWithAnInteger.hh>
|
||||
#include <G4UIcmdWithAString.hh>
|
||||
#include <G4String.hh>
|
||||
#include "CexmcHistoManagerMessenger.hh"
|
||||
@@ -51,12 +52,22 @@
|
||||
#include "CexmcMessenger.hh"
|
||||
|
||||
|
||||
CexmcHistoManagerMessenger::CexmcHistoManagerMessenger() :
|
||||
listHistos( NULL ), printHisto( NULL )
|
||||
CexmcHistoManagerMessenger::CexmcHistoManagerMessenger(
|
||||
CexmcHistoManager * histoManager ) :
|
||||
histoManager( histoManager ), setVerboseLevel( NULL ), listHistos( NULL ),
|
||||
printHisto( NULL )
|
||||
#ifdef CEXMC_USE_ROOTQT
|
||||
, drawHisto( NULL )
|
||||
#endif
|
||||
{
|
||||
setVerboseLevel = new G4UIcmdWithAnInteger(
|
||||
( CexmcMessenger::histoDirName + "verbose" ).c_str(), this );
|
||||
setVerboseLevel->SetGuidance( "0 - basic set of histograms created, "
|
||||
"1 - extra histograms created" );
|
||||
setVerboseLevel->SetParameterName( "Verbose", true );
|
||||
setVerboseLevel->SetDefaultValue( 0 );
|
||||
setVerboseLevel->AvailableForStates( G4State_PreInit );
|
||||
|
||||
listHistos = new G4UIcmdWithoutParameter(
|
||||
( CexmcMessenger::histoDirName + "list" ).c_str(), this );
|
||||
listHistos->SetGuidance( "List available histograms" );
|
||||
@@ -83,6 +94,7 @@ CexmcHistoManagerMessenger::CexmcHistoManagerMessenger() :
|
||||
|
||||
CexmcHistoManagerMessenger::~CexmcHistoManagerMessenger()
|
||||
{
|
||||
delete setVerboseLevel;
|
||||
delete listHistos;
|
||||
delete printHisto;
|
||||
#ifdef CEXMC_USE_ROOTQT
|
||||
@@ -91,20 +103,26 @@ CexmcHistoManagerMessenger::~CexmcHistoManagerMessenger()
|
||||
}
|
||||
|
||||
|
||||
void CexmcHistoManagerMessenger::SetNewValue(
|
||||
G4UIcommand * cmd, G4String value )
|
||||
void CexmcHistoManagerMessenger::SetNewValue( G4UIcommand * cmd,
|
||||
G4String value )
|
||||
{
|
||||
CexmcHistoManager * histoManager( CexmcHistoManager::Instance() );
|
||||
|
||||
do
|
||||
{
|
||||
if ( cmd == setVerboseLevel )
|
||||
{
|
||||
histoManager->SetVerboseLevel(
|
||||
G4UIcmdWithAnInteger::GetNewIntValue( value ) );
|
||||
break;
|
||||
}
|
||||
if ( cmd == listHistos )
|
||||
{
|
||||
histoManager->List();
|
||||
break;
|
||||
}
|
||||
if ( cmd == printHisto )
|
||||
{
|
||||
histoManager->Print( value );
|
||||
break;
|
||||
}
|
||||
#ifdef CEXMC_USE_ROOTQT
|
||||
if ( cmd == drawHisto )
|
||||
@@ -116,6 +134,7 @@ void CexmcHistoManagerMessenger::SetNewValue(
|
||||
histoManager->Draw( std::string( value, 0, delimPos ),
|
||||
delimPosEnd == G4String::npos ? "" :
|
||||
value.c_str() + delimPosEnd );
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
} while ( false );
|
||||
|
||||
Reference in New Issue
Block a user