QwGeant4
QweakSimEventActionMessenger Class Reference

Messenger for filling//storing the hit event structure at the end of an event. More...

#include <QweakSimEventActionMessenger.hh>

Inherits G4UImessenger.

+ Collaboration diagram for QweakSimEventActionMessenger:

Public Member Functions

 QweakSimEventActionMessenger (QweakSimEventAction *)
 
 ~QweakSimEventActionMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 
void SetNewValue (G4UIcommand *, G4int)
 

Private Attributes

QweakSimEventActiontheEventAction
 
G4UIdirectory * theTriggerDir
 
G4UIcmdWithoutParameter * theTriggerShowCommand
 
G4UIcmdWithAString * theTriggerEnableCommand
 
G4UIcmdWithAString * theTriggerDisableCommand
 
G4UIcmdWithABool * thePrintHitsCommand
 

Detailed Description

Messenger for filling//storing the hit event structure at the end of an event.

Placeholder for a long explanation

Definition at line 45 of file QweakSimEventActionMessenger.hh.

Constructor & Destructor Documentation

QweakSimEventActionMessenger::QweakSimEventActionMessenger ( QweakSimEventAction anEventAction)

Definition at line 27 of file QweakSimEventActionMessenger.cc.

References thePrintHitsCommand, theTriggerDir, theTriggerDisableCommand, theTriggerEnableCommand, and theTriggerShowCommand.

28  : theEventAction(anEventAction)
29 {
30  G4cout << G4endl << "###### Calling QweakSimEventActionMessenger::QweakSimEventActionMessenger() " << G4endl << G4endl;
31 
32  theTriggerDir = new G4UIdirectory( "/Trigger/" );
33  theTriggerDir->SetGuidance("Software trigger.");
34 
35  theTriggerShowCommand = new G4UIcmdWithoutParameter("/Trigger/Show", this);
36  theTriggerShowCommand->SetGuidance("List trigger conditions.");
37  theTriggerShowCommand->AvailableForStates(G4State_PreInit,G4State_Idle);
38 
39  theTriggerEnableCommand = new G4UIcmdWithAString("/Trigger/Enable", this);
40  theTriggerEnableCommand->SetParameterName("trigger condition", false);
41  theTriggerEnableCommand->SetDefaultValue("3fold");
42  theTriggerEnableCommand->SetGuidance("Enable trigger condition.");
43  theTriggerEnableCommand->AvailableForStates(G4State_Idle);
44 
45  theTriggerDisableCommand = new G4UIcmdWithAString("/Trigger/Disable", this);
46  theTriggerDisableCommand->SetParameterName("trigger condition", false);
47  theTriggerDisableCommand->SetDefaultValue("3fold");
48  theTriggerDisableCommand->SetGuidance("Disable trigger condition.");
49  theTriggerDisableCommand->AvailableForStates(G4State_Idle);
50 
51  thePrintHitsCommand = new G4UIcmdWithABool("/Trigger/PrintHits", this);
52  thePrintHitsCommand->SetParameterName("printhits",true);
53  thePrintHitsCommand->SetDefaultValue("true");
54  thePrintHitsCommand->AvailableForStates(G4State_Init,G4State_Idle);
55 
56  G4cout << G4endl << "###### Leaving QweakSimEventActionMessenger::QweakSimEventActionMessenger() " << G4endl << G4endl;
57 }
G4UIcmdWithoutParameter * theTriggerShowCommand
QweakSimEventActionMessenger::~QweakSimEventActionMessenger ( )

Definition at line 61 of file QweakSimEventActionMessenger.cc.

References thePrintHitsCommand, theTriggerDir, theTriggerDisableCommand, theTriggerEnableCommand, and theTriggerShowCommand.

62 {
63  G4cout << G4endl << "###### Calling QweakSimEventActionMessenger::~QweakSimEventActionMessenger() " << G4endl << G4endl;
64 
69  if (theTriggerDir) delete theTriggerDir;
70 
71  G4cout << G4endl << "###### Leaving QweakSimEventActionMessenger::~QweakSimEventActionMessenger() " << G4endl << G4endl;
72 }
G4UIcmdWithoutParameter * theTriggerShowCommand

Member Function Documentation

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

Definition at line 76 of file QweakSimEventActionMessenger.cc.

References QweakSimEventAction::DisableTrigger(), QweakSimEventAction::EnableTrigger(), QweakSimEventAction::SetPrintHits(), QweakSimEventAction::ShowTrigger(), theEventAction, thePrintHitsCommand, theTriggerDisableCommand, theTriggerEnableCommand, and theTriggerShowCommand.

77 {
78  if ( command == theTriggerShowCommand )
79  {
81  }
82  if ( command == theTriggerEnableCommand )
83  {
84  theEventAction->EnableTrigger(newValue);
85  }
86  if ( command == theTriggerDisableCommand )
87  {
88  theEventAction->DisableTrigger(newValue);
89  }
90  if ( command == thePrintHitsCommand )
91  {
92  theEventAction->SetPrintHits(thePrintHitsCommand->GetNewBoolValue(newValue));
93  }
94 }
void EnableTrigger(const G4String value)
G4UIcmdWithoutParameter * theTriggerShowCommand
void SetPrintHits(bool value)
void DisableTrigger(const G4String value)

+ Here is the call graph for this function:

void QweakSimEventActionMessenger::SetNewValue ( G4UIcommand *  ,
G4int   
)

Field Documentation

QweakSimEventAction* QweakSimEventActionMessenger::theEventAction
private

Definition at line 58 of file QweakSimEventActionMessenger.hh.

Referenced by SetNewValue().

G4UIcmdWithABool* QweakSimEventActionMessenger::thePrintHitsCommand
private
G4UIdirectory* QweakSimEventActionMessenger::theTriggerDir
private
G4UIcmdWithAString* QweakSimEventActionMessenger::theTriggerDisableCommand
private
G4UIcmdWithAString* QweakSimEventActionMessenger::theTriggerEnableCommand
private
G4UIcmdWithoutParameter* QweakSimEventActionMessenger::theTriggerShowCommand
private

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