/[PAMELA software]/PamG4/src/SteppingActionMessenger.cc
ViewVC logotype

Contents of /PamG4/src/SteppingActionMessenger.cc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Tue Dec 13 16:20:39 2005 UTC (18 years, 11 months ago) by cafagna
Branch: start, MAIN
CVS Tags: v1r0, bogo, HEAD
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
Geant4 code for ND and Calorimeter

1
2
3 #include "SteppingActionMessenger.hh"
4 #include "SteppingAction.hh"
5
6 #include "globals.hh"
7 #include "G4UIdirectory.hh"
8 #include "G4UIcmdWithABool.hh"
9
10 SteppingActionMessenger::SteppingActionMessenger(SteppingAction* SA)
11 :SteppingAct(SA)
12 {
13 stepDirectory = new G4UIdirectory("/step/");
14 stepDirectory->SetGuidance("Step draw control command.");
15
16 drawStepCmd = new G4UIcmdWithABool("/step/draw",this);
17 drawStepCmd->SetGuidance("Draw each step on the fly. (default = true)");
18 drawStepCmd->SetParameterName("draw", true);
19 drawStepCmd->SetDefaultValue(true);
20 }
21
22 void SteppingActionMessenger::SetNewValue(G4UIcommand* command, G4String newValues)
23 {
24 if( command->GetCommandName() == "draw" )
25 {
26 G4int vl;
27 const char* t = newValues;
28 std::istrstream is((char*)t);
29 is >> vl;
30 SteppingAct->SetDrawFlag(vl!=0);
31 }
32 }
33
34 // 2005 by G.I.Vasilyev

  ViewVC Help
Powered by ViewVC 1.1.23