3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 // This is the basic detector class from which
10 // all ALICE detector derive.
11 // This class is the base for the implementation of all detectors
15 #include "AliModule.h"
22 class AliDetector : public AliModule {
26 // Creators - distructors
27 AliDetector(const char* name, const char *title);
29 AliDetector(const AliDetector &det);
30 virtual ~AliDetector();
33 void Copy(TObject &det) const;
34 virtual int GetNdigits() const {return fNdigits;}
35 virtual int GetNhits() const {return fNhits;}
36 TClonesArray *Digits() const {return fDigits;}
37 TClonesArray *Hits() const {return fHits;}
39 TObjArray *Points() const {return fPoints;}
40 Int_t GetIshunt() const {return fIshunt;}
41 void SetIshunt(Int_t ishunt) {fIshunt=ishunt;}
42 AliDetector &operator=(const AliDetector &det)
43 {det.Copy(*this); return (*this);}
46 virtual void Publish(const char *dir, void *c, const char *name=0) const;
47 virtual void Browse(TBrowser *b);
48 virtual void FinishRun();
49 virtual void LoadPoints(Int_t track);
50 virtual void MakeBranch(Option_t *opt=" ");
51 virtual void ResetDigits();
52 virtual void ResetHits();
53 virtual void AddAlignableVolumes() const;
55 virtual void ResetPoints();
56 virtual void SetTreeAddress();
57 virtual void SetTimeGate(Float_t gate) {fTimeGate=gate;}
58 virtual Float_t GetTimeGate() const {return fTimeGate;}
59 virtual void StepManager() {}
60 virtual void DrawModule() const {}
61 virtual AliHit* FirstHit(Int_t track);
62 virtual AliHit* NextHit();
63 virtual void SetBufferSize(Int_t bufsize=8000) {fBufferSize = bufsize;}
64 virtual TBranch* MakeBranchInTree(TTree *tree, const char* cname, void* address, Int_t size=32000, const char *file=0);
65 virtual TBranch* MakeBranchInTree(TTree *tree, const char* cname, const char* name, void* address, Int_t size=32000, Int_t splitlevel=99, const char *file=0);
67 void MakeTree(Option_t *option); //skowron
69 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
70 void SetLoader(AliLoader* loader){fLoader = loader;}
71 AliLoader* GetLoader() const {return fLoader;} //skowron
72 TTree* TreeH() const; //shorcut method for accessing treeH from folder
76 Float_t fTimeGate; //Time gate in seconds
78 Int_t fIshunt; //1 if the hit is attached to the primary
79 Int_t fNhits; //!Number of hits
80 Int_t fNdigits; //!Number of digits
81 Int_t fBufferSize; //!buffer size for Tree detector branches
82 Int_t fMaxIterHit; //!Limit for the hit iterator
83 Int_t fCurIterHit; //!Counter for the hit iterator
84 TClonesArray *fHits; //!List of hits for one track only
85 TClonesArray *fDigits; //!List of digits for this detector
86 TObjArray *fPoints; //!Array of points for each track (all tracks in memory)
88 AliLoader* fLoader;//! pointer to getter for this module skowron
90 ClassDef(AliDetector,5) //Base class for ALICE detectors