Removing GetDebug and SetDebug from AliRun and AliModule. Using AliLog for the messages
[u/mrichter/AliRoot.git] / STEER / AliModule.h
CommitLineData
aee8290b 1#ifndef ALIMODULE_H
2#define ALIMODULE_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
1bb2a43c 8//
9// This is the basic class for any
10// ALICE detector module, whether it is
11// sensitive or not. Detector classes depend
12// on this.
13//
e2afb3b6 14
1bb2a43c 15#include <Riostream.h>
16#include <TAttLine.h>
17#include <TAttMarker.h>
18#include <TNamed.h>
e2afb3b6 19
65fb704d 20#include "AliRndm.h"
94de3818 21
94de3818 22class TClonesArray;
23class TBrowser;
24class TArrayI;
2ab0c725 25class TFile;
88cb7938 26class TTree;
27class AliLoader;
2cad796f 28class AliTrackReference;
85a5290f 29class AliDigitizer;
30class AliRunDigitizer;
2257f27e 31class AliVertexer;
6d7874d8 32class AliTracker;
33class AliESD;
34class AliRunLoader;
8494b010 35
88cb7938 36
65fb704d 37class AliModule : public TNamed , public TAttLine, public TAttMarker,
38 public AliRndm {
8494b010 39public:
40
41 // Creators - distructors
42 AliModule(const char* name, const char *title);
43 AliModule();
aee8290b 44 AliModule(const AliModule &mod);
8494b010 45 virtual ~AliModule();
46
47 // Inline functions
94de3818 48 virtual int GetNdigits() const {return 0;}
49 virtual int GetNhits() const {return 0;}
02ca2762 50 virtual TArrayI *GetIdtmed() const {return fIdtmed;}
51 virtual TList *Histograms() const {return fHistograms;}
52 virtual TList *Nodes() const {return fNodes;}
94de3818 53 virtual TClonesArray *Digits() const {return 0;}
54 virtual TClonesArray *Hits() const {return 0;}
55 virtual TObjArray *Points() const {return 0;}
56 virtual Int_t GetIshunt() const {return 0;}
7103de83 57 virtual void SetIshunt(Int_t) {}
02ca2762 58 virtual Bool_t IsActive() const {return fActive;}
b21a3d1a 59 virtual Bool_t IsFolder() const {return kTRUE;}
7103de83 60 virtual Int_t& LoMedium() {return fLoMedium;}
61 virtual Int_t& HiMedium() {return fHiMedium;}
8494b010 62
63 // Module composition
aee8290b 64 virtual void AliMaterial(Int_t imat, const char* name, Float_t a,
65 Float_t z, Float_t dens, Float_t radl,
66 Float_t absl, Float_t *buf=0, Int_t nwbuf=0) const;
67 virtual void AliGetMaterial(Int_t imat, char* name, Float_t &a,
88cb7938 68 Float_t &z, Float_t &dens, Float_t &radl,
69 Float_t &absl) const;
aee8290b 70 virtual void AliMixture(Int_t imat, const char *name, Float_t *a,
88cb7938 71 Float_t *z, Float_t dens, Int_t nlmat,
72 Float_t *wmat) const;
aee8290b 73 virtual void AliMedium(Int_t numed, const char *name, Int_t nmat,
88cb7938 74 Int_t isvol, Int_t ifield, Float_t fieldm,
75 Float_t tmaxfd, Float_t stemax, Float_t deemax,
76 Float_t epsil, Float_t stmin, Float_t *ubuf=0,
77 Int_t nbuf=0) const;
aee8290b 78 virtual void AliMatrix(Int_t &nmat, Float_t theta1, Float_t phi1,
88cb7938 79 Float_t theta2, Float_t phi2, Float_t theta3,
80 Float_t phi3) const;
8494b010 81
82 // Virtual methods
83 virtual void BuildGeometry() {};
84 virtual Int_t IsVersion() const =0;
88cb7938 85
86
8494b010 87 // Other methods
dda5e866 88 virtual void AddDigit(Int_t*, Int_t*){
89 Error("AddDigit","Digits cannot be added to module %s\n",fName.Data());}
90 virtual void AddHit(Int_t, Int_t*, Float_t *) {
91 Error("AddDigit","Hits cannot be added to module %s\n",fName.Data());}
2ab0c725 92 virtual void Hits2SDigits() {}
c92eb8ad 93 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* /*manager*/) const
85a5290f 94 {return NULL;}
2ab0c725 95 virtual void SDigits2Digits() {}
85a5290f 96 virtual void Hits2Digits() {}
fe961a91 97 virtual void Digits2Reco() {}
0421c3d1 98 virtual void Digits2Raw();
2ab0c725 99 virtual void Raw2Digits() {}
7103de83 100 virtual void Browse(TBrowser *) {}
8494b010 101 virtual void CreateGeometry() {}
102 virtual void CreateMaterials() {}
103 virtual void Disable();
8494b010 104 virtual void Enable();
7103de83 105 virtual void PreTrack(){}
106 virtual void PostTrack(){}
107 virtual void FinishEvent() {}
8494b010 108 virtual void FinishRun() {}
24de2263 109 virtual void FinishPrimary() {}
8494b010 110 virtual void Init() {}
111 virtual void LoadPoints(Int_t ) {}
88cb7938 112
113
114
9b62c596 115 virtual void MakeBranch(Option_t * /*opt =" "*/) {}
88cb7938 116 virtual void MakeTree(Option_t *) {}//skowron
117
df75403f 118 virtual AliLoader* MakeLoader(const char* topfoldername);
88cb7938 119 virtual AliLoader* GetLoader() const {return 0x0;} //skowron
120
121
8494b010 122 virtual void Paint(Option_t *) {}
123 virtual void ResetDigits() {}
2ab0c725 124 virtual void ResetSDigits() {}
8494b010 125 virtual void ResetHits() {}
126 virtual void ResetPoints() {}
2cad796f 127 virtual void SetTreeAddress();
8494b010 128 virtual void SetTimeGate(Float_t) {}
94de3818 129 virtual Float_t GetTimeGate() const {return 1.e10;}
8494b010 130 virtual void StepManager() {}
3f754d83 131 virtual void DisableStepManager() {fEnable = kFALSE;}
116cbefd 132 virtual Bool_t StepManagerIsEnabled() const {return fEnable;}
8918e700 133 virtual void SetBufferSize(Int_t) {}
65fb704d 134 virtual Float_t ZMin() const;
135 virtual Float_t ZMax() const;
aee8290b 136 virtual void SetEuclidFile(char *material,char *geometry=0);
88cb7938 137 virtual void ReadEuclid(const char *filnam, char *topvol);
138 virtual void ReadEuclidMedia(const char *filnam);
2cad796f 139// Track reference related
140 TClonesArray *TrackReferences() const {return fTrackReferences;}
141 virtual void RemapTrackHitIDs(Int_t *) {}
142 virtual void RemapTrackReferencesIDs(Int_t *map); //remaping track references MI
143 virtual void ResetTrackReferences();
88cb7938 144 virtual void AddTrackReference(Int_t label);
2cad796f 145 virtual AliTrackReference * FirstTrackReference(Int_t track);
146 virtual AliTrackReference * NextTrackReference();
88cb7938 147 virtual void MakeBranchTR(Option_t *opt=" ");
148 TTree* TreeTR(); //shorcut method for accessing treeTR from folder
6d7874d8 149
150 void SetRunLoader(AliRunLoader* runLoader)
151 {fRunLoader = runLoader;}
2cad796f 152
153//
e2afb3b6 154 AliModule& operator=(const AliModule &mod)
155 {mod.Copy(*this); return (*this);}
8494b010 156
aee8290b 157protected:
6c4904c2 158 void Copy(TObject &mod) const;
e2afb3b6 159
aee8290b 160 // Data members
161
2ab0c725 162 TString fEuclidMaterial; //!Name of the Euclid file for materials (if any)
163 TString fEuclidGeometry; //!Name of the Euclid file for geometry (if any)
aee8290b 164
2ab0c725 165 TArrayI *fIdtmed; //!List of tracking medium numbers
166 TArrayI *fIdmate; //!List of material numbers
167 Int_t fLoMedium; //!Minimum tracking medium ID for this Module
168 Int_t fHiMedium; //!Maximum tracking medium ID for this Module
aee8290b 169
170 Bool_t fActive; //Detector activity flag
171 TList *fHistograms; //List of histograms
172 TList *fNodes; //List of geometry nodes
3f754d83 173 Bool_t fEnable; //StepManager enabling flag
2388c363 174 TClonesArray *fTrackReferences; //!list of track references - for one primary track only -MI
2cad796f 175 Int_t fMaxIterTrackRef; //!for track refernce iterator routines
176 Int_t fCurrentIterTrackRef; //!for track refernce iterator routines
6d7874d8 177
178 AliRunLoader* fRunLoader; //!local pointer to run loader
179
4951e003 180 ClassDef(AliModule,7) //Base class for ALICE Modules
8494b010 181};
182#endif