QwGeant4
QweakSimTrackingActionMessenger Class Reference

Scans the input file for /TrackingAction/xyz commands. More...

#include <QweakSimTrackingActionMessenger.hh>

Inherits G4UImessenger.

+ Collaboration diagram for QweakSimTrackingActionMessenger:

Public Member Functions

 QweakSimTrackingActionMessenger (QweakSimTrackingAction *)
 
 ~QweakSimTrackingActionMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 

Private Attributes

QweakSimTrackingActionmyTrackingAction
 
G4UIdirectory * TrackingActionDir
 
G4UIcmdWithAnInteger * TrackingFlag_Cmd
 

Detailed Description

Scans the input file for /TrackingAction/xyz commands.

Placeholder for a long explaination

Definition at line 59 of file QweakSimTrackingActionMessenger.hh.

Constructor & Destructor Documentation

QweakSimTrackingActionMessenger::QweakSimTrackingActionMessenger ( QweakSimTrackingAction myTA)

Definition at line 28 of file QweakSimTrackingActionMessenger.cc.

References TrackingActionDir, and TrackingFlag_Cmd.

29 :myTrackingAction(myTA)
30 {
31  // TrackingAction related
32  TrackingActionDir = new G4UIdirectory("/TrackingAction/");
33  TrackingActionDir -> SetGuidance("TrackingAction control.");
34 
35  TrackingFlag_Cmd = new G4UIcmdWithAnInteger("/TrackingAction/TrackingFlag",this);
36  TrackingFlag_Cmd->SetGuidance("Select tracking flag");
37  TrackingFlag_Cmd->SetGuidance(" 0 : Track primary electrons only");
38  TrackingFlag_Cmd->SetGuidance(" 1 : Track primary electrons and optical photons only");
39  TrackingFlag_Cmd->SetGuidance(" 2 : Track all particles except optical photons");
40  TrackingFlag_Cmd->SetGuidance(" 3 : Track all particles");
41  TrackingFlag_Cmd->SetParameterName("Store",true);
42  TrackingFlag_Cmd->SetDefaultValue(0);
43  TrackingFlag_Cmd->SetRange("Store >=0 && Store <= 3");
44  TrackingFlag_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
45 
46 }
QweakSimTrackingActionMessenger::~QweakSimTrackingActionMessenger ( )

Definition at line 50 of file QweakSimTrackingActionMessenger.cc.

References TrackingActionDir, and TrackingFlag_Cmd.

51 {
52  delete TrackingFlag_Cmd;
53  delete TrackingActionDir;
54 }

Member Function Documentation

void QweakSimTrackingActionMessenger::SetNewValue ( G4UIcommand *  command,
G4String  newValue 
)

Definition at line 58 of file QweakSimTrackingActionMessenger.cc.

References myTrackingAction, QweakSimTrackingAction::SetTrackingFlag(), and TrackingFlag_Cmd.

59 {
60  G4cout << "#### Calling QweakSimTrackingActionMessenger::SetNewValue() " << newValue << G4endl;
61 
62  if( command == TrackingFlag_Cmd )
63  {
64  G4cout << "#### Messenger: Setting Tracking Flag to " << newValue << G4endl;
65 
66  myTrackingAction->SetTrackingFlag(TrackingFlag_Cmd->GetNewIntValue(newValue));
67  }
68 
69  G4cout << "#### Leaving QweakSimTrackingActionMessenger::SetNewValue() " << newValue << G4endl;
70 }
void SetTrackingFlag(G4int myflag)

+ Here is the call graph for this function:

Field Documentation

QweakSimTrackingAction* QweakSimTrackingActionMessenger::myTrackingAction
private

Definition at line 69 of file QweakSimTrackingActionMessenger.hh.

Referenced by SetNewValue().

G4UIdirectory* QweakSimTrackingActionMessenger::TrackingActionDir
private
G4UIcmdWithAnInteger* QweakSimTrackingActionMessenger::TrackingFlag_Cmd
private

The documentation for this class was generated from the following files: