89 lines
3.6 KiB
C++
89 lines
3.6 KiB
C++
//
|
|
// ********************************************************************
|
|
// * 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: F03EventActionMessenger.cc,v 1.3 2002/12/05 01:06:58 asaim Exp $
|
|
// GEANT4 tag $Name: geant4-05-00 $
|
|
//
|
|
//
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
#include "F03EventActionMessenger.hh"
|
|
|
|
#include "F03EventAction.hh"
|
|
#include "G4UIcmdWithAString.hh"
|
|
#include "G4UIcmdWithAnInteger.hh"
|
|
#include "G4UIcmdWithADoubleAndUnit.hh"
|
|
#include "globals.hh"
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
F03EventActionMessenger::F03EventActionMessenger(F03EventAction* EvAct)
|
|
:eventAction(EvAct)
|
|
{
|
|
setVerboseCmd = new G4UIcmdWithAnInteger("/event/setverbose",this);
|
|
setVerboseCmd->SetGuidance("Set verbose level ." );
|
|
setVerboseCmd->SetParameterName("level",true);
|
|
setVerboseCmd->SetDefaultValue(0);
|
|
|
|
DrawCmd = new G4UIcmdWithAString("/event/drawTracks",this);
|
|
DrawCmd->SetGuidance("Draw the tracks in the event");
|
|
DrawCmd->SetGuidance(" Choice : none,charged, all");
|
|
DrawCmd->SetParameterName("choice",true);
|
|
DrawCmd->SetDefaultValue("all");
|
|
DrawCmd->SetCandidates("none charged all");
|
|
DrawCmd->AvailableForStates(G4State_Idle);
|
|
|
|
PrintCmd = new G4UIcmdWithAnInteger("/event/printModulo",this);
|
|
PrintCmd->SetGuidance("Print events modulo n");
|
|
PrintCmd->SetParameterName("EventNb",false);
|
|
PrintCmd->SetRange("EventNb>0");
|
|
PrintCmd->AvailableForStates(G4State_Idle);
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
F03EventActionMessenger::~F03EventActionMessenger()
|
|
{
|
|
delete setVerboseCmd;
|
|
delete DrawCmd;
|
|
delete PrintCmd;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
void F03EventActionMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
|
{
|
|
if(command == setVerboseCmd)
|
|
{eventAction->setEventVerbose(setVerboseCmd->GetNewIntValue(newValue));}
|
|
|
|
if(command == DrawCmd)
|
|
{eventAction->SetDrawFlag(newValue);}
|
|
|
|
if(command == PrintCmd)
|
|
{eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));}
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|