Removing warnings (icc)
[u/mrichter/AliRoot.git] / 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
98490ea9 8#include <TMCProcess.h>
fe4da5cc 9#include <TStopwatch.h>
b8c3b0cc 10#include <TError.h>
116cbefd 11
e2afb3b6 12class TGeometry;
e2afb3b6 13class TParticle;
14class TRandom;
15class TTree;
1578254f 16
88cb7938 17#include "AliRunLoader.h"
94de3818 18class AliDisplay;
e2afb3b6 19class AliGenEventHeader;
65fb704d 20class AliGenerator;
e2afb3b6 21class AliHeader;
22class AliLego;
23class AliLegoGenerator;
5d12ce38 24class AliMC;
e2afb3b6 25class AliMagF;
9e1a0ddb 26class AliStack;
88cb7938 27
aee8290b 28enum {kKeepBit=1, kDaughtersBit=2, kDoneBit=4};
1578254f 29
5d12ce38 30class AliRun : public TNamed {
fe4da5cc 31public:
32 // Creators - distructors
33 AliRun();
34 AliRun(const char *name, const char *title);
e2afb3b6 35 AliRun(const AliRun &arun);
fe4da5cc 36 virtual ~AliRun();
37
e2afb3b6 38 AliRun& operator = (const AliRun &arun)
39 {arun.Copy(*this); return (*this);}
fe4da5cc 40 virtual void Build();
41 virtual void BuildSimpleGeometry();
42 virtual void CleanDetectors();
8494b010 43 TObjArray *Detectors() const {return fModules;}
44 TObjArray *Modules() const {return fModules;}
37d06d5b 45 AliDisplay *Display() const { return fDisplay;}
fe4da5cc 46 virtual AliMagF *Field() const {return fField;}
fe4da5cc 47 virtual void FinishRun();
88cb7938 48 void AddModule(AliModule* mod);
49 Int_t GetEvNumber() const;
fe4da5cc 50 Int_t GetRunNumber() const {return fRun;}
8494b010 51 void SetRunNumber(Int_t run) {fRun=run;}
eef4b160 52 void SetEventNrInRun(Int_t event) {fEventNrInRun=event;}
53 Int_t GetEventNrInRun() const {return fEventNrInRun;}
6df200c3 54 Int_t GetEventsPerRun() const {return fEventsPerRun;}
5d12ce38 55 Int_t GetNdets() const {return fNdets;}
fe4da5cc 56 Int_t GetDebug() const {return fDebug;}
94de3818 57 AliModule *GetModule(const char *name) const;
58 AliDetector *GetDetector(const char *name) const;
59 Int_t GetModuleID(const char *name) const;
39de14fb 60 virtual const char *GetBaseFile() const
61 {return fBaseFileName.Data();}
fe4da5cc 62 virtual Int_t GetEvent(Int_t event);
45189757 63 virtual void SetEvent(Int_t event) {fEvent=event;}
94de3818 64 virtual void SetConfigFunction(const char * config="Config();");
45189757 65 virtual const char *GetConfigFunction() const
66 {return fConfigFunction.Data();}
fe4da5cc 67 TGeometry *GetGeometry();
42f33748 68 virtual void SetGenEventHeader(AliGenEventHeader* header);
5d12ce38 69 AliMC* GetMCApp() const {return fMCApp;}
d47c658f 70 virtual void Hits2Digits(const char *detector=0);
71 virtual void Hits2SDigits(const char *detector=0) {Tree2Tree("S",detector);}
72 virtual void SDigits2Digits(const char *detector=0) {Tree2Tree("D",detector);}
73 virtual void Digits2Reco(const char *detector=0) {Tree2Tree("R",detector);}
875c717b 74 virtual void InitMC(const char *setup="Config.C");
75 virtual void Init(const char *setup="Config.C") {InitMC(setup);}
b21a3d1a 76 Bool_t IsFolder() const {return kTRUE;}
838edcaf 77 virtual AliLego* Lego() const {return fLego;}
2ab0c725 78
fe4da5cc 79 virtual void ResetDigits();
2ab0c725 80 virtual void ResetSDigits();
fe4da5cc 81 virtual void ResetPoints();
e2afb3b6 82 virtual void SetBaseFile(const char *filename="galice.root");
875c717b 83 virtual void RunMC(Int_t nevent=1, const char *setup="Config.C");
88cb7938 84 virtual void Run(Int_t nevent=1, const char *setup="Config.C") {RunMC(nevent,setup);}
dea76e7a 85 virtual void RunLego(const char *setup="Config.C",Int_t nc1=60,Float_t c1min=2,Float_t c1max=178,
88cb7938 86 Int_t nc2=60,Float_t c2min=0,Float_t c2max=360,Float_t rmin=0,
87 Float_t rmax=430,Float_t zmax=10000, AliLegoGenerator* gener=NULL);
dffd31ef 88 virtual Bool_t IsLegoRun() const {return (fLego!=0);}
7f6f9ab2 89 virtual void RunReco(const char *detector=0, Int_t first = 0, Int_t last = 0);
d0f1ee3b 90 virtual void SetDebug(Int_t level=0) {fDebug = level;}
fe4da5cc 91 virtual void SetDisplay(AliDisplay *display) {fDisplay = display;}
fe4da5cc 92 virtual void SetField(Int_t type=2, Int_t version=1, Float_t scale=1, Float_t maxField=10, char*filename="$(ALICE_ROOT)/data/field01.dat");
d8408e76 93 virtual void SetField(AliMagF* magField);
94de3818 94 virtual TDatabasePDG* PDGDB() const {return fPDGDB;}
b9d0a01d 95
b9d0a01d 96 virtual void Field(const Double_t* x, Double_t* b) const;
5d12ce38 97
98 // Delegations
99 virtual void ResetHits();
100 virtual AliGenerator* Generator() const;
88cb7938 101
b9d0a01d 102 //
103 // End of MC Application
fe4da5cc 104
88cb7938 105 TTree *TreeE() {return (fRunLoader)?fRunLoader->TreeE():0x0;}
106 TTree *TreeK() {return (fRunLoader)?fRunLoader->TreeK():0x0;}
107 AliStack *Stack() {return (fRunLoader)?fRunLoader->Stack():0x0;}
108 AliHeader* GetHeader() {return (fRunLoader)?fRunLoader->GetHeader():0x0;}
fe4da5cc 109
88cb7938 110 TTree *TreeD() {MayNotUse("TreeD"); return 0x0;}
111 TTree *TreeS() {MayNotUse("TreeS"); return 0x0;}
112 TTree *TreeR() {MayNotUse("TreeR"); return 0x0;}
b8c3b0cc 113
88cb7938 114
115 void SetRunLoader(AliRunLoader* rloader);
116 AliRunLoader* GetRunLoader() const {return fRunLoader;}
117// void SetEventFolderName(const char* eventfoldername);
118 virtual void Announce() const;
119
120 virtual void InitLoaders(); //prepares run (i.e. creates getters)
121 static void Deprecated(TObject *obj, const char *method,
122 const char *replacement) {
123 if (obj)
124 ::Warning(Form("%s::%s", obj->ClassName(), method),
125 "method is depricated\nPlease use: %s", replacement);
126 else
127 ::Warning(method, "method is depricated\nPlease use: %s", replacement);
128 }
aee8290b 129protected:
9e1a0ddb 130 virtual void Tree2Tree(Option_t *option, const char *detector=0);
2ab0c725 131 Int_t fRun; //! Current run number
132 Int_t fEvent; //! Current event number (from 1)
eef4b160 133 Int_t fEventNrInRun; //! Current unique event number in run
6df200c3 134 Int_t fEventsPerRun; // Number of events per run
2ab0c725 135 Int_t fDebug; // Debug flag
2ab0c725 136 TObjArray *fModules; // List of Detectors
2ab0c725 137 TGeometry *fGeometry; // Pointer to geometry
5d12ce38 138 AliMC *fMCApp; // Pointer to virtual MC Application
2ab0c725 139 AliDisplay *fDisplay; //! Pointer to event display
140 TStopwatch fTimer; // Timer object
141 AliMagF *fField; // Magnetic Field Map
98490ea9 142 TVirtualMC *fMC; //! Pointer to MonteCarlo object
2ab0c725 143 Int_t fNdets; // Number of detectors
2ab0c725 144 Bool_t fInitDone; //! True when initialisation done
145 AliLego *fLego; //! Pointer to aliLego object if it exists
146 TDatabasePDG *fPDGDB; // Particle factory object
2ab0c725 147 TString fConfigFunction; // Configuration file to be executed
148 TRandom *fRandom; // Pointer to the random number generator
2ab0c725 149 TString fBaseFileName; // Name of the base root file
2b22f272 150
88cb7938 151 AliRunLoader *fRunLoader; //!run getter - written as a separate object
ef42d733 152private:
6c4904c2 153 void Copy(TObject &arun) const;
ef42d733 154
88cb7938 155 ClassDef(AliRun,8) //Supervisor class for all Alice detectors
fe4da5cc 156};
157
75a25b1b 158R__EXTERN AliRun *gAlice;
fe4da5cc 159
160#endif