]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIRUN_H | |
2 | #define ALIRUN_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | // | |
9 | // General configuration class for Simulation and Reconstruction | |
10 | // Basic driver for AliRoot runs | |
11 | // Containing pointers to data elements for AliRoot | |
12 | // | |
13 | ||
14 | #include <TSystem.h> | |
15 | ||
16 | class TRandom; | |
17 | ||
18 | #include "AliRunLoader.h" | |
19 | class AliGenEventHeader; | |
20 | class AliGenerator; | |
21 | class AliHeader; | |
22 | class AliMC; | |
23 | class AliMagF; | |
24 | class AliStack; | |
25 | ||
26 | ||
27 | class AliRun : public TNamed { | |
28 | ||
29 | public: | |
30 | // Creators - distructors | |
31 | AliRun(); | |
32 | AliRun(const char *name, const char *title); | |
33 | virtual ~AliRun(); | |
34 | ||
35 | TObjArray *Detectors() const {return fModules;} | |
36 | TObjArray *Modules() const {return fModules;} | |
37 | void AddModule(AliModule* mod); | |
38 | Int_t GetEvNumber() const; | |
39 | void SetEventNrInRun(Int_t event) {fEventNrInRun=event;} | |
40 | Int_t GetEventNrInRun() const {return fEventNrInRun;} | |
41 | Int_t GetNdets() const {return fNdets;} | |
42 | AliModule *GetModule(const char *name) const; | |
43 | AliDetector *GetDetector(const char *name) const; | |
44 | Int_t GetModuleID(const char *name) const; | |
45 | virtual const char *GetBaseFile() const | |
46 | {return fBaseFileName.Data();} | |
47 | virtual Int_t GetEvent(Int_t event); | |
48 | virtual void SetEvent(Int_t event) {fEvent=event;} | |
49 | virtual void SetConfigFunction(const char * config="Config();") | |
50 | {fConfigFunction=config;} | |
51 | virtual const char *GetConfigFunction() const | |
52 | {return fConfigFunction.Data();} | |
53 | virtual void SetGenEventHeader(AliGenEventHeader* header); | |
54 | AliMC* GetMCApp() const {return fMCApp;} | |
55 | virtual void Hits2Digits(const char *detector=0); | |
56 | virtual void Hits2SDigits(const char *detector=0) {Tree2Tree("S",detector);} | |
57 | virtual void SDigits2Digits(const char *detector=0) {Tree2Tree("D",detector);} | |
58 | virtual void Digits2Reco(const char *detector=0) {Tree2Tree("R",detector);} | |
59 | Bool_t IsFolder() const {return kTRUE;} | |
60 | Bool_t IsRootGeometry() const {return fIsRootGeometry;} | |
61 | void SetRootGeometry(Bool_t flag=kTRUE); | |
62 | const char* GetGeometryFileName() const {return fGeometryFileName.Data();} | |
63 | void SetGeometryFromFile(const char *filename) { | |
64 | SetRootGeometry(); | |
65 | fGeometryFileName = filename; | |
66 | } | |
67 | void SetGeometryFromCDB(); | |
68 | Bool_t IsGeomFromCDB() const {return fGeometryFromCDB;} | |
69 | const char* GetTriggerDescriptor() const {return fTriggerDescriptor.Data();} | |
70 | void SetTriggerDescriptor(const char *name) {fTriggerDescriptor = name;} | |
71 | virtual void SetBaseFile(const char *filename="galice.root"); | |
72 | // | |
73 | // End of MC Application | |
74 | ||
75 | void SetRunLoader(AliRunLoader* rloader); | |
76 | ||
77 | virtual void Announce() const; | |
78 | ||
79 | virtual void InitLoaders(); //prepares run (i.e. creates getters) | |
80 | ||
81 | protected: | |
82 | virtual void Tree2Tree(Option_t *option, const char *detector=0); | |
83 | Int_t fEvent; //! Current event number (from 1) | |
84 | Int_t fEventNrInRun; //! Current unique event number in run | |
85 | TObjArray *fModules; // List of Detectors | |
86 | AliMC *fMCApp; // Pointer to virtual MC Application | |
87 | Int_t fNdets; // Number of detectors | |
88 | TString fConfigFunction; // Configuration file to be executed | |
89 | TRandom *fRandom; // Pointer to the random number generator | |
90 | TString fBaseFileName; // Name of the base root file | |
91 | Bool_t fIsRootGeometry; //! Flag telling if the geometry is loaded from file | |
92 | Bool_t fGeometryFromCDB; //! Flag telling if the geometry is to be loaded from OCDB | |
93 | TString fGeometryFileName; //! Name of the geometry file | |
94 | TString fTriggerDescriptor; // Trigger descriptor identifier | |
95 | AliRunLoader *fRunLoader; //!run getter - written as a separate object | |
96 | private: | |
97 | AliRun(const AliRun&); // Not implemented | |
98 | AliRun& operator = (const AliRun&); // Not implemented | |
99 | ||
100 | ClassDef(AliRun,13) //Supervisor class for all Alice detectors | |
101 | }; | |
102 | ||
103 | R__EXTERN AliRun *gAlice; | |
104 | ||
105 | #endif |