ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4NuclideTableMessenger.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4NuclideTableMessenger.cc
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 //---------------------------------------------------------------
27 //
28 // G4NuclideTableMessenger.cc
29 //
30 // Description:
31 // This is a messenger class to interface to exchange information
32 // between ParticleDefinition and UI.
33 //
34 // History:
35 // 11 November 2015, T. Koi : The 1st version created.
36 //---------------------------------------------------------------
37 
39 #include "G4UImanager.hh"
40 #include "G4UIdirectory.hh"
42 #include "G4UIcmdWithAnInteger.hh"
44 #include "G4UIcmdWithABool.hh"
45 
46 #include "G4NuclideTable.hh"
47 #include "G4ios.hh" // Include from 'system'
48 #include <iomanip> // Include from 'system'
49 
51  :theNuclideTable(nuclideTable)
52 {
53  //Commnad /particle/manage/nuclide
54  thisDirectory = new G4UIdirectory("/particle/nuclideTable/");
55  thisDirectory->SetGuidance("Nuclide table control commands.");
56 
58  lifetimeCmd = new G4UIcmdWithADoubleAndUnit("/particle/nuclideTable/min_halflife",this);
59  lifetimeCmd->SetGuidance("Set threshold of half-life.");
60  lifetimeCmd->SetGuidance("Unit of the time can be :");
61  lifetimeCmd->SetGuidance(" s, ms, ns (default)");
62  lifetimeCmd->SetParameterName("life",false);
63  lifetimeCmd->SetDefaultValue( 1000.0 );
64  lifetimeCmd->SetRange("life >0.0");
67 
69  lToleranceCmd = new G4UIcmdWithADoubleAndUnit("/particle/nuclideTable/level_tolerance",this);
70  lToleranceCmd->SetGuidance("Set tolerance in level searching.");
71  lToleranceCmd->SetGuidance("Unit of the energy can be :");
72  lToleranceCmd->SetGuidance(" MeV, keV, eV (default)");
73  lToleranceCmd->SetParameterName("lTolerance",false);
75  lToleranceCmd->SetRange("lTolerance >0.0");
78 
79 }
80 
82 {
83  delete thisDirectory;
84  delete lifetimeCmd;
85  delete lToleranceCmd;
86 }
87 
89 {
90  if (command == lifetimeCmd ) {
91  //Commnad /particle/manage/nuclideTable/min_halflife
93  } else if (command == lToleranceCmd ) {
94  //Commnad /particle/manage/nuclideTable/level_tolerance
96  }
97 }