]>
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" |
676fb573 | 9 | #include "AliPrimaryGeneratorAction.h" |
10 | #include "AliRunAction.h" | |
11 | #include "AliEventAction.h" | |
12 | #include "AliTrackingAction.h" | |
13 | #include "AliStackingAction.h" | |
14 | #include "AliSteppingAction.h" | |
8778e0b6 | 15 | #include "AliFiles.h" |
676fb573 | 16 | |
deaf888c | 17 | #include "TG4ModularPhysicsList.h" |
676fb573 | 18 | |
19 | AliRunConfiguration::AliRunConfiguration(){ | |
20 | // | |
21 | fRunMessenger = new AliRunMessenger(); | |
8778e0b6 | 22 | fFiles = new AliFiles(); |
676fb573 | 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; | |
8778e0b6 | 36 | delete fFiles; |
676fb573 | 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(); | |
deaf888c | 67 | fPhysicsList = new TG4ModularPhysicsList(); |
676fb573 | 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(); | |
676fb573 | 75 | fStackingAction = new AliStackingAction(); |
676fb573 | 76 | } |
8778e0b6 | 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 |