EDepSimVPrimaryFactory.hh
Go to the documentation of this file.
1 #ifndef EDepSim_VPrimaryFactory_hh_seen
2 #define EDepSim_VPrimaryFactory_hh_seen
3 
4 #include <G4UImessenger.hh>
5 #include <G4UIdirectory.hh>
6 #include <G4UIcommand.hh>
7 #include <G4UIparameter.hh>
8 #include <G4UIcmdWithoutParameter.hh>
9 #include <G4UIcmdWithABool.hh>
10 #include <G4UIcmdWithAnInteger.hh>
11 #include <G4UIcmdWithADouble.hh>
12 #include <G4UIcmdWithAString.hh>
13 #include <G4UIcmdWith3Vector.hh>
14 #include <G4UIcmdWithADoubleAndUnit.hh>
15 #include <G4UIcmdWith3VectorAndUnit.hh>
16 #include <G4SystemOfUnits.hh>
17 
19 
20 namespace EDepSim {class VPrimaryFactory;}
21 class EDepSim::VPrimaryFactory : public G4UImessenger {
22 public:
23  VPrimaryFactory(G4String subdir, G4String name,
25  bool makeDirectory);
26  virtual ~VPrimaryFactory();
27 
28  /// Return the full path for the factory. This returns the full name of
29  /// the EDepSim::VPrimaryFactory. It should be used as a prefix for any
30  /// messenger commands. The full path for the factory is constructed as
31  /// "<parent>/<subdir>/<localname>/".
32  G4String GetPath() const;
33 
34  /// Return the short name of this factory. This is used to identify it in
35  /// other messenger commands. The full path for the factory is
36  /// constructed as "<parent>/<subdir>/<name>/".
37  G4String GetName() const;
38 
39  /// Return the subdirectory name for this factory. The full path for the
40  /// factory is constructed as "<parent>/<subdir>/<name>/".
41  G4String GetSubDir() const;
42 
43  /// Handle messages from the UI processor.
44  virtual void SetNewValue(G4UIcommand*, G4String) {};
45 
46 protected:
47  /// Build a command name with the directory prefix.
48  G4String CommandName(G4String cmd) {
49  G4String name = GetPath() + cmd;
50  return name;
51  };
52 
53 private:
54  /// The short name of this factory.
55  G4String fName;
56 
57  /// The sub-directory holding this factory.
58  G4String fSubDirName;
59 
60  /// The messenger that is holding this set of sub-commands.
62 
63  /// The sub-directory for the local commands. The full name of the local
64  /// subdirectory is "<parent>/<subdir>/<name>/"
65  G4UIdirectory* fDir;
66 };
67 #endif
static QCString name
Definition: declinfo.cpp:673
virtual void SetNewValue(G4UIcommand *, G4String)
Handle messages from the UI processor.
VPrimaryFactory(G4String subdir, G4String name, EDepSim::UserPrimaryGeneratorMessenger *parent, bool makeDirectory)
EDepSim::UserPrimaryGeneratorMessenger * fParent
The messenger that is holding this set of sub-commands.
Construct a module from components.
Definition: TG4HitSegment.h:10
G4String fSubDirName
The sub-directory holding this factory.
G4String CommandName(G4String cmd)
Build a command name with the directory prefix.
G4String fName
The short name of this factory.
list cmd
Definition: getreco.py:22
def parent(G, child, parent_type)
Definition: graph.py:67