Public Member Functions | Protected Member Functions | Private Attributes | List of all members
EDepSim::VPrimaryFactory Class Reference

#include <EDepSimVPrimaryFactory.hh>

Inheritance diagram for EDepSim::VPrimaryFactory:
EDepSim::VCountFactory EDepSim::VKinematicsFactory EDepSim::VPositionFactory EDepSim::VTimeFactory EDepSim::FixedCountFactory EDepSim::MeanCountFactory EDepSim::GPSKinematicsFactory EDepSim::NuMIRockKinematicsFactory EDepSim::RooTrackerKinematicsFactory EDepSim::FixedPositionFactory EDepSim::FreePositionFactory EDepSim::VConstrainedPositionFactory EDepSim::FixedTimeFactory EDepSim::FreeTimeFactory EDepSim::SpillTimeFactory

Public Member Functions

 VPrimaryFactory (G4String subdir, G4String name, EDepSim::UserPrimaryGeneratorMessenger *parent, bool makeDirectory)
 
virtual ~VPrimaryFactory ()
 
G4String GetPath () const
 
G4String GetName () const
 
G4String GetSubDir () const
 
virtual void SetNewValue (G4UIcommand *, G4String)
 Handle messages from the UI processor. More...
 

Protected Member Functions

G4String CommandName (G4String cmd)
 Build a command name with the directory prefix. More...
 

Private Attributes

G4String fName
 The short name of this factory. More...
 
G4String fSubDirName
 The sub-directory holding this factory. More...
 
EDepSim::UserPrimaryGeneratorMessengerfParent
 The messenger that is holding this set of sub-commands. More...
 
G4UIdirectory * fDir
 

Detailed Description

Definition at line 21 of file EDepSimVPrimaryFactory.hh.

Constructor & Destructor Documentation

EDepSim::VPrimaryFactory::VPrimaryFactory ( G4String  subdir,
G4String  name,
EDepSim::UserPrimaryGeneratorMessenger parent,
bool  makeDirectory 
)

Definition at line 3 of file EDepSimVPrimaryFactory.cc.

6  {
7  fSubDirName = subdir;
8  fName = name;
9  fParent = parent;
10  if (makeDirectory) {
11  fDir = new G4UIdirectory(GetPath());
12  std::string guidance = "Control of the " + fName
13  + " " + fSubDirName + " factory.";
14  fDir->SetGuidance(guidance.c_str());
15  }
16  else fDir = NULL;
17 }
static QCString name
Definition: declinfo.cpp:673
std::string string
Definition: nybbler.cc:12
EDepSim::UserPrimaryGeneratorMessenger * fParent
The messenger that is holding this set of sub-commands.
G4String fSubDirName
The sub-directory holding this factory.
G4String fName
The short name of this factory.
def parent(G, child, parent_type)
Definition: graph.py:67
EDepSim::VPrimaryFactory::~VPrimaryFactory ( )
virtual

Definition at line 19 of file EDepSimVPrimaryFactory.cc.

19  {
20  if (fDir) delete fDir;
21 }

Member Function Documentation

G4String EDepSim::VPrimaryFactory::CommandName ( G4String  cmd)
inlineprotected

Build a command name with the directory prefix.

Definition at line 48 of file EDepSimVPrimaryFactory.hh.

48  {
49  G4String name = GetPath() + cmd;
50  return name;
51  };
static QCString name
Definition: declinfo.cpp:673
list cmd
Definition: getreco.py:22
G4String EDepSim::VPrimaryFactory::GetName ( void  ) const

Return the short name of this factory. This is used to identify it in other messenger commands. The full path for the factory is constructed as "<parent>/<subdir>/<name>/".

Definition at line 30 of file EDepSimVPrimaryFactory.cc.

30  {
31  return fName;
32 }
G4String fName
The short name of this factory.
G4String EDepSim::VPrimaryFactory::GetPath ( ) const

Return the full path for the factory. This returns the full name of the EDepSim::VPrimaryFactory. It should be used as a prefix for any messenger commands. The full path for the factory is constructed as "<parent>/<subdir>/<localname>/".

Definition at line 23 of file EDepSimVPrimaryFactory.cc.

23  {
24  G4String dirName = fParent->GetPath()
25  + GetSubDir() + "/"
26  + GetName() + "/";
27  return dirName;
28 }
EDepSim::UserPrimaryGeneratorMessenger * fParent
The messenger that is holding this set of sub-commands.
G4String GetPath()
Get the base directory for the messenger commands.
G4String EDepSim::VPrimaryFactory::GetSubDir ( ) const

Return the subdirectory name for this factory. The full path for the factory is constructed as "<parent>/<subdir>/<name>/".

Definition at line 34 of file EDepSimVPrimaryFactory.cc.

34  {
35  return fSubDirName;
36 }
G4String fSubDirName
The sub-directory holding this factory.
virtual void EDepSim::VPrimaryFactory::SetNewValue ( G4UIcommand *  ,
G4String   
)
inlinevirtual

Member Data Documentation

G4UIdirectory* EDepSim::VPrimaryFactory::fDir
private

The sub-directory for the local commands. The full name of the local subdirectory is "<parent>/<subdir>/<name>/"

Definition at line 65 of file EDepSimVPrimaryFactory.hh.

G4String EDepSim::VPrimaryFactory::fName
private

The short name of this factory.

Definition at line 51 of file EDepSimVPrimaryFactory.hh.

EDepSim::UserPrimaryGeneratorMessenger* EDepSim::VPrimaryFactory::fParent
private

The messenger that is holding this set of sub-commands.

Definition at line 61 of file EDepSimVPrimaryFactory.hh.

G4String EDepSim::VPrimaryFactory::fSubDirName
private

The sub-directory holding this factory.

Definition at line 58 of file EDepSimVPrimaryFactory.hh.


The documentation for this class was generated from the following files: