ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExGflashMessenger.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ExGflashMessenger.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 //
29 //
30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 
33 #include "ExGflashMessenger.hh"
35 
36 #include "G4UIdirectory.hh"
37 #include "G4UIcmdWithAString.hh"
38 #include "G4UIcmdWithAnInteger.hh"
39 #include "G4UIcmdWith3Vector.hh"
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
46 :G4UImessenger(),fDetector(Det)
47 {
48  fExGflashDir = new G4UIdirectory("/exgflash/");
49  fExGflashDir->SetGuidance(" Gflash example commands.");
50 
51  fVerbose = new G4UIcmdWithAnInteger("/exgflash/verbose",this);
52  fVerbose->SetGuidance("set exglash verbosity");
53  fVerbose->SetGuidance("0- silent, 1 - on exit, 2 - run , 3 - event");
54  fVerbose->SetParameterName("ver",false);
55  fVerbose->SetRange("ver >= 0");
58 
59  fDetDir = new G4UIdirectory("/exgflash/det/");
60  fDetDir->SetGuidance("detector construction commands");
61 
62  fMaterCmd = new G4UIcmdWithAString("/exgflash/det/setMat",this);
63  fMaterCmd->SetGuidance("Select Material.");
64  fMaterCmd->SetParameterName("material",false);
67 
68  fLBinCmd = new G4UIcmdWith3Vector("/exgflash/det/setLbin",this);
69  fLBinCmd->SetGuidance("set longitudinal bining");
70  fLBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
71  // must have omitable==true we use 2 values only
72  fLBinCmd->SetParameterName("nLtot","dLradl"," ",true);
73  fLBinCmd->SetRange("nLtot>=1 && dLradl>0");
76 
77  fRBinCmd = new G4UIcmdWith3Vector("/exgflash/det/setRbin",this);
78  fRBinCmd->SetGuidance("set radial bining");
79  fRBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
80  fRBinCmd->SetParameterName("nRtot","dRradl"," ",true);
81  fRBinCmd->SetRange("nRtot>=1 && dRradl>0");
84  }
85 
86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87 
89 {
90  delete fRBinCmd;
91  delete fLBinCmd;
92  delete fMaterCmd;
93  delete fDetDir;
94  delete fVerbose;
95  delete fExGflashDir;
96 }
97 
98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99 
101 {
102  if( command == fMaterCmd )
103  { fDetector->SetMaterial(newValue);}
104 
105  if( command == fVerbose )
107 
108  if( command == fLBinCmd )
110 
111  if( command == fRBinCmd )
113 }
114 
115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......