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