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