]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/AliRunConfiguration.cxx
direct usage of AliRun::fParticles replaced with calls to AliRun; renamed methods...
[u/mrichter/AliRoot.git] / AliGeant4 / AliRunConfiguration.cxx
CommitLineData
676fb573 1// $Id$
2// Category: run
3//
4// See the class description in the header file.
5
6#include "AliRunConfiguration.h"
7#include "AliRunMessenger.h"
676fb573 8
9#include "AliDetConstruction.h"
676fb573 10#include "AliPrimaryGeneratorAction.h"
11#include "AliRunAction.h"
12#include "AliEventAction.h"
13#include "AliTrackingAction.h"
14#include "AliStackingAction.h"
15#include "AliSteppingAction.h"
8778e0b6 16#include "AliFiles.h"
676fb573 17
c97337f9 18#ifdef ALICE_EMPTY_PHYSICS_LIST
19#include "AliEmptyPhysicsList.h"
20#else
676fb573 21#include "TG4PhysicsList.h"
c97337f9 22#endif
676fb573 23
24AliRunConfiguration::AliRunConfiguration(){
25//
26 fRunMessenger = new AliRunMessenger();
8778e0b6 27 fFiles = new AliFiles();
676fb573 28
29 CreateUserConfiguration();
30}
31
32AliRunConfiguration::AliRunConfiguration(const AliRunConfiguration& right)
33 : TG4VRunConfiguration(right)
34{
35 // TG4VRunConfiguration is protected from copying
36}
37
38AliRunConfiguration::~AliRunConfiguration() {
39//
40 delete fRunMessenger;
8778e0b6 41 delete fFiles;
676fb573 42
43 // all user action data members are deleted
44 // in G4RunManager::~G4RunManager()
45}
46
47// operators
48
49AliRunConfiguration&
50AliRunConfiguration::operator=(const AliRunConfiguration& right)
51{
52 // check assignement to self
53 if (this == &right) return *this;
54
55 // base class assignement
56 // TG4VRunConfiguration is protected from assigning
57 TG4VRunConfiguration::operator=(right);
58
59 return *this;
60}
61
62// protected methods
63
64void AliRunConfiguration::CreateUserConfiguration()
65{
66// Creates the mandatory Geant4 classes and
67// the other user action classes.
68// ---
69
70 // create mandatory Geant4 classes
71 fDetectorConstruction = new AliDetConstruction();
72#ifndef ALICE_EMPTY_PHYSICS_LIST
73 fPhysicsList = new TG4PhysicsList();
74#else
75 fPhysicsList = new AliEmptyPhysicsList();
76#endif
77 fPrimaryGenerator = new AliPrimaryGeneratorAction();
78
79 // create the other user action classes
80 fRunAction = new AliRunAction();
81 fEventAction = new AliEventAction();
82 fTrackingAction = new AliTrackingAction();
83 fSteppingAction = new AliSteppingAction();
84#ifdef ALICE_STACKING
85 fStackingAction = new AliStackingAction();
86#endif
87}
8778e0b6 88
89// public methods
90
91void AliRunConfiguration::SetConfigName(const char* name)
92{
93// Sets the configuration macro name
94// ---
95 fFiles->SetMacroName(name);
96}
97
98void AliRunConfiguration::SetG3CallsName(const char* name)
99{
100// Sets the configuration macro name
101// ---
102 fFiles->SetG3CallsName(name);
103}
104