00001 //---------------------------------------------------------------------------// 00002 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu// 00003 // // 00004 // MAJORANA Simulation // 00005 // // 00006 // This code implementation is the intellectual property of the // 00007 // MAJORANA Collaboration. It is based on Geant4, an intellectual // 00008 // property of the RD44 GEANT4 collaboration. // 00009 // // 00010 // ********************* // 00011 // // 00012 // Neither the authors of this software system, nor their employing // 00013 // institutes, nor the agencies providing financial support for this // 00014 // work make any representation or warranty, express or implied, // 00015 // regarding this software system or assume any liability for its use. // 00016 // By copying, distributing or modifying the Program (or any work based // 00017 // on on the Program) you indicate your acceptance of this statement, // 00018 // and all its terms. // 00019 // // 00020 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu// 00021 //---------------------------------------------------------------------------// 00022 // 00023 // $Id: MJProcessesMessenger.cc,v 1.2 2004/11/09 13:42:39 xliu Exp $ 00024 // 00025 // CLASS IMPLEMENTATION: MJProcessesMessenger.cc 00026 // 00027 //---------------------------------------------------------------------------// 00033 // 00034 //---------------------------------------------------------------------------// 00045 //---------------------------------------------------------------------------// 00046 // 00047 00048 //#include <systemG4Stuff.hh> //additional system Headers 00049 //#include "globalsStuff.hh" //additional Global Headers 00050 //#include "G4Stuff.hh" //additional G4 Class Headers 00051 //#include "MJStuff.hh" //additional MJ Headers 00052 00053 //---------------------------------------------------------------------------// 00054 00055 // MJ headers 00056 #include "processes/MJProcessesMessenger.hh" //Present MJ Class Headers 00057 #include "processes/MJProcessesList.hh" 00058 00059 // GEANT4 headers 00060 #include "G4UIdirectory.hh" 00061 #include "G4UIcmdWithAString.hh" 00062 #include "globals.hh" 00063 00064 00065 //---------------------------------------------------------------------------// 00066 MJProcessesMessenger::MJProcessesMessenger( MJProcessesList *list ) : 00067 theList( list ) 00068 { 00069 MJProcessesDir = new G4UIdirectory( "/MJ/processes/" ); 00070 MJProcessesDir->SetGuidance( "UI commands to control the energy realm of the simulation" ); 00071 00072 // /MJ/processes/realm 00073 MJProcessesChoiceCommand = new G4UIcmdWithAString( "/MJ/processes/realm", this ); 00074 MJProcessesChoiceCommand->SetGuidance( "Select the simulation realm" ); 00075 MJProcessesChoiceCommand->SetParameterName( "simRealm", false ); 00076 MJProcessesChoiceCommand->SetCandidates( "BBdecay DarkMatter" ); 00077 MJProcessesChoiceCommand->AvailableForStates( G4State_PreInit, G4State_Idle ); 00078 } 00079 00080 //---------------------------------------------------------------------------// 00081 //MJProcessesMessenger::MJProcessesMessenger(const MJProcessesMessenger & other) 00082 //{ 00083 // 00084 //} 00085 00086 //---------------------------------------------------------------------------// 00087 MJProcessesMessenger::~MJProcessesMessenger() 00088 { 00089 delete MJProcessesChoiceCommand; 00090 delete MJProcessesDir; 00091 } 00092 00093 //---------------------------------------------------------------------------// 00094 void MJProcessesMessenger::SetNewValue( G4UIcommand *command, G4String newValue ) 00095 { 00096 00097 if( command == MJProcessesChoiceCommand ) 00098 theList->SetRealm( newValue ); 00099 }