21 _cmdDir =
new G4UIdirectory(
"/GGS/userActions/MCTruthAction/");
22 _cmdDir->SetGuidance(
"Commands for hadronic interaction info action.");
24 _outBaseCmd =
new G4UIcmdWithAString(
"/GGS/userActions/MCTruthAction/fileBase",
this);
25 _outBaseCmd->SetGuidance(
"Sets the base name for ROOT output file");
26 _outBaseCmd->SetGuidance(
" Can be with or without extension (.root will be used automatically)");
27 _outBaseCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
29 _outTreeCmd =
new G4UIcmdWithAString(
"/GGS/userActions/MCTruthAction/treeName",
this);
30 _outTreeCmd->SetGuidance(
"Set the name of the TTree object in the ROOT output file.");
31 _outTreeCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
47 if (command == _outBaseCmd)
50 if (command == _outTreeCmd)
GGSMCTruthMessenger(GGSMCTruthAction *action)
Constructor.
void SetOutputFileBase(const std::string &outFileBase)
Sets the output file base name.
void SetOutputTreeName(const std::string &outTreeName)
Sets the output tree name.
void SetNewValue(G4UIcommand *command, G4String newValue)
Override of SetNewValue method.
~GGSMCTruthMessenger()
Destructor.
Saves MC truth for each event.