Merge branch 'master' into TPCdev
[u/mrichter/AliRoot.git] / STEER / STEER / AliRun.h
CommitLineData
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 16class TRandom;
1578254f 17
88cb7938 18#include "AliRunLoader.h"
e2afb3b6 19class AliGenEventHeader;
65fb704d 20class AliGenerator;
e2afb3b6 21class AliHeader;
5d12ce38 22class AliMC;
e2afb3b6 23class AliMagF;
9e1a0ddb 24class AliStack;
88cb7938 25
1578254f 26
5d12ce38 27class AliRun : public TNamed {
3d45e923 28
fe4da5cc 29public:
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;
eef4b160 39 void SetEventNrInRun(Int_t event) {fEventNrInRun=event;}
40 Int_t GetEventNrInRun() const {return fEventNrInRun;}
5d12ce38 41 Int_t GetNdets() const {return fNdets;}
94de3818 42 AliModule *GetModule(const char *name) const;
43 AliDetector *GetDetector(const char *name) const;
44 Int_t GetModuleID(const char *name) const;
39de14fb 45 virtual const char *GetBaseFile() const
46 {return fBaseFileName.Data();}
fe4da5cc 47 virtual Int_t GetEvent(Int_t event);
3e2e3ece 48 virtual void SetConfigFunction(const char * config="Config();")
49 {fConfigFunction=config;}
45189757 50 virtual const char *GetConfigFunction() const
3e2e3ece 51 {return fConfigFunction.Data();}
42f33748 52 virtual void SetGenEventHeader(AliGenEventHeader* header);
5d12ce38 53 AliMC* GetMCApp() const {return fMCApp;}
d47c658f 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);}
b21a3d1a 58 Bool_t IsFolder() const {return kTRUE;}
e2afb3b6 59 virtual void SetBaseFile(const char *filename="galice.root");
b9d0a01d 60 //
61 // End of MC Application
fe4da5cc 62
88cb7938 63 void SetRunLoader(AliRunLoader* rloader);
d3b3a3b2 64
88cb7938 65 virtual void Announce() const;
66
67 virtual void InitLoaders(); //prepares run (i.e. creates getters)
2057aecb 68
aee8290b 69protected:
9e1a0ddb 70 virtual void Tree2Tree(Option_t *option, const char *detector=0);
eef4b160 71 Int_t fEventNrInRun; //! Current unique event number in run
2ab0c725 72 TObjArray *fModules; // List of Detectors
5d12ce38 73 AliMC *fMCApp; // Pointer to virtual MC Application
2ab0c725 74 Int_t fNdets; // Number of detectors
2ab0c725 75 TString fConfigFunction; // Configuration file to be executed
2ab0c725 76 TString fBaseFileName; // Name of the base root file
28da60d3 77 AliRunLoader *fRunLoader; //! run getter - written as a separate object
ef42d733 78private:
7dd2cbe4 79 AliRun(const AliRun&); // Not implemented
80 AliRun& operator = (const AliRun&); // Not implemented
ef42d733 81
26eac604 82 ClassDef(AliRun,15) //Supervisor class for all Alice detectors
fe4da5cc 83};
84
75a25b1b 85R__EXTERN AliRun *gAlice;
4d81e5e7 86
fe4da5cc 87#endif