Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // 23 // >> 24 // $Id: XrayFluoEventActionMessenger.cc >> 25 // GEANT4 tag $Name: xray_fluo-V03-02-00 27 // 26 // 28 // Author: Elena Guardincerri (Elena.Guardince 27 // Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) 29 // 28 // 30 // History: 29 // History: 31 // ----------- 30 // ----------- 32 // 28 Nov 2001 Elena Guardincerri Created 31 // 28 Nov 2001 Elena Guardincerri Created 33 // 32 // 34 // ------------------------------------------- 33 // ------------------------------------------------------------------- 35 34 36 #include "XrayFluoEventActionMessenger.hh" 35 #include "XrayFluoEventActionMessenger.hh" 37 36 38 #include "XrayFluoEventAction.hh" 37 #include "XrayFluoEventAction.hh" 39 #include "G4UIcmdWithAString.hh" 38 #include "G4UIcmdWithAString.hh" 40 #include "G4UIcmdWithAnInteger.hh" 39 #include "G4UIcmdWithAnInteger.hh" 41 #include "globals.hh" 40 #include "globals.hh" 42 #include "G4ios.hh" 41 #include "G4ios.hh" 43 42 44 //....oooOO0OOooo........oooOO0OOooo........oo 43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 45 44 46 XrayFluoEventActionMessenger::XrayFluoEventAct 45 XrayFluoEventActionMessenger::XrayFluoEventActionMessenger(XrayFluoEventAction* EvAct) 47 :eventAction(EvAct) 46 :eventAction(EvAct) 48 { 47 { 49 DrawCmd = new G4UIcmdWithAString("/event/dra 48 DrawCmd = new G4UIcmdWithAString("/event/drawTracks",this); 50 DrawCmd->SetGuidance("Draw the tracks in the 49 DrawCmd->SetGuidance("Draw the tracks in the event"); 51 DrawCmd->SetGuidance(" Choice : none, charg 50 DrawCmd->SetGuidance(" Choice : none, charged(default),neutral, all"); 52 DrawCmd->SetParameterName("choice",true); 51 DrawCmd->SetParameterName("choice",true); 53 DrawCmd->SetDefaultValue("all"); 52 DrawCmd->SetDefaultValue("all"); 54 DrawCmd->SetCandidates("none charged neutral 53 DrawCmd->SetCandidates("none charged neutral all"); 55 DrawCmd->AvailableForStates(G4State_Idle); 54 DrawCmd->AvailableForStates(G4State_Idle); 56 55 57 PrintCmd = new G4UIcmdWithAnInteger("/event/ 56 PrintCmd = new G4UIcmdWithAnInteger("/event/printModulo",this); 58 PrintCmd->SetGuidance("Print events modulo n 57 PrintCmd->SetGuidance("Print events modulo n"); 59 PrintCmd->SetParameterName("EventNb",false); 58 PrintCmd->SetParameterName("EventNb",false); 60 PrintCmd->SetRange("EventNb>0"); 59 PrintCmd->SetRange("EventNb>0"); 61 PrintCmd->AvailableForStates(G4State_Idle); 60 PrintCmd->AvailableForStates(G4State_Idle); 62 } 61 } 63 62 64 //....oooOO0OOooo........oooOO0OOooo........oo 63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 65 64 66 XrayFluoEventActionMessenger::~XrayFluoEventAc 65 XrayFluoEventActionMessenger::~XrayFluoEventActionMessenger() 67 { 66 { 68 delete DrawCmd; 67 delete DrawCmd; 69 delete PrintCmd; 68 delete PrintCmd; 70 } 69 } 71 70 72 //....oooOO0OOooo........oooOO0OOooo........oo 71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 73 72 74 void XrayFluoEventActionMessenger::SetNewValue 73 void XrayFluoEventActionMessenger::SetNewValue(G4UIcommand * command,G4String newValue) 75 { 74 { 76 if(command == DrawCmd) 75 if(command == DrawCmd) 77 {eventAction->SetDrawFlag(newValue);} 76 {eventAction->SetDrawFlag(newValue);} 78 77 79 if(command == PrintCmd) 78 if(command == PrintCmd) 80 {eventAction->SetPrintModulo(PrintCmd->Get 79 {eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));} 81 } 80 } 82 81 83 //....oooOO0OOooo........oooOO0OOooo........oo 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 84 83 85 84 86 85 87 86 88 87 89 88 90 89 91 90