]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliRunConfiguration.cxx
AliTracking/SteppingAction update commented
[u/mrichter/AliRoot.git] / AliGeant4 / AliRunConfiguration.cxx
1 // $Id$
2 // Category: run
3 //
4 // See the class description in the header file.
5
6 #include "AliRunConfiguration.h"
7 #include "AliRunMessenger.h"
8
9 #include "AliDetConstruction.h"
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 #include "AliFiles.h"
17
18 #ifdef ALICE_EMPTY_PHYSICS_LIST
19 #include "AliEmptyPhysicsList.h"
20 #else
21 #include "TG4PhysicsList.h"
22 #endif
23
24 AliRunConfiguration::AliRunConfiguration(){
25 //
26   fRunMessenger = new AliRunMessenger();
27   fFiles = new AliFiles();
28  
29   CreateUserConfiguration();
30 }
31
32 AliRunConfiguration::AliRunConfiguration(const AliRunConfiguration& right)
33   : TG4VRunConfiguration(right)
34 {
35   // TG4VRunConfiguration is protected from copying
36 }
37
38 AliRunConfiguration::~AliRunConfiguration() {
39 //
40   delete fRunMessenger;
41   delete fFiles;
42
43   // all user action data members are deleted 
44   // in G4RunManager::~G4RunManager()
45 }
46
47 // operators
48
49 AliRunConfiguration& 
50 AliRunConfiguration::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
64 void 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 }
88
89 // public methods
90
91 void AliRunConfiguration::SetConfigName(const char* name)
92 {
93 // Sets the configuration macro name 
94 // ---
95   fFiles->SetMacroName(name);
96 }  
97
98 void AliRunConfiguration::SetG3CallsName(const char* name)
99 {
100 // Sets the configuration macro name 
101 // ---
102   fFiles->SetG3CallsName(name);
103 }  
104