AliRoot Core  edcc906 (edcc906)
Go to the documentation of this file.
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 */
6 /* $Id$ */
8 //
9 // General configuration class for Simulation and Reconstruction
10 // Basic driver for AliRoot runs
11 // Containing pointers to data elements for AliRoot
12 //
14 #include <TSystem.h>
16 class TRandom;
18 #include "AliRunLoader.h"
19 class AliGenEventHeader;
20 class AliGenerator;
21 class AliHeader;
22 class AliMC;
23 class AliMagF;
24 class AliStack;
27 class AliRun : public TNamed {
29 public:
30  // Creators - distructors
31  AliRun();
32  AliRun(const char *name, const char *title);
33  virtual ~AliRun();
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 SetConfigFunction(const char * config="Config();")
49  {fConfigFunction=config;}
50  virtual const char *GetConfigFunction() const
51  {return fConfigFunction.Data();}
52  virtual void SetGenEventHeader(AliGenEventHeader* header);
53  AliMC* GetMCApp() const {return fMCApp;}
54  virtual void Hits2Digits(const char *detector=0);
55  virtual void Hits2SDigits(const char *detector=0) {Tree2Tree("S",detector);}
56  virtual void SDigits2Digits(const char *detector=0) {Tree2Tree("D",detector);}
57  virtual void Digits2Reco(const char *detector=0) {Tree2Tree("R",detector);}
58  Bool_t IsFolder() const {return kTRUE;}
59  virtual void SetBaseFile(const char *filename="galice.root");
60  //
61  // End of MC Application
63  void SetRunLoader(AliRunLoader* rloader);
65  virtual void Announce() const;
67  virtual void InitLoaders(); //prepares run (i.e. creates getters)
68  Int_t GetSgPerBgEmbedded() const {return fSgPerBgEmbedded;}
71 protected:
72  virtual void Tree2Tree(Option_t *option, const char *detector=0);
73  Int_t fEventNrInRun;
74  Int_t fSgPerBgEmbedded; // in case this is embedded signal: bg.event repetition factor
75  TObjArray *fModules; // List of Detectors
76  AliMC *fMCApp; // Pointer to virtual MC Application
77  Int_t fNdets; // Number of detectors
78  TString fConfigFunction; // Configuration file to be executed
79  TString fBaseFileName; // Name of the base root file
81 private:
82  AliRun(const AliRun&); // Not implemented
83  AliRun& operator = (const AliRun&); // Not implemented
85  ClassDef(AliRun,16) //Supervisor class for all Alice detectors
86 };
88 R__EXTERN AliRun *gAlice;
90 #endif
void SetRunLoader(AliRunLoader *rloader)
Definition: AliRun.cxx:392
virtual void SDigits2Digits(const char *detector=0)
Definition: AliRun.h:56
TString fConfigFunction
Definition: AliRun.h:78
Definition: AliRun.h:27
#define TObjArray
TString fBaseFileName
Definition: AliRun.h:79
virtual Int_t GetEvent(Int_t event)
Definition: AliRun.cxx:221
AliRun & operator=(const AliRun &)
virtual void InitLoaders()
Definition: AliRun.cxx:150
Int_t GetNdets() const
Definition: AliRun.h:41
virtual void Announce() const
Definition: AliRun.cxx:170
Int_t fNdets
Definition: AliRun.h:77
virtual void SetBaseFile(const char *filename="galice.root")
Definition: AliRun.cxx:263
Int_t GetEventNrInRun() const
Definition: AliRun.h:40
Int_t GetEvNumber() const
Definition: AliRun.cxx:379
Definition: AliRun.cxx:67
virtual void Hits2Digits(const char *detector=0)
Definition: AliRun.cxx:270
R__EXTERN AliRun * gAlice
Definition: AliRun.h:88
virtual void Hits2SDigits(const char *detector=0)
Definition: AliRun.h:55
AliModule * GetModule(const char *name) const
Definition: AliRun.cxx:191
virtual ~AliRun()
Definition: AliRun.cxx:120
AliMC * fMCApp
Definition: AliRun.h:76
Int_t fSgPerBgEmbedded
Current unique event number in run.
Definition: AliRun.h:74
virtual void SetConfigFunction(const char *config="Config();")
Definition: AliRun.h:48
Int_t fEventNrInRun
Definition: AliRun.h:73
Bool_t IsFolder() const
Definition: AliRun.h:58
void SetSgPerBgEmbedded(int i)
Definition: AliRun.h:69
TObjArray * fModules
Definition: AliRun.h:75
Definition: AliMC.h:30
Int_t GetSgPerBgEmbedded() const
Definition: AliRun.h:68
Int_t GetModuleID(const char *name) const
Definition: AliRun.cxx:209
AliRunLoader * fRunLoader
Definition: AliRun.h:80
void SetEventNrInRun(Int_t event)
Definition: AliRun.h:39
virtual const char * GetConfigFunction() const
Definition: AliRun.h:50
virtual const char * GetBaseFile() const
Definition: AliRun.h:45
AliDetector * GetDetector(const char *name) const
Definition: AliRun.cxx:200
void AddModule(AliModule *mod)
Definition: AliRun.cxx:442
virtual void Digits2Reco(const char *detector=0)
Definition: AliRun.h:57
virtual void SetGenEventHeader(AliGenEventHeader *header)
Definition: AliRun.cxx:372
AliMC * GetMCApp() const
Definition: AliRun.h:53
TObjArray * Modules() const
Definition: AliRun.h:36
virtual void Tree2Tree(Option_t *option, const char *detector=0)
Definition: AliRun.cxx:284
TObjArray * Detectors() const
Definition: AliRun.h:35