]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/AliRunConfiguration.cxx
added const AliFiles& argument to Configure()
[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"
16
c97337f9 17#ifdef ALICE_EMPTY_PHYSICS_LIST
18#include "AliEmptyPhysicsList.h"
19#else
676fb573 20#include "TG4PhysicsList.h"
c97337f9 21#endif
676fb573 22
23AliRunConfiguration::AliRunConfiguration(){
24//
25 fRunMessenger = new AliRunMessenger();
26
27 CreateUserConfiguration();
28}
29
30AliRunConfiguration::AliRunConfiguration(const AliRunConfiguration& right)
31 : TG4VRunConfiguration(right)
32{
33 // TG4VRunConfiguration is protected from copying
34}
35
36AliRunConfiguration::~AliRunConfiguration() {
37//
38 delete fRunMessenger;
39
40 // all user action data members are deleted
41 // in G4RunManager::~G4RunManager()
42}
43
44// operators
45
46AliRunConfiguration&
47AliRunConfiguration::operator=(const AliRunConfiguration& right)
48{
49 // check assignement to self
50 if (this == &right) return *this;
51
52 // base class assignement
53 // TG4VRunConfiguration is protected from assigning
54 TG4VRunConfiguration::operator=(right);
55
56 return *this;
57}
58
59// protected methods
60
61void AliRunConfiguration::CreateUserConfiguration()
62{
63// Creates the mandatory Geant4 classes and
64// the other user action classes.
65// ---
66
67 // create mandatory Geant4 classes
68 fDetectorConstruction = new AliDetConstruction();
69#ifndef ALICE_EMPTY_PHYSICS_LIST
70 fPhysicsList = new TG4PhysicsList();
71#else
72 fPhysicsList = new AliEmptyPhysicsList();
73#endif
74 fPrimaryGenerator = new AliPrimaryGeneratorAction();
75
76 // create the other user action classes
77 fRunAction = new AliRunAction();
78 fEventAction = new AliEventAction();
79 fTrackingAction = new AliTrackingAction();
80 fSteppingAction = new AliSteppingAction();
81#ifdef ALICE_STACKING
82 fStackingAction = new AliStackingAction();
83#endif
84}