Casting to eliminate constructor ambiguity
[u/mrichter/AliRoot.git] / STEER / AliModule.h
CommitLineData
8494b010 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
8494b010 8#include <TNamed.h>
b13db077 9#include <TSystem.h>
8494b010 10#include <TClonesArray.h>
11#include <TBrowser.h>
12#include <TAttLine.h>
13#include <TAttMarker.h>
14#include <TArrayI.h>
8494b010 15#include <AliHit.h>
16
17class AliModule : public TNamed , public TAttLine, public TAttMarker {
18
19 // Data members
20protected:
21
22 TString fEuclidMaterial; //Name of the Euclid file for materials (if any)
23 TString fEuclidGeometry; //Name of the Euclid file for geometry (if any)
24
25 TArrayI *fIdtmed; //List of tracking medium numbers
26 TArrayI *fIdmate; //List of material numbers
27 Int_t fLoMedium; //Minimum tracking medium ID for this Module
28 Int_t fHiMedium; //Maximum tracking medium ID for this Module
29
30 Bool_t fActive; //Detector activity flag
31 TList *fHistograms; //List of histograms
32 TList *fNodes; //List of geometry nodes
33
34public:
35
36 // Creators - distructors
37 AliModule(const char* name, const char *title);
38 AliModule();
39 virtual ~AliModule();
40
41 // Inline functions
7103de83 42 virtual int GetNdigits() {return 0;}
43 virtual int GetNhits() {return 0;}
02ca2762 44 virtual TArrayI *GetIdtmed() const {return fIdtmed;}
45 virtual TList *Histograms() const {return fHistograms;}
46 virtual TList *Nodes() const {return fNodes;}
7103de83 47 virtual TClonesArray *Digits() {return 0;}
48 virtual TClonesArray *Hits() {return 0;}
49 virtual TObjArray *Points() {return 0;}
50 virtual Int_t GetIshunt() {return 0;}
51 virtual void SetIshunt(Int_t) {}
02ca2762 52 virtual Bool_t IsActive() const {return fActive;}
7103de83 53 virtual Bool_t IsFolder() {return kTRUE;}
54 virtual Int_t& LoMedium() {return fLoMedium;}
55 virtual Int_t& HiMedium() {return fHiMedium;}
8494b010 56
57 // Module composition
58 virtual void AliMaterial(Int_t, const char*, Float_t, Float_t, Float_t, Float_t,
59 Float_t, Float_t* buf=0, Int_t nwbuf=0) const;
0afa509f 60 virtual void AliGetMaterial(Int_t, char*, Float_t&, Float_t&, Float_t&,
61 Float_t&, Float_t&);
8494b010 62 virtual void AliMixture(Int_t, const char*, Float_t*, Float_t*, Float_t, Int_t, Float_t*) const;
63 virtual void AliMedium(Int_t, const char*, Int_t, Int_t, Int_t, Float_t, Float_t,
64 Float_t, Float_t, Float_t, Float_t, Float_t* ubuf=0, Int_t nbuf=0) const;
65 virtual void AliMatrix(Int_t&, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t) const;
66
67 // Virtual methods
68 virtual void BuildGeometry() {};
69 virtual Int_t IsVersion() const =0;
70
71 // Other methods
dda5e866 72 virtual void AddDigit(Int_t*, Int_t*){
73 Error("AddDigit","Digits cannot be added to module %s\n",fName.Data());}
74 virtual void AddHit(Int_t, Int_t*, Float_t *) {
75 Error("AddDigit","Hits cannot be added to module %s\n",fName.Data());}
7103de83 76 virtual void Browse(TBrowser *) {}
8494b010 77 virtual void CreateGeometry() {}
78 virtual void CreateMaterials() {}
79 virtual void Disable();
80 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
81 virtual void Enable();
7103de83 82 virtual void PreTrack(){}
83 virtual void PostTrack(){}
84 virtual void FinishEvent() {}
8494b010 85 virtual void FinishRun() {}
dda5e866 86 //virtual void Hits2Digits() {}
8494b010 87 virtual void Init() {}
88 virtual void LoadPoints(Int_t ) {}
89 virtual void MakeBranch(Option_t *) {}
90 virtual void Paint(Option_t *) {}
91 virtual void ResetDigits() {}
92 virtual void ResetHits() {}
93 virtual void ResetPoints() {}
94 virtual void SetTreeAddress() {}
95 virtual void SetTimeGate(Float_t) {}
96 virtual Float_t GetTimeGate() {return 1.e10;}
97 virtual void StepManager() {}
dda5e866 98 //virtual AliHit* FirstHit(Int_t) {return 0;}
99 //virtual AliHit* NextHit() {return 0;}
8494b010 100 virtual void SetBufferSize(Int_t) {}
101 virtual void SetEuclidFile(char*,char*geometry=0);
b13db077 102 virtual void ReadEuclid(const char*, char*);
103 virtual void ReadEuclidMedia(const char*);
8494b010 104
105 ClassDef(AliModule,1) //Base class for ALICE Modules
106};
107#endif