EDepSimUserPrimaryGeneratorMessenger.hh
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////
2 // $Id: EDepSim::UserPrimaryGeneratorMessenger.hh,v 1.9 2012/05/10 16:27:26 mcgrew Exp $
3 //
4 #ifndef EDepSim_UserPrimaryGeneratorMessenger_h
5 #define EDepSim_UserPrimaryGeneratorMessenger_h 1
6 
7 #include <map>
8 
9 #include "G4UImessenger.hh"
10 #include "globals.hh"
11 
12 namespace EDepSim {class UserPrimaryGeneratorAction;}
13 namespace EDepSim {class VKinematicsFactory;}
14 namespace EDepSim {class VCountFactory;}
15 namespace EDepSim {class VPositionFactory;}
16 namespace EDepSim {class VTimeFactory;}
17 namespace EDepSim {class PrimaryGenerator;}
18 
19 class G4UIdirectory;
20 class G4UIcmdWithoutParameter;
21 class G4UIcmdWithAString;
22 class G4UIcmdWithABool;
23 
24 namespace EDepSim {class UserPrimaryGeneratorMessenger;}
25 class EDepSim::UserPrimaryGeneratorMessenger: public G4UImessenger {
26 public:
29 
30  /// Handle messages from the UI processor.
31  void SetNewValue(G4UIcommand*, G4String);
32 
33  /// Get the base directory for the messenger commands.
34  G4String GetPath();
35 
36  /// Add a new kinematics factory to the messenger.
38 
39  /// Set the current kinematics factory for the messenger.
40  void SetKinematicsFactory(const G4String& factory);
41 
42  /// Get the list of kinematics factories available to the messenger.
43  G4String GetKinematicsFactories();
44 
45  /// Add a new count factory to the messenger.
47 
48  /// Set the current count factory for the messenger.
49  void SetCountFactory(const G4String& factory);
50 
51  /// Get the list of count factories available to the messenger.
52  G4String GetCountFactories();
53 
54  /// Add a new position factory to the messenger.
56 
57  /// Set the current position factory for the messenger.
58  void SetPositionFactory(const G4String& factory);
59 
60  /// Get the list of position factories available to the messenger.
61  G4String GetPositionFactories();
62 
63  /// Add a new time factory to the messenger.
65 
66  /// Set the current time factory for the messenger.
67  void SetTimeFactory(const G4String& factory);
68 
69  /// Get the list of time factories available to the messenger.
70  G4String GetTimeFactories();
71 
72  /// Create a new generator using the current generator factories.
74 
75 private:
77 
78  /// The list of available kinematics factories;
79  std::map<G4String,EDepSim::VKinematicsFactory*> fKinematicsFactories;
80 
81  /// The current kinematics factory
83 
84  /// The list of available count factories;
85  std::map<G4String,EDepSim::VCountFactory*> fCountFactories;
86 
87  /// The current count factory
89 
90  /// The list of available position factories;
91  std::map<G4String,EDepSim::VPositionFactory*> fPositionFactories;
92 
93  /// The current position factory
95 
96  /// The list of available time factories;
97  std::map<G4String,EDepSim::VTimeFactory*> fTimeFactories;
98 
99  /// The current time factory
101 
102  G4UIdirectory* fDir;
103  G4UIdirectory* fKinematicsDir;
104  G4UIdirectory* fCountDir;
105  G4UIdirectory* fPositionDir;
106  G4UIdirectory* fTimeDir;
107 
108  G4UIcmdWithoutParameter* fClearCMD;
109  G4UIcmdWithoutParameter* fAddCMD;
110  G4UIcommand* fCombineCMD;
111  G4UIcmdWithAString* fSetKinematicsCMD;
112  G4UIcmdWithAString* fSetCountCMD;
113  G4UIcmdWithAString* fSetPositionCMD;
114  G4UIcmdWithAString* fSetTimeCMD;
115  G4UIcmdWithABool* fAllowEmptyEventsCMD;
116  G4UIcmdWithABool* fAddFakeGeantinoCMD;
117  G4UIcmdWithABool* fAllowPartialEventsCMD;
118 
119 };
120 #endif
void SetTimeFactory(const G4String &factory)
Set the current time factory for the messenger.
std::map< G4String, EDepSim::VTimeFactory * > fTimeFactories
The list of available time factories;.
std::map< G4String, EDepSim::VPositionFactory * > fPositionFactories
The list of available position factories;.
void SetPositionFactory(const G4String &factory)
Set the current position factory for the messenger.
G4String GetTimeFactories()
Get the list of time factories available to the messenger.
EDepSim::VTimeFactory * fTime
The current time factory.
EDepSim::VCountFactory * fCount
The current count factory.
EDepSim::PrimaryGenerator * CreateGenerator()
Create a new generator using the current generator factories.
void SetKinematicsFactory(const G4String &factory)
Set the current kinematics factory for the messenger.
G4String GetCountFactories()
Get the list of count factories available to the messenger.
G4String GetPositionFactories()
Get the list of position factories available to the messenger.
void SetNewValue(G4UIcommand *, G4String)
Handle messages from the UI processor.
Construct a module from components.
Definition: TG4HitSegment.h:10
void AddTimeFactory(EDepSim::VTimeFactory *factory)
Add a new time factory to the messenger.
UserPrimaryGeneratorMessenger(EDepSim::UserPrimaryGeneratorAction *)
G4String GetKinematicsFactories()
Get the list of kinematics factories available to the messenger.
G4String GetPath()
Get the base directory for the messenger commands.
void AddCountFactory(EDepSim::VCountFactory *factory)
Add a new count factory to the messenger.
std::map< G4String, EDepSim::VCountFactory * > fCountFactories
The list of available count factories;.
std::map< G4String, EDepSim::VKinematicsFactory * > fKinematicsFactories
The list of available kinematics factories;.
void SetCountFactory(const G4String &factory)
Set the current count factory for the messenger.
void AddPositionFactory(EDepSim::VPositionFactory *factory)
Add a new position factory to the messenger.
EDepSim::VKinematicsFactory * fKinematics
The current kinematics factory.
void AddKinematicsFactory(EDepSim::VKinematicsFactory *factory)
Add a new kinematics factory to the messenger.
EDepSim::VPositionFactory * fPosition
The current position factory.