ROOT logo
#ifndef ALIDETECTOR_H
#define ALIDETECTOR_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */

// 
// This is the basic detector class from which
// all ALICE detector derive.
// This class is the base for the implementation of all detectors
// in ALICE
//

#include "AliModule.h"

class AliHit;
class TTree;
class TBranch;
class AliLoader;

class AliDetector : public AliModule {

public:

  // Creators - distructors
  AliDetector(const char* name, const char *title);
  AliDetector();
  virtual ~AliDetector();

  // Inline functions
  virtual int   GetNdigits() const {return fNdigits;}
  virtual int   GetNhits()   const {return fNhits;}
  TClonesArray *Digits() const {return fDigits;}
  TClonesArray *Hits()   const {return fHits;}
  virtual  Bool_t        IsModule() const {return kFALSE;}
  virtual  Bool_t        IsDetector() const {return kTRUE;}

  Int_t         GetIshunt() const {return fIshunt;}
  void          SetIshunt(Int_t ishunt) {fIshunt=ishunt;}
  
  // Other methods
  virtual void        Publish(const char *dir, void *c, const char *name=0) const;
  virtual void        Browse(TBrowser *b);
  virtual void        FinishRun();
  virtual void        MakeBranch(Option_t *opt=" ");
  virtual void        ResetDigits();
  virtual void        ResetHits();
  virtual void        AddAlignableVolumes() const;

  virtual void        SetTreeAddress();
  virtual void        SetTimeGate(Float_t gate) {fTimeGate=gate;}
  virtual Float_t     GetTimeGate() const {return fTimeGate;}
  virtual void        StepManager() {}
  virtual void        DrawModule() const {}
  virtual AliHit*     FirstHit(Int_t track);
  virtual AliHit*     NextHit();
  virtual void        SetBufferSize(Int_t bufsize=8000) {fBufferSize = bufsize;}  
  virtual TBranch*    MakeBranchInTree(TTree *tree, const char* cname, void* address, Int_t size=32000, const char *file=0);
  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);
  
  void MakeTree(Option_t *option); //skowron
  virtual void        RemapTrackHitIDs(Int_t *) {}
  
  virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
  void    SetLoader(AliLoader* loader){fLoader = loader;}
  AliLoader* GetLoader() const {return fLoader;} //skowron
    // Data members
protected:      
  
  Float_t       fTimeGate;    //Time gate in seconds

  Int_t         fIshunt;      //1 if the hit is attached to the primary
  Int_t         fNhits;       //!Number of hits
  Int_t         fNdigits;     //!Number of digits
  Int_t         fBufferSize;  //!buffer size for Tree detector branches
  Int_t         fMaxIterHit;  //!Limit for the hit iterator
  Int_t         fCurIterHit;  //!Counter for the hit iterator
  TClonesArray *fHits;        //!List of hits for one track only
  TClonesArray *fDigits;      //!List of digits for this detector

  AliLoader*  fLoader;//! pointer to getter for this module skowron

 private:
  AliDetector(const AliDetector &det);
  AliDetector &operator=(const AliDetector &det);

  ClassDef(AliDetector,5)  //Base class for ALICE detectors
};
#endif
 AliDetector.h:1
 AliDetector.h:2
 AliDetector.h:3
 AliDetector.h:4
 AliDetector.h:5
 AliDetector.h:6
 AliDetector.h:7
 AliDetector.h:8
 AliDetector.h:9
 AliDetector.h:10
 AliDetector.h:11
 AliDetector.h:12
 AliDetector.h:13
 AliDetector.h:14
 AliDetector.h:15
 AliDetector.h:16
 AliDetector.h:17
 AliDetector.h:18
 AliDetector.h:19
 AliDetector.h:20
 AliDetector.h:21
 AliDetector.h:22
 AliDetector.h:23
 AliDetector.h:24
 AliDetector.h:25
 AliDetector.h:26
 AliDetector.h:27
 AliDetector.h:28
 AliDetector.h:29
 AliDetector.h:30
 AliDetector.h:31
 AliDetector.h:32
 AliDetector.h:33
 AliDetector.h:34
 AliDetector.h:35
 AliDetector.h:36
 AliDetector.h:37
 AliDetector.h:38
 AliDetector.h:39
 AliDetector.h:40
 AliDetector.h:41
 AliDetector.h:42
 AliDetector.h:43
 AliDetector.h:44
 AliDetector.h:45
 AliDetector.h:46
 AliDetector.h:47
 AliDetector.h:48
 AliDetector.h:49
 AliDetector.h:50
 AliDetector.h:51
 AliDetector.h:52
 AliDetector.h:53
 AliDetector.h:54
 AliDetector.h:55
 AliDetector.h:56
 AliDetector.h:57
 AliDetector.h:58
 AliDetector.h:59
 AliDetector.h:60
 AliDetector.h:61
 AliDetector.h:62
 AliDetector.h:63
 AliDetector.h:64
 AliDetector.h:65
 AliDetector.h:66
 AliDetector.h:67
 AliDetector.h:68
 AliDetector.h:69
 AliDetector.h:70
 AliDetector.h:71
 AliDetector.h:72
 AliDetector.h:73
 AliDetector.h:74
 AliDetector.h:75
 AliDetector.h:76
 AliDetector.h:77
 AliDetector.h:78
 AliDetector.h:79
 AliDetector.h:80
 AliDetector.h:81
 AliDetector.h:82
 AliDetector.h:83
 AliDetector.h:84
 AliDetector.h:85
 AliDetector.h:86
 AliDetector.h:87
 AliDetector.h:88
 AliDetector.h:89
 AliDetector.h:90