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