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

#include <EDepSimFixedCountFactory.hh>

Inheritance diagram for EDepSim::FixedCountFactory:
EDepSim::VCountFactory EDepSim::VPrimaryFactory

Public Member Functions

 FixedCountFactory (EDepSim::UserPrimaryGeneratorMessenger *parent)
 
virtual ~FixedCountFactory ()
 
EDepSim::VCountGeneratorGetGenerator ()
 Return the fixed count generator. More...
 
void SetNumber (int count)
 Set the count to be generated. More...
 
int GetNumber () const
 Get the count to be generated. More...
 
void SetNewValue (G4UIcommand *, G4String)
 Handle messages from the UI processor. More...
 
- Public Member Functions inherited from EDepSim::VCountFactory
 VCountFactory (G4String name, EDepSim::UserPrimaryGeneratorMessenger *fParent, bool makeDirectory=true)
 
virtual ~VCountFactory ()
 
void SetIntensity (double v)
 Set the intensity. More...
 
double GetIntensity () const
 
void SetNewValue (G4UIcommand *, G4String)
 Handle messages from the UI processor. More...
 
- 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

int fNumber
 The count of particles to generate. More...
 
G4UIcmdWithAnInteger * fNumberCMD
 

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 EDepSimFixedCountFactory.hh.

Constructor & Destructor Documentation

EDepSim::FixedCountFactory::FixedCountFactory ( EDepSim::UserPrimaryGeneratorMessenger parent)

Definition at line 5 of file EDepSimFixedCountFactory.cc.

7  : EDepSim::VCountFactory("fixed",parent), fNumber(1) {
8 
9  fNumberCMD = new G4UIcmdWithAnInteger(CommandName("number"),this);
10  fNumberCMD->SetGuidance("Set the number of events to generate.");
11  fNumberCMD->SetParameterName("count",false);
12 
13 }
G4String CommandName(G4String cmd)
Build a command name with the directory prefix.
int fNumber
The count of particles to generate.
EDepSim::FixedCountFactory::~FixedCountFactory ( )
virtual

Definition at line 15 of file EDepSimFixedCountFactory.cc.

15  {
16  delete fNumberCMD;
17 }

Member Function Documentation

EDepSim::VCountGenerator * EDepSim::FixedCountFactory::GetGenerator ( )
virtual

Return the fixed count generator.

Implements EDepSim::VCountFactory.

Definition at line 29 of file EDepSimFixedCountFactory.cc.

int EDepSim::FixedCountFactory::GetNumber ( ) const
inline

Get the count to be generated.

Definition at line 19 of file EDepSimFixedCountFactory.hh.

19 {return fNumber;}
int fNumber
The count of particles to generate.
void EDepSim::FixedCountFactory::SetNewValue ( G4UIcommand *  command,
G4String  newValue 
)
virtual

Handle messages from the UI processor.

Reimplemented from EDepSim::VPrimaryFactory.

Definition at line 19 of file EDepSimFixedCountFactory.cc.

20  {
21  if (command == fNumberCMD) {
22  SetNumber(fNumberCMD->GetNewIntValue(newValue));
23  }
24  else {
26  }
27 }
int command
void SetNewValue(G4UIcommand *, G4String)
Handle messages from the UI processor.
void SetNumber(int count)
Set the count to be generated.
void EDepSim::FixedCountFactory::SetNumber ( int  count)
inline

Set the count to be generated.

Definition at line 16 of file EDepSimFixedCountFactory.hh.

16 {fNumber = count;}
int fNumber
The count of particles to generate.

Member Data Documentation

int EDepSim::FixedCountFactory::fNumber
private

The count of particles to generate.

Definition at line 26 of file EDepSimFixedCountFactory.hh.

G4UIcmdWithAnInteger* EDepSim::FixedCountFactory::fNumberCMD
private

Definition at line 28 of file EDepSimFixedCountFactory.hh.


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