ROOT logo
#ifndef ALITOFSDIGIT_H
#define ALITOFSDIGIT_H

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

////////////////////////////////////////////////
//                                            //
//  Class for TOF SDigits                     //
//                                            //
////////////////////////////////////////////////

/* $Id$ */

#include "TObject.h"
//#include "TArrayF.h"
#include "TArrayI.h"

class AliTOFSDigit : public TObject {

  //overloading of the streamer << operator
  //friend ostream& operator << ( ostream& , const AliTOFSDigit&) ;

 public:
  AliTOFSDigit();
  AliTOFSDigit(Int_t tracknum, Int_t * const vol, Int_t * const digit);
// new ctor for sdigits
  AliTOFSDigit(Int_t sector, Int_t plate, Int_t strip, Int_t padx, Int_t padz, Int_t tdc, Int_t adc);
// copy ctor
  AliTOFSDigit(const AliTOFSDigit & digit) ;
  AliTOFSDigit& operator=(const AliTOFSDigit & digit) ;
  virtual ~AliTOFSDigit();
  void            GetLocation(Int_t* Loc) const;
  Int_t           GetTotPad() const;

  void Update(Float_t tdcbin, Int_t tdc, Int_t adc, Int_t track);
  void Update(AliTOFSDigit * const sdig);

// getters for AliTOFSDigit object 
  Int_t   GetNDigits() const    {return fNDigits;}
  Int_t GetTdc(Int_t i) const {return fTdc->At(i);}
  Int_t GetAdc(Int_t i) const {return fAdc->At(i);}
//  Int_t   GetNTracks(Int_t i) const {return fTracks[i]->GetSize();}
  Int_t   GetTrack(Int_t i, Int_t j) const {return fTracks->At(i*kMAXDIGITS+j);}
  Int_t   GetSector() const     {return fSector;}
  Int_t   GetPlate()  const     {return fPlate;}
  Int_t   GetStrip()  const     {return fStrip;}
  Int_t   GetPadx()   const     {return fPadx;}
  Int_t   GetPadz()   const     {return fPadz;}

  enum {
    kMAXDIGITS = 3 // number 3 is a legacy from AliDigit object
  };

protected:

  Int_t   fSector;  // number of sector
  Int_t   fPlate;   // number of plate
  Int_t   fStrip;   // number of strip
  Int_t   fPadx;    // number of pad along x
  Int_t   fPadz;    // number of pad along z
  Int_t   fNDigits;  // dimension of fTdc array
  TArrayI *fTdc;     // tdc values for sdigit
  TArrayI *fAdc;     // adc values for sdigit
  TArrayI *fTracks;  // contributing tracks, kMAXDIGITS entries per
                     // 1 tdc value
  ClassDef(AliTOFSDigit,2)  // SDigit for Time Of Flight
};

#endif /* ALITOFSDIGIT_H */
 AliTOFSDigit.h:1
 AliTOFSDigit.h:2
 AliTOFSDigit.h:3
 AliTOFSDigit.h:4
 AliTOFSDigit.h:5
 AliTOFSDigit.h:6
 AliTOFSDigit.h:7
 AliTOFSDigit.h:8
 AliTOFSDigit.h:9
 AliTOFSDigit.h:10
 AliTOFSDigit.h:11
 AliTOFSDigit.h:12
 AliTOFSDigit.h:13
 AliTOFSDigit.h:14
 AliTOFSDigit.h:15
 AliTOFSDigit.h:16
 AliTOFSDigit.h:17
 AliTOFSDigit.h:18
 AliTOFSDigit.h:19
 AliTOFSDigit.h:20
 AliTOFSDigit.h:21
 AliTOFSDigit.h:22
 AliTOFSDigit.h:23
 AliTOFSDigit.h:24
 AliTOFSDigit.h:25
 AliTOFSDigit.h:26
 AliTOFSDigit.h:27
 AliTOFSDigit.h:28
 AliTOFSDigit.h:29
 AliTOFSDigit.h:30
 AliTOFSDigit.h:31
 AliTOFSDigit.h:32
 AliTOFSDigit.h:33
 AliTOFSDigit.h:34
 AliTOFSDigit.h:35
 AliTOFSDigit.h:36
 AliTOFSDigit.h:37
 AliTOFSDigit.h:38
 AliTOFSDigit.h:39
 AliTOFSDigit.h:40
 AliTOFSDigit.h:41
 AliTOFSDigit.h:42
 AliTOFSDigit.h:43
 AliTOFSDigit.h:44
 AliTOFSDigit.h:45
 AliTOFSDigit.h:46
 AliTOFSDigit.h:47
 AliTOFSDigit.h:48
 AliTOFSDigit.h:49
 AliTOFSDigit.h:50
 AliTOFSDigit.h:51
 AliTOFSDigit.h:52
 AliTOFSDigit.h:53
 AliTOFSDigit.h:54
 AliTOFSDigit.h:55
 AliTOFSDigit.h:56
 AliTOFSDigit.h:57
 AliTOFSDigit.h:58
 AliTOFSDigit.h:59
 AliTOFSDigit.h:60
 AliTOFSDigit.h:61
 AliTOFSDigit.h:62
 AliTOFSDigit.h:63
 AliTOFSDigit.h:64
 AliTOFSDigit.h:65
 AliTOFSDigit.h:66
 AliTOFSDigit.h:67
 AliTOFSDigit.h:68
 AliTOFSDigit.h:69
 AliTOFSDigit.h:70