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