]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliRunConfiguration.cxx
removed options ALICE_STACKING, ALICE_EMPTY_PHYSICS_LIST; TG4PhysicsList replaced...
[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 #include "AliDetConstruction.h"
9 #include "AliPrimaryGeneratorAction.h"
10 #include "AliRunAction.h"
11 #include "AliEventAction.h"
12 #include "AliTrackingAction.h"
13 #include "AliStackingAction.h"
14 #include "AliSteppingAction.h"
15 #include "AliFiles.h"
16
17 #include "TG4ModularPhysicsList.h"
18
19 AliRunConfiguration::AliRunConfiguration(){
20 //
21   fRunMessenger = new AliRunMessenger();
22   fFiles = new AliFiles();
23  
24   CreateUserConfiguration();
25 }
26
27 AliRunConfiguration::AliRunConfiguration(const AliRunConfiguration& right)
28   : TG4VRunConfiguration(right)
29 {
30   // TG4VRunConfiguration is protected from copying
31 }
32
33 AliRunConfiguration::~AliRunConfiguration() {
34 //
35   delete fRunMessenger;
36   delete fFiles;
37
38   // all user action data members are deleted 
39   // in G4RunManager::~G4RunManager()
40 }
41
42 // operators
43
44 AliRunConfiguration& 
45 AliRunConfiguration::operator=(const AliRunConfiguration& right)
46 {
47   // check assignement to self
48   if (this == &right) return *this;
49   
50   // base class assignement
51   // TG4VRunConfiguration is protected from assigning
52   TG4VRunConfiguration::operator=(right);
53
54   return *this;  
55 }    
56           
57 // protected methods
58
59 void AliRunConfiguration::CreateUserConfiguration()
60 {
61 // Creates the mandatory Geant4 classes and 
62 // the other user action classes. 
63 // ---
64
65   // create mandatory Geant4 classes
66   fDetectorConstruction = new AliDetConstruction();
67   fPhysicsList = new TG4ModularPhysicsList();
68   fPrimaryGenerator = new AliPrimaryGeneratorAction();
69
70   // create the other user action classes
71   fRunAction = new AliRunAction();
72   fEventAction = new AliEventAction();
73   fTrackingAction = new AliTrackingAction();
74   fSteppingAction = new AliSteppingAction();
75   fStackingAction = new AliStackingAction();
76 }
77
78 // public methods
79
80 void AliRunConfiguration::SetConfigName(const char* name)
81 {
82 // Sets the configuration macro name 
83 // ---
84   fFiles->SetMacroName(name);
85 }  
86
87 void AliRunConfiguration::SetG3CallsName(const char* name)
88 {
89 // Sets the configuration macro name 
90 // ---
91   fFiles->SetG3CallsName(name);
92 }  
93