]>
Commit | Line | Data |
---|---|---|
8918e700 | 1 | #ifndef ALIDETECTOR_H |
2 | #define ALIDETECTOR_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 | ||
88cb7938 | 8 | #include "AliModule.h" |
9 | ||
94de3818 | 10 | class AliHit; |
2ab0c725 | 11 | class TTree; |
9e1a0ddb | 12 | class TBranch; |
88cb7938 | 13 | class AliLoader; |
14 | ||
8494b010 | 15 | class AliDetector : public AliModule { |
fe4da5cc | 16 | |
fe4da5cc | 17 | public: |
18 | ||
19 | // Creators - distructors | |
20 | AliDetector(const char* name, const char *title); | |
21 | AliDetector(); | |
e2afb3b6 | 22 | AliDetector(const AliDetector &det); |
fe4da5cc | 23 | virtual ~AliDetector(); |
24 | ||
25 | // Inline functions | |
6644b9ca | 26 | void Copy(AliDetector &det) const; |
94de3818 | 27 | virtual int GetNdigits() const {return fNdigits;} |
28 | virtual int GetNhits() const {return fNhits;} | |
29 | TClonesArray *Digits() const {return fDigits;} | |
30 | TClonesArray *Hits() const {return fHits;} | |
88cb7938 | 31 | |
94de3818 | 32 | TObjArray *Points() const {return fPoints;} |
33 | Int_t GetIshunt() const {return fIshunt;} | |
8918e700 | 34 | void SetIshunt(Int_t ishunt) {fIshunt=ishunt;} |
ef42d733 | 35 | AliDetector &operator=(const AliDetector &det) |
8918e700 | 36 | {det.Copy(*this); return (*this);} |
fe4da5cc | 37 | |
fe4da5cc | 38 | // Other methods |
9e1a0ddb | 39 | virtual void Publish(const char *dir, void *c, const char *name=0); |
fe4da5cc | 40 | virtual void Browse(TBrowser *b); |
fe4da5cc | 41 | virtual void FinishRun(); |
fe4da5cc | 42 | virtual void LoadPoints(Int_t track); |
88cb7938 | 43 | virtual void MakeBranch(Option_t *opt=" "); |
fe4da5cc | 44 | virtual void ResetDigits(); |
45 | virtual void ResetHits(); | |
88cb7938 | 46 | |
fe4da5cc | 47 | virtual void ResetPoints(); |
48 | virtual void SetTreeAddress(); | |
49 | virtual void SetTimeGate(Float_t gate) {fTimeGate=gate;} | |
94de3818 | 50 | virtual Float_t GetTimeGate() const {return fTimeGate;} |
8494b010 | 51 | virtual void StepManager() {} |
52 | virtual void DrawModule() {} | |
8918e700 | 53 | virtual AliHit* FirstHit(Int_t track); |
fe4da5cc | 54 | virtual AliHit* NextHit(); |
55 | virtual void SetBufferSize(Int_t bufsize=8000) {fBufferSize = bufsize;} | |
9e1a0ddb | 56 | virtual TBranch* MakeBranchInTree(TTree *tree, const char* cname, void* address, Int_t size=32000, const char *file=0); |
d0f40f23 | 57 | 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); |
88cb7938 | 58 | |
59 | void MakeTree(Option_t *option); //skowron | |
60 | ||
61 | virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type) | |
62 | void SetLoader(AliLoader* loader){fLoader = loader;} | |
63 | AliLoader* GetLoader() const {return fLoader;} //skowron | |
64 | TTree* TreeH(); //shorcut method for accessing treeH from folder | |
65 | // Data members | |
8918e700 | 66 | protected: |
67 | ||
68 | Float_t fTimeGate; //Time gate in seconds | |
69 | ||
70 | Int_t fIshunt; //1 if the hit is attached to the primary | |
2ab0c725 | 71 | Int_t fNhits; //!Number of hits |
72 | Int_t fNdigits; //!Number of digits | |
73 | Int_t fBufferSize; //!buffer size for Tree detector branches | |
2388c363 | 74 | TClonesArray *fHits; //!List of hits for one track only |
75 | TClonesArray *fDigits; //!List of digits for this detector | |
2ab0c725 | 76 | TObjArray *fPoints; //!Array of points for each track (all tracks in memory) |
2cad796f | 77 | |
88cb7938 | 78 | AliLoader* fLoader;//! pointer to getter for this module skowron |
79 | ||
80 | ClassDef(AliDetector,4) //Base class for ALICE detectors | |
fe4da5cc | 81 | }; |
82 | #endif |