Import Geant4 4.1.0 source tree
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include "DMXRunAction.hh"
|
||||
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithABool.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
@@ -48,27 +49,64 @@
|
||||
DMXRunActionMessenger::DMXRunActionMessenger(DMXRunAction* run)
|
||||
:DMXRun(run)
|
||||
{
|
||||
FileCmd = new G4UIcmdWithAString("/run/filename",this);
|
||||
FileCmd->SetGuidance(" The log file name for the run");
|
||||
FileCmd->SetGuidance(" default = rdmex2.log ");
|
||||
FileCmd->SetParameterName(" Input ",true);
|
||||
FileCmd->SetDefaultValue("rdmex2.log");
|
||||
FileCmd->AvailableForStates(Idle);
|
||||
SaveHitsCmd = new G4UIcmdWithAString("/dmx/hitsfile",this);
|
||||
SaveHitsCmd->SetGuidance("output file for hits collection (txt)");
|
||||
SaveHitsCmd->SetGuidance("Default = hits.out");
|
||||
SaveHitsCmd->SetParameterName("savehitsFile", false);
|
||||
SaveHitsCmd->SetDefaultValue("hits.out");
|
||||
|
||||
SavePmtCmd = new G4UIcmdWithAString("/dmx/pmtfile",this);
|
||||
SavePmtCmd->SetGuidance("output file for pmt hits (txt)");
|
||||
SavePmtCmd->SetGuidance("Default = pmt.out");
|
||||
SavePmtCmd->SetParameterName("savepmtFile", false);
|
||||
SavePmtCmd->SetDefaultValue("pmt.out");
|
||||
|
||||
SaveHistFileCmd = new G4UIcmdWithAString("/dmx/histogramfile",this);
|
||||
SaveHistFileCmd->SetGuidance("output file for histograms");
|
||||
SaveHistFileCmd->SetGuidance("Default = dmx.his");
|
||||
// SaveHistFileCmd->SetParameterName("savehistFile", false);
|
||||
SaveHistFileCmd->SetParameterName("histFile", false);
|
||||
SaveHistFileCmd->SetDefaultValue("dmx.his");
|
||||
|
||||
InteractPlotCmd = new G4UIcmdWithABool("/dmx/PlotAtEnd",this);
|
||||
InteractPlotCmd->SetGuidance("Flag for Interactive plotting at end of run");
|
||||
InteractPlotCmd->SetGuidance("Default = false");
|
||||
InteractPlotCmd->SetParameterName("interactplot", false);
|
||||
InteractPlotCmd->SetDefaultValue(false);
|
||||
|
||||
// FileCmd->AvailableForStates(Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
DMXRunActionMessenger::~DMXRunActionMessenger()
|
||||
{
|
||||
delete FileCmd;
|
||||
delete SaveHitsCmd;
|
||||
delete SavePmtCmd;
|
||||
delete SaveHistFileCmd;
|
||||
delete InteractPlotCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void DMXRunActionMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
{
|
||||
if(command == FileCmd)
|
||||
{DMXRun->SetFilename(newValue);}
|
||||
if(command == SaveHitsCmd)
|
||||
DMXRun->SetsavehitsFile(newValue);
|
||||
|
||||
if(command == SavePmtCmd)
|
||||
DMXRun->SetsavepmtFile(newValue);
|
||||
|
||||
if(command == SaveHistFileCmd)
|
||||
DMXRun->SetsavehistFile(newValue);
|
||||
|
||||
if(command == InteractPlotCmd) {
|
||||
G4int vl;
|
||||
const char* t = newValue;
|
||||
G4std::istrstream is((char*)t);
|
||||
is >> vl;
|
||||
DMXRun->Setinteractplot(vl!=0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user