SToGS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
SToGS::UserActionInitialization Class Referenceabstract

Base class to manage SToGS user's hooks + the generator. More...

#include <SToGS_UserActionInitialization.hh>

Inheritance diagram for SToGS::UserActionInitialization:

Public Member Functions

virtual void Build () const =0
 
virtual void BuildForMaster () const
 provide default ... likely to be changed since RunManager may be different from Slave and Master More...
 
virtual G4UserEventAction * GetEventAction () const =0
 
virtual
G4VUserPrimaryGeneratorAction * 
GetGun () const
 depending on one string, select a given gun More...
 
virtual G4UserRunAction * GetRunAction () const =0
 depending on one string, select a given gun More...
 
virtual G4UserSteppingAction * GetSteppingAction () const =0
 
virtual G4UserTrackingAction * GetTrackingAction () const =0
 
std::pair< G4String, G4String > SetWhichGenerator (G4String which_gene, G4String option)
 once allocated the generator associated with a UserActionInititialization could be changed here before asking for one More...
 
 UserActionInitialization (G4String which_user_action_opt, G4String which_gene, G4String which_gene_opt)
 
virtual ~UserActionInitialization ()
 

Static Public Member Functions

static G4VSensitiveDetector * GetCopClusterSD (G4String name="/SToGS/SD/CopCluster")
 to get a general SToGS Calorimeter. In Multi-threading mode, return a new instance otherwise a global one More...
 
static G4VSensitiveDetector * GetTrackerSD (G4String name="/SToGS/SD/Tracker")
 to get a general SToGS tracker. In Multi-threading mode, return a new instance otherwise a global one More...
 

Protected Member Functions

void BuildAndRegister (AllActions *) const
 add the passed class to the list of allocated ones. It is required for a proper destruction More...
 
virtual
G4VUserPrimaryGeneratorAction * 
GetGun (G4String which, G4String opt) const
 Find and get a gun in many possibilities. More...
 
void Register (AllActions *) const
 

Protected Attributes

std::vector< AllActions * > fAllUserAction
 list of allocated AllActions to delete them More...
 
G4String fUserActionOption
 action passed to the created user's actions if required More...
 
std::pair< G4String, G4String > fWhichGenerator
 to keep what generator to be used. Defaut is "-","-", means the concrete implementation provides its own generator More...
 

Detailed Description

Base class to manage SToGS user's hooks + the generator.

This class is mandatory in case of Multi-Threading. It should implement Build and BuidForMaster methods for G4 Kernel.

All classes that inherits from it should focus on the User's Actions i.e Run, Event, Stepping etc ... As Geant4.10 required to put toghether all these actions with the generator, there are facilities in the base class to select a general pre-existing one (like GPS for instance) or the event generator could be proper to the class. In the case, just overwrite GetGun()

Definition at line 208 of file SToGS_UserActionInitialization.hh.

Constructor & Destructor Documentation

SToGS::UserActionInitialization::UserActionInitialization ( G4String  which_user_action_opt,
G4String  which_gene,
G4String  which_gene_opt 
)

Definition at line 80 of file SToGS_UserActionInitialization.cc.

SToGS::UserActionInitialization::~UserActionInitialization ( )
virtual

Definition at line 90 of file SToGS_UserActionInitialization.cc.

Member Function Documentation

void SToGS::UserActionInitialization::BuildAndRegister ( AllActions actions) const
protected

add the passed class to the list of allocated ones. It is required for a proper destruction

This call is thread locked

Definition at line 194 of file SToGS_UserActionInitialization.cc.

virtual void SToGS::UserActionInitialization::BuildForMaster ( ) const
inlinevirtual

provide default ... likely to be changed since RunManager may be different from Slave and Master

Definition at line 266 of file SToGS_UserActionInitialization.hh.

G4VSensitiveDetector * SToGS::UserActionInitialization::GetCopClusterSD ( G4String  name = "/SToGS/SD/CopCluster")
static

to get a general SToGS Calorimeter. In Multi-threading mode, return a new instance otherwise a global one

Definition at line 169 of file SToGS_UserActionInitialization.cc.

G4VUserPrimaryGeneratorAction * SToGS::UserActionInitialization::GetGun ( G4String  which,
G4String  opt 
) const
protectedvirtual

Find and get a gun in many possibilities.

Definition at line 123 of file SToGS_UserActionInitialization.cc.

G4VUserPrimaryGeneratorAction * SToGS::UserActionInitialization::GetGun ( ) const
virtual

depending on one string, select a given gun

Ex GPS: the gun is realized through the general GPS interface

Definition at line 136 of file SToGS_UserActionInitialization.cc.

G4VSensitiveDetector * SToGS::UserActionInitialization::GetTrackerSD ( G4String  name = "/SToGS/SD/Tracker")
static

to get a general SToGS tracker. In Multi-threading mode, return a new instance otherwise a global one

Definition at line 144 of file SToGS_UserActionInitialization.cc.

void SToGS::UserActionInitialization::Register ( AllActions actions) const
protected

Definition at line 215 of file SToGS_UserActionInitialization.cc.

std::pair< G4String, G4String > SToGS::UserActionInitialization::SetWhichGenerator ( G4String  which_gene,
G4String  option 
)

once allocated the generator associated with a UserActionInititialization could be changed here before asking for one

Definition at line 99 of file SToGS_UserActionInitialization.cc.

Member Data Documentation

std::vector< AllActions *> SToGS::UserActionInitialization::fAllUserAction
mutableprotected

list of allocated AllActions to delete them

Definition at line 215 of file SToGS_UserActionInitialization.hh.

G4String SToGS::UserActionInitialization::fUserActionOption
protected

action passed to the created user's actions if required

Definition at line 219 of file SToGS_UserActionInitialization.hh.

std::pair< G4String, G4String > SToGS::UserActionInitialization::fWhichGenerator
protected

to keep what generator to be used. Defaut is "-","-", means the concrete implementation provides its own generator

Definition at line 223 of file SToGS_UserActionInitialization.hh.


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