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