]>
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" | |
8 | #include "AliGlobals.h" | |
9 | ||
10 | #include "AliDetConstruction.h" | |
11 | #include "AliEmptyPhysicsList.h" | |
12 | #include "AliPrimaryGeneratorAction.h" | |
13 | #include "AliRunAction.h" | |
14 | #include "AliEventAction.h" | |
15 | #include "AliTrackingAction.h" | |
16 | #include "AliStackingAction.h" | |
17 | #include "AliSteppingAction.h" | |
18 | ||
19 | #include "TG4PhysicsList.h" | |
20 | ||
21 | AliRunConfiguration::AliRunConfiguration(){ | |
22 | // | |
23 | fRunMessenger = new AliRunMessenger(); | |
24 | ||
25 | CreateUserConfiguration(); | |
26 | } | |
27 | ||
28 | AliRunConfiguration::AliRunConfiguration(const AliRunConfiguration& right) | |
29 | : TG4VRunConfiguration(right) | |
30 | { | |
31 | // TG4VRunConfiguration is protected from copying | |
32 | } | |
33 | ||
34 | AliRunConfiguration::~AliRunConfiguration() { | |
35 | // | |
36 | delete fRunMessenger; | |
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 | #ifndef ALICE_EMPTY_PHYSICS_LIST | |
68 | fPhysicsList = new TG4PhysicsList(); | |
69 | #else | |
70 | fPhysicsList = new AliEmptyPhysicsList(); | |
71 | #endif | |
72 | fPrimaryGenerator = new AliPrimaryGeneratorAction(); | |
73 | ||
74 | // create the other user action classes | |
75 | fRunAction = new AliRunAction(); | |
76 | fEventAction = new AliEventAction(); | |
77 | fTrackingAction = new AliTrackingAction(); | |
78 | fSteppingAction = new AliSteppingAction(); | |
79 | #ifdef ALICE_STACKING | |
80 | fStackingAction = new AliStackingAction(); | |
81 | #endif | |
82 | } |