63 lines
2.0 KiB
C++
63 lines
2.0 KiB
C++
// 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: ExN03EventActionMessenger.cc,v 1.3 1999/12/15 14:49:25 gunter Exp $
|
|
// GEANT4 tag $Name: geant4-02-00 $
|
|
//
|
|
//
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
#include "ExN03EventActionMessenger.hh"
|
|
|
|
#include "ExN03EventAction.hh"
|
|
#include "G4UIcmdWithAString.hh"
|
|
#include "G4UIcmdWithAnInteger.hh"
|
|
#include "globals.hh"
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
ExN03EventActionMessenger::ExN03EventActionMessenger(ExN03EventAction* EvAct)
|
|
:eventAction(EvAct)
|
|
{
|
|
DrawCmd = new G4UIcmdWithAString("/event/drawTracks",this);
|
|
DrawCmd->SetGuidance("Draw the tracks in the event");
|
|
DrawCmd->SetGuidance(" Choice : none, charged(default), all");
|
|
DrawCmd->SetParameterName("choice",true);
|
|
DrawCmd->SetDefaultValue("charged");
|
|
DrawCmd->SetCandidates("none charged all");
|
|
DrawCmd->AvailableForStates(Idle);
|
|
|
|
PrintCmd = new G4UIcmdWithAnInteger("/event/printModulo",this);
|
|
PrintCmd->SetGuidance("Print events modulo n");
|
|
PrintCmd->SetParameterName("EventNb",false);
|
|
PrintCmd->SetRange("EventNb>0");
|
|
PrintCmd->AvailableForStates(Idle);
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
ExN03EventActionMessenger::~ExN03EventActionMessenger()
|
|
{
|
|
delete DrawCmd;
|
|
delete PrintCmd;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
void ExN03EventActionMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
|
{
|
|
if(command == DrawCmd)
|
|
{eventAction->SetDrawFlag(newValue);}
|
|
|
|
if(command == PrintCmd)
|
|
{eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));}
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|