Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LXeEventMessenger.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: LXeEventMessenger.cc 70256 2013-05-28 07:29:30Z gcosmo $
27 //
28 /// \file optical/LXe/src/LXeEventMessenger.cc
29 /// \brief Implementation of the LXeEventMessenger class
30 //
31 //
32 #include "LXeEventMessenger.hh"
33 #include "LXeEventAction.hh"
34 
35 #include "G4UIcmdWithABool.hh"
36 #include "G4UIcmdWithAnInteger.hh"
37 
38 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
39 
41  : fLXeEvent(event)
42 {
43  fSaveThresholdCmd = new G4UIcmdWithAnInteger("/LXe/saveThreshold",this);
44  fSaveThresholdCmd->
45 SetGuidance("Set the photon count threshold for saving the random number seed");
46  fSaveThresholdCmd->SetParameterName("photons",true);
47  fSaveThresholdCmd->SetDefaultValue(4500);
49 
50  fVerboseCmd = new G4UIcmdWithAnInteger("/LXe/eventVerbose",this);
51  fVerboseCmd->SetGuidance("Set the verbosity of event data.");
52  fVerboseCmd->SetParameterName("verbose",true);
53  fVerboseCmd->SetDefaultValue(1);
54 
55  fPmtThresholdCmd = new G4UIcmdWithAnInteger("/LXe/pmtThreshold",this);
56  fPmtThresholdCmd->SetGuidance("Set the pmtThreshold (in # of photons)");
57 
58  fForceDrawPhotonsCmd=new G4UIcmdWithABool("/LXe/forceDrawPhotons",this);
59  fForceDrawPhotonsCmd->SetGuidance("Force drawing of photons.");
60  fForceDrawPhotonsCmd
61  ->SetGuidance("(Higher priority than /LXe/forceDrawNoPhotons)");
62 
63  fForceDrawNoPhotonsCmd=new G4UIcmdWithABool("/LXe/forceDrawNoPhotons",this);
64  fForceDrawNoPhotonsCmd->SetGuidance("Force no drawing of photons.");
65  fForceDrawNoPhotonsCmd
66  ->SetGuidance("(Lower priority than /LXe/forceDrawPhotons)");
67 }
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70 
72  delete fSaveThresholdCmd;
73  delete fVerboseCmd;
74  delete fPmtThresholdCmd;
75  delete fForceDrawPhotonsCmd;
76  delete fForceDrawNoPhotonsCmd;
77 }
78 
79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80 
82  if( command == fSaveThresholdCmd ){
83  fLXeEvent->SetSaveThreshold(fSaveThresholdCmd->GetNewIntValue(newValue));
84  }
85  else if( command == fVerboseCmd ){
86  fLXeEvent->SetEventVerbose(fVerboseCmd->GetNewIntValue(newValue));
87  }
88  else if( command == fPmtThresholdCmd ){
89  fLXeEvent->SetPMTThreshold(fPmtThresholdCmd->GetNewIntValue(newValue));
90  }
91  else if(command == fForceDrawPhotonsCmd){
92  fLXeEvent->SetForceDrawPhotons(fForceDrawPhotonsCmd
93  ->GetNewBoolValue(newValue));
94  }
95  else if(command == fForceDrawNoPhotonsCmd){
96  fLXeEvent->SetForceDrawNoPhotons(fForceDrawNoPhotonsCmd
97  ->GetNewBoolValue(newValue));
98  G4cout<<"TEST"<<G4endl;
99  }
100 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
LXeEventMessenger(LXeEventAction *)
void SetForceDrawNoPhotons(G4bool b)
virtual ~LXeEventMessenger()
G4GLOB_DLL std::ostream G4cout
void SetSaveThreshold(G4int)
Definition of the LXeEventAction class.
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:225
virtual void SetNewValue(G4UIcommand *, G4String)
void SetEventVerbose(G4int v)
void SetPMTThreshold(G4int t)
Definition of the LXeEventMessenger class.
#define G4endl
Definition: G4ios.hh:61
void SetDefaultValue(G4int defVal)
void SetForceDrawPhotons(G4bool b)