]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliDetector.h
Correction of minor typing mistakes
[u/mrichter/AliRoot.git] / STEER / AliDetector.h
index 127203155006c483777226fea1e673dd2a360053..114a320bed2d82cb377b6fa46534adb629eee173 100644 (file)
@@ -1,43 +1,34 @@
-#ifndef AliDetector_H
-#define AliDetector_H
+#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$ */
 
 #include <AliModule.h>
-#include <AliHit.h>
+class AliHit;
 
 class AliDetector : public AliModule {
 
-  // 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
-  TClonesArray *fHits;        //List of hits for one track only
-  TClonesArray *fDigits;      //List of digits for this detector
-  TObjArray    *fPoints;      //Array of points for each track (all tracks in memory)
-
 public:
 
   // Creators - distructors
   AliDetector(const char* name, const char *title);
   AliDetector();
+  AliDetector(const AliDetector &det) {det.Copy(*this);}
   virtual ~AliDetector();
 
   // Inline functions
-  inline virtual int   GetNdigits() {return fNdigits;}
-  inline virtual int   GetNhits()   {return fNhits;}
-  inline TClonesArray *Digits() {return fDigits;}
-  inline TClonesArray *Hits()   {return fHits;}
-  inline TObjArray    *Points() {return fPoints;}
-  inline Int_t         GetIshunt() {return fIshunt;}
-  inline void          SetIshunt(Int_t ishunt) {fIshunt=ishunt;}
+          void  Copy(AliDetector &det) const;
+  virtual int   GetNdigits() const {return fNdigits;}
+  virtual int   GetNhits()   const {return fNhits;}
+  TClonesArray *Digits() const {return fDigits;}
+  TClonesArray *Hits()   const {return fHits;}
+  TObjArray    *Points() const {return fPoints;}
+  Int_t         GetIshunt() const {return fIshunt;}
+  void          SetIshunt(Int_t ishunt) {fIshunt=ishunt;}
+  AliDetector &operator=(const AliDetector &det) 
+  {det.Copy(*this); return (*this);}
   
   // Other methods
   virtual void        Browse(TBrowser *b);
@@ -49,13 +40,26 @@ public:
   virtual void        ResetPoints();
   virtual void        SetTreeAddress();
   virtual void        SetTimeGate(Float_t gate) {fTimeGate=gate;}
-  virtual Float_t     GetTimeGate() {return fTimeGate;}
+  virtual Float_t     GetTimeGate() const {return fTimeGate;}
   virtual void        StepManager() {}
   virtual void        DrawModule() {}
-  virtual AliHit*     FirstHit(Int_t);
+  virtual AliHit*     FirstHit(Int_t track);
   virtual AliHit*     NextHit();
   virtual void        SetBufferSize(Int_t bufsize=8000) {fBufferSize = bufsize;}  
  
+  // 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
+  TClonesArray *fHits;        //List of hits for one track only
+  TClonesArray *fDigits;      //List of digits for this detector
+  TObjArray    *fPoints;      //Array of points for each track (all tracks in memory)
+
   ClassDef(AliDetector,1)  //Base class for ALICE detectors
 };
 #endif