#include <G4EvManMessenger.hh>
Inheritance diagram for G4EvManMessenger:
Public Member Functions | |
G4EvManMessenger (G4EventManager *fEvMan) | |
~G4EvManMessenger () | |
void | SetNewValue (G4UIcommand *command, G4String newValues) |
G4String | GetCurrentValue (G4UIcommand *command) |
Definition at line 48 of file G4EvManMessenger.hh.
G4EvManMessenger::G4EvManMessenger | ( | G4EventManager * | fEvMan | ) |
Definition at line 37 of file G4EvManMessenger.cc.
References G4UIcommand::AvailableForStates(), G4State_EventProc, G4UIcommand::SetGuidance(), G4UIcmdWithAnInteger::SetParameterName(), and G4UIcommand::SetRange().
00038 :fEvManager(fEvMan) 00039 { 00040 eventDirectory = new G4UIdirectory("/event/"); 00041 eventDirectory->SetGuidance("EventManager control commands."); 00042 00043 abortCmd = new G4UIcmdWithoutParameter("/event/abort",this); 00044 abortCmd->SetGuidance("Abort current event."); 00045 abortCmd->AvailableForStates(G4State_EventProc); 00046 00047 verboseCmd = new G4UIcmdWithAnInteger("/event/verbose",this); 00048 verboseCmd->SetGuidance("Set Verbose level of event management category."); 00049 verboseCmd->SetGuidance(" 0 : Silent"); 00050 verboseCmd->SetGuidance(" 1 : Stacking information"); 00051 verboseCmd->SetGuidance(" 2 : More..."); 00052 verboseCmd->SetParameterName("level",false); 00053 verboseCmd->SetRange("level>=0"); 00054 00055 storeEvtCmd = new G4UIcmdWithoutParameter("/event/keepCurrentEvent",this); 00056 storeEvtCmd->SetGuidance("Store the current event to G4Run object instead of deleting it at the end of event."); 00057 storeEvtCmd->SetGuidance("Stored event is available through G4Run until the begining of next run."); 00058 storeEvtCmd->SetGuidance("Given the potential large memory size of G4Event and its datamember objects stored in G4Event,"); 00059 storeEvtCmd->SetGuidance("the user must be careful and responsible for not to store too many G4Event objects."); 00060 storeEvtCmd->AvailableForStates(G4State_EventProc); 00061 }
G4EvManMessenger::~G4EvManMessenger | ( | ) |
Definition at line 63 of file G4EvManMessenger.cc.
00064 { 00065 delete abortCmd; 00066 delete verboseCmd; 00067 delete storeEvtCmd; 00068 delete eventDirectory; 00069 }
G4String G4EvManMessenger::GetCurrentValue | ( | G4UIcommand * | command | ) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 81 of file G4EvManMessenger.cc.
References G4UIcommand::ConvertToString(), and G4EventManager::GetVerboseLevel().
00082 { 00083 G4String cv; 00084 if( command == verboseCmd ) 00085 { cv = verboseCmd->ConvertToString(fEvManager->GetVerboseLevel()); } 00086 return cv; 00087 }
void G4EvManMessenger::SetNewValue | ( | G4UIcommand * | command, | |
G4String | newValues | |||
) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 71 of file G4EvManMessenger.cc.
References G4EventManager::AbortCurrentEvent(), G4UIcmdWithAnInteger::GetNewIntValue(), G4EventManager::KeepTheCurrentEvent(), and G4EventManager::SetVerboseLevel().
00072 { 00073 if( command == verboseCmd ) 00074 { fEvManager->SetVerboseLevel(verboseCmd->GetNewIntValue(newValues)); } 00075 if( command == abortCmd ) 00076 { fEvManager->AbortCurrentEvent(); } 00077 if( command == storeEvtCmd ) 00078 { fEvManager->KeepTheCurrentEvent(); } 00079 }