GGS(GenericGEANT4Simulation)Software  2.99.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Macros
GGSMUAMessenger.h
Go to the documentation of this file.
1 /*
2  * GGSMUAMessenger.h
3  *
4  * Created on: 10 Nov 2020
5  * Author: Nicola Mori
6  */
7 
10 #ifndef GGSMUAMESSENGER_H_
11 #define GGSMUAMESSENGER_H_
12 
13 class GGSMultiUserAction;
14 
15 #include "G4UIcmdWithAString.hh"
16 #include "G4UImessenger.hh"
17 class G4VUserPrimaryGeneratorAction;
18 
19 #include <memory>
20 
22 class GGSMUAMessenger : public G4UImessenger {
23 
24 public:
25  GGSMUAMessenger(GGSMultiUserAction *muAction, const G4String &path, const G4String &dsc);
26  void SetNewValue(G4UIcommand *command, G4String newValue);
27 
28 private:
29  void CreateCommands(const std::vector<std::string> &userActionClasses);
30  void BuildAction(const std::string &actionClassName);
31 
32  GGSMultiUserAction *_muAction;
33  std::vector<std::unique_ptr<G4UIcommand>> _uaBuildCommands;
34  G4UIcmdWithAString _gaBuildCommand;
35  std::unique_ptr<G4VUserPrimaryGeneratorAction> _genForMaster;
36 };
37 
38 #endif /* GGSMUAMESSENGER_H_ */
A multiplexer container for user actions.
Messenger class for GGSMultiUserAction.