#include "FCALTrackingMessenger.hh" #include "FCALTrackingAction.hh" #include "G4UIdirectory.hh" #include "G4UIcmdWithAnInteger.hh" FCALTrackingMessenger::FCALTrackingMessenger(FCALTrackingAction* tracking_Act) : tracking_Action(tracking_Act) { tracking_Dir = new G4UIdirectory("/visibility/"); tracking_Dir->SetGuidance("tracking visibility commands"); tracking_Cmd = new G4UIcmdWithAnInteger("/visibility/visibility", this); tracking_Cmd->SetGuidance("set the trajectory which creates what you want to observe"); tracking_Cmd->SetParameterName("Visibility Number", true); tracking_Cmd->SetDefaultValue(7); tracking_Cmd->SetRange("1: Primary only 2: Secondaries only 3: e- only 4: e+ only 5: Gammas only 6: Optical photons only 7: All secondaries without optical photons"); tracking_Cmd->AvailableForStates(G4State_Idle); } FCALTrackingMessenger::~FCALTrackingMessenger() { delete tracking_Dir; delete tracking_Cmd; } void FCALTrackingMessenger::SetNewValue(G4UIcommand* command, G4String new_Value) { if (command == tracking_Cmd) { tracking_Action->setNewTrackingVis(tracking_Cmd->GetNewIntValue(new_Value)); } }