QwGeant4
QweakSimAnalysisMessenger Class Reference

#include <QweakSimAnalysisMessenger.hh>

Inherits G4UImessenger.

+ Collaboration diagram for QweakSimAnalysisMessenger:

Public Member Functions

 QweakSimAnalysisMessenger (QweakSimAnalysis *analysis)
 
virtual ~QweakSimAnalysisMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 

Private Member Functions

 QweakSimAnalysisMessenger ()
 

Private Attributes

QweakSimAnalysispAnalysis
 
G4UIdirectory * fAnalysisDir
 
G4UIcmdWithAString * fRootFileStemCmd
 
G4UIcmdWithAString * fRootFileNameCmd
 

Detailed Description

Definition at line 20 of file QweakSimAnalysisMessenger.hh.

Constructor & Destructor Documentation

QweakSimAnalysisMessenger::QweakSimAnalysisMessenger ( QweakSimAnalysis analysis)

Definition at line 18 of file QweakSimAnalysisMessenger.cc.

References fAnalysisDir, fRootFileNameCmd, and fRootFileStemCmd.

19 : pAnalysis(analysis)
20 {
21  G4cout << "###### Calling QweakSimAnalysisMessenger::QweakSimAnalysisMessenger() " << G4endl;
22 
23  fAnalysisDir = new G4UIdirectory("/Analysis/");
24  fAnalysisDir->SetGuidance("Analysis control");
25 
26  fRootFileStemCmd = new G4UIcmdWithAString("/Analysis/RootFileStem",this);
27  fRootFileStemCmd->SetGuidance("Set stem of file with output ROOT tree");
28  fRootFileStemCmd->SetParameterName("RootFileStem",false);
29  fRootFileStemCmd->SetDefaultValue("QwSim");
30  fRootFileStemCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
31 
32  fRootFileNameCmd = new G4UIcmdWithAString("/Analysis/RootFileName",this);
33  fRootFileNameCmd->SetGuidance("Set file name of output ROOT tree");
34  fRootFileNameCmd->SetParameterName("RootFileName",false);
35  fRootFileNameCmd->SetDefaultValue("QwSim.root");
36  fRootFileNameCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
37 
38  G4cout << "###### Leaving QweakSimAnalysisMessenger::QweakSimAnalysisMessenger() " << G4endl;
39 }
QweakSimAnalysisMessenger::~QweakSimAnalysisMessenger ( )
virtual

Definition at line 41 of file QweakSimAnalysisMessenger.cc.

References fAnalysisDir, fRootFileNameCmd, and fRootFileStemCmd.

42 {
43  G4cout << "###### Calling QweakSimAnalysisMessenger::~QweakSimAnalysisMessenger() " << G4endl;
44 
47  if (fAnalysisDir) delete fAnalysisDir;
48 
49  G4cout << "###### Leaving QweakSimAnalysisMessenger::~QweakSimAnalysisMessenger() " << G4endl;
50 }
QweakSimAnalysisMessenger::QweakSimAnalysisMessenger ( )
private

Member Function Documentation

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

Definition at line 52 of file QweakSimAnalysisMessenger.cc.

References fRootFileNameCmd, fRootFileStemCmd, pAnalysis, QweakSimAnalysis::SetRootFileName(), and QweakSimAnalysis::SetRootFileStem().

53 {
54  if (command == fRootFileStemCmd)
55  {
56  G4cout << "#### Messenger: Setting Analysis ROOT file stem to " << newValue << G4endl;
57  pAnalysis->SetRootFileStem(newValue);
58  }
59  if (command == fRootFileNameCmd)
60  {
61  G4cout << "#### Messenger: Setting Analysis ROOT file name to " << newValue << G4endl;
62  pAnalysis->SetRootFileName(newValue);
63  }
64 }
void SetRootFileName(const G4String &name)
void SetRootFileStem(const G4String &stem)

+ Here is the call graph for this function:

Field Documentation

G4UIdirectory* QweakSimAnalysisMessenger::fAnalysisDir
private
G4UIcmdWithAString* QweakSimAnalysisMessenger::fRootFileNameCmd
private
G4UIcmdWithAString* QweakSimAnalysisMessenger::fRootFileStemCmd
private
QweakSimAnalysis* QweakSimAnalysisMessenger::pAnalysis
private

Definition at line 38 of file QweakSimAnalysisMessenger.hh.

Referenced by SetNewValue().


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