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

#include <EDepSimFixedTimeFactory.hh>

Inheritance diagram for EDepSim::FixedTimeFactory:
EDepSim::VTimeFactory EDepSim::VPrimaryFactory

Public Member Functions

 FixedTimeFactory (EDepSim::UserPrimaryGeneratorMessenger *parent)
 
virtual ~FixedTimeFactory ()
 
EDepSim::VTimeGeneratorGetGenerator ()
 Return the fixed time generator. More...
 
void SetTime (double time)
 Set the time to be generated. More...
 
double GetTime () const
 Get the time to be generated. More...
 
void SetNewValue (G4UIcommand *, G4String)
 Handle messages from the UI processor. More...
 
- Public Member Functions inherited from EDepSim::VTimeFactory
 VTimeFactory (G4String name, EDepSim::UserPrimaryGeneratorMessenger *fParent, bool makeDirectory=true)
 
virtual ~VTimeFactory ()
 
- Public Member Functions inherited from EDepSim::VPrimaryFactory
 VPrimaryFactory (G4String subdir, G4String name, EDepSim::UserPrimaryGeneratorMessenger *parent, bool makeDirectory)
 
virtual ~VPrimaryFactory ()
 
G4String GetPath () const
 
G4String GetName () const
 
G4String GetSubDir () const
 

Private Attributes

double fTime
 The time of particles to generate. More...
 
G4UIcmdWithADoubleAndUnit * fTimeCMD
 

Additional Inherited Members

- Protected Member Functions inherited from EDepSim::VPrimaryFactory
G4String CommandName (G4String cmd)
 Build a command name with the directory prefix. More...
 

Detailed Description

Definition at line 7 of file EDepSimFixedTimeFactory.hh.

Constructor & Destructor Documentation

EDepSim::FixedTimeFactory::FixedTimeFactory ( EDepSim::UserPrimaryGeneratorMessenger parent)

Definition at line 5 of file EDepSimFixedTimeFactory.cc.

7  : EDepSim::VTimeFactory("fixed",parent), fTime(1) {
8 
9  fTimeCMD = new G4UIcmdWithADoubleAndUnit(CommandName("time"),this);
10  fTimeCMD->SetGuidance("Set the time of events to generate.");
11  fTimeCMD->SetParameterName("time",false);
12  fTimeCMD->SetUnitCategory("Time");
13 
14 }
G4UIcmdWithADoubleAndUnit * fTimeCMD
G4String CommandName(G4String cmd)
Build a command name with the directory prefix.
double fTime
The time of particles to generate.
EDepSim::FixedTimeFactory::~FixedTimeFactory ( )
virtual

Definition at line 16 of file EDepSimFixedTimeFactory.cc.

16  {
17  delete fTimeCMD;
18 }
G4UIcmdWithADoubleAndUnit * fTimeCMD

Member Function Documentation

EDepSim::VTimeGenerator * EDepSim::FixedTimeFactory::GetGenerator ( )
virtual

Return the fixed time generator.

Implements EDepSim::VTimeFactory.

Definition at line 27 of file EDepSimFixedTimeFactory.cc.

double EDepSim::FixedTimeFactory::GetTime ( ) const
inline

Get the time to be generated.

Definition at line 19 of file EDepSimFixedTimeFactory.hh.

19 {return fTime;}
double fTime
The time of particles to generate.
void EDepSim::FixedTimeFactory::SetNewValue ( G4UIcommand *  command,
G4String  newValue 
)
virtual

Handle messages from the UI processor.

Reimplemented from EDepSim::VPrimaryFactory.

Definition at line 20 of file EDepSimFixedTimeFactory.cc.

21  {
22  if (command == fTimeCMD) {
23  SetTime(fTimeCMD->GetNewDoubleValue(newValue));
24  }
25 }
int command
void SetTime(double time)
Set the time to be generated.
G4UIcmdWithADoubleAndUnit * fTimeCMD
void EDepSim::FixedTimeFactory::SetTime ( double  time)
inline

Set the time to be generated.

Definition at line 16 of file EDepSimFixedTimeFactory.hh.

16 {fTime = time;}
double fTime
The time of particles to generate.

Member Data Documentation

double EDepSim::FixedTimeFactory::fTime
private

The time of particles to generate.

Definition at line 26 of file EDepSimFixedTimeFactory.hh.

G4UIcmdWithADoubleAndUnit* EDepSim::FixedTimeFactory::fTimeCMD
private

Definition at line 28 of file EDepSimFixedTimeFactory.hh.


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