00001 // 00002 // ******************************************************************** 00003 // * DISCLAIMER * 00004 // * * 00005 // * Neither the authors of this software system, nor their employing * 00006 // * institutes,nor the agencies providing financial support for this * 00007 // * work make any representation or warranty, express or implied, * 00008 // * regarding this software system or assume any liability for its * 00009 // * use. * 00010 // * * 00011 // ******************************************************************** 00012 // History: 00013 // -------- 00014 // 25 Oct 2004 L.Pandola First implementation 00015 00016 #include "generators/MaGeDecay0Interface.hh" 00017 #include "generators/MaGeDecay0InterfaceMessenger.hh" 00018 #include "G4UIdirectory.hh" 00019 #include "G4UIcmdWithAString.hh" 00020 #include "G4UIcommand.hh" 00021 #include "G4UImessenger.hh" 00022 00023 MaGeDecay0InterfaceMessenger::MaGeDecay0InterfaceMessenger(MaGeDecay0Interface* ptr) : 00024 fPointerToInterface(ptr) 00025 { 00026 fDirectory = new G4UIdirectory("/MJ/generator/decay0/"); 00027 fDirectory->SetGuidance("Control of Decay0 event generator"); 00028 00029 fCommand = new G4UIcmdWithAString("/MJ/generator/decay0/filename",this); 00030 fCommand->SetGuidance("Set the file name for decay0 events"); 00031 } 00032 00033 MaGeDecay0InterfaceMessenger::~MaGeDecay0InterfaceMessenger() 00034 { 00035 delete fDirectory; 00036 delete fCommand; 00037 } 00038 00039 void MaGeDecay0InterfaceMessenger::SetNewValue(G4UIcommand* cmd,G4String str) 00040 { 00041 if (cmd == fCommand) 00042 { 00043 fPointerToInterface->ChangeFileName(str); 00044 } 00045 }