ACTARSim
ACTAR TPC Simulation Reference Guide
G4StepLimiterMessenger.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * DISCLAIMER *
4 // * *
5 // * The following disclaimer summarizes all the specific disclaimers *
6 // * of contributors to this software. The specific disclaimers,which *
7 // * govern, are listed with their locations in: *
8 // * http://cern.ch/geant4/license *
9 // * *
10 // * Neither the authors of this software system, nor their employing *
11 // * institutes,nor the agencies providing financial support for this *
12 // * work make any representation or warranty, express or implied, *
13 // * regarding this software system or assume any liability for its *
14 // * use. *
15 // * *
16 // * This code implementation is the intellectual property of the *
17 // * GEANT4 collaboration. *
18 // * By copying, distributing or modifying the Program (or any work *
19 // * based on the Program) you indicate your acceptance of this *
20 // * statement, and all its terms. *
21 // ********************************************************************
22 //
23 // $Id: G4StepLimiterMessenger.cc,v 1.1 2004/12/02 10:34:08 vnivanch Exp $
24 // GEANT4 tag $Name: geant4-08-00-patch-01 $
25 //
26 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
27 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
28 
30 
32 #include "G4UIcmdWithADoubleAndUnit.hh"
33 #include "globals.hh"
34 
35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
36 
38 :stepLimiter(stepM)
39 {
40  stepMaxCmd = new G4UIcmdWithADoubleAndUnit("/ActarSim/phys/stepMax",this);
41  stepMaxCmd->SetGuidance("Set max allowed step length for the default region");
42  stepMaxCmd->SetParameterName("mxStep",false);
43  stepMaxCmd->SetRange("mxStep>0.");
44  stepMaxCmd->SetUnitCategory("Length");
45  stepMaxCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
46 }
47 
48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49 
51 {
52  delete stepMaxCmd;
53 }
54 
55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
56 
57 void G4StepLimiterMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
58 {
59  if (command == stepMaxCmd)
60  { stepLimiter->SetMaxStep(stepMaxCmd->GetNewDoubleValue(newValue));}
61 }
62 
63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4UIcmdWithADoubleAndUnit * stepMaxCmd
G4StepLimiterMessenger(G4StepLimiterPerRegion *)
G4StepLimiterPerRegion * stepLimiter
void SetNewValue(G4UIcommand *, G4String)