]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliSimDigits.h
Marian
[u/mrichter/AliRoot.git] / TPC / AliSimDigits.h
index 61a3e44736d48b816807ae04ff0d478ccd3968e0..43a10917170008dd5644b86e76cfa81177e08818 100644 (file)
@@ -9,19 +9,24 @@
 //  Manager class generaol Alice segment digits
 //  segment is for example one pad row in TPC //
 ////////////////////////////////////////////////
-#include "TError.h"
-#include   "AliArrayI.h"
-#include   "AliArrayS.h"
+#include <TError.h>
+#include <TArrayI.h>
+#include <TClonesArray.h>
+#include   "AliDigits.h"
+
 class AliH2F;
 
 
 class AliSimDigits : public AliDigits{
 public: 
   AliSimDigits();
-  ~AliSimDigits();
+  AliSimDigits(const AliSimDigits &param);
+  AliSimDigits &operator = (const AliSimDigits & digits); 
+  virtual ~AliSimDigits();
   void AllocateTrack(Int_t length);  //construct empty buffer fTracks with size rows x column x length (number of tracks for one digit)
-  inline Int_t GetTrackIDFast(Int_t row, Int_t column,Int_t level);  //return track ID  at given row and collumn
-  inline void  SetTrackIDFast(Int_t value,Int_t row, Int_t column,Int_t level);  //set ID track at given row and collumn
+  Int_t *GetTracks(){return fTracks->GetArray();}
+  Int_t GetTrackIDFast(Int_t row, Int_t column,Int_t level);  //return track ID  at given row and collumn
+  void  SetTrackIDFast(Int_t value,Int_t row, Int_t column,Int_t level);  //set ID track at given row and collumn
   virtual Int_t GetTrackID(Int_t row, Int_t column, Int_t level);
   virtual void ExpandTrackBuffer();  //expand buffer to twodimensional array
   virtual void CompresTrackBuffer(Int_t bufType); //compres buffer according buffertype algorithm 
@@ -29,7 +34,7 @@ public:
                  Float_t x1=-1, Float_t x2=-1, Float_t y1=-1, Float_t y2=-1); //draw tracks
   TClonesArray * GenerTPCClonesArray(TClonesArray * arr); //generate TClonnesArray of digits
   //only for demonstration purpose
-public:
+private:
   void InvalidateTrack();
  
   Int_t GetTrackID1(Int_t row, Int_t column, Int_t level);  //returnb track ID of digits - for buffer compresion 1 
@@ -40,17 +45,17 @@ public:
   void  ExpandTrackBuffer2(); //comress track according algorithm 2 (track ID comression according  digit compression)
   void  CompresTrackBuffer2(); //comress track according algorithm 2 (track ID comression according  digit compression)
 
-  AliArrayI * fTracks;     //buffer of track index 
-  AliArrayI * fTrIndex;    //index position of column
+  TArrayI * fTracks;     //buffer of track index 
+  TArrayI * fTrIndex;    //index position of column
   Int_t       fNlevel;   //number of tracks etries  for one digit
   Int_t       fTrBufType;  //buffer type of the tracks
   // Bool_t      ClassError( ); //signalize class error 
-  ClassDef(AliSimDigits,1
+  ClassDef(AliSimDigits,2
 };
 
 
 
-Int_t AliSimDigits::GetTrackIDFast(Int_t row, Int_t column,Int_t level)
+inline Int_t AliSimDigits::GetTrackIDFast(Int_t row, Int_t column,Int_t level)
 {
   //
   //return track ID  at given row and column
@@ -58,9 +63,10 @@ Int_t AliSimDigits::GetTrackIDFast(Int_t row, Int_t column,Int_t level)
   return fTracks->At(level*fNrows*fNcols+fNrows*column+row); 
 }
  
-void AliSimDigits::SetTrackIDFast(Int_t value,Int_t row, Int_t column,Int_t level)
+inline void AliSimDigits::SetTrackIDFast(Int_t value,Int_t row, Int_t column,Int_t level)
 {
-value+=2;
+  //
+  value+=2;
   //set ID track at given row and collumn
   //  fTracks[level][fTrIndex[level][column]+row]=value; 
   if ( (row<0) || (row>=fNrows)  || (column<0) || (column>=fNcols) ) 
@@ -73,3 +79,9 @@ value+=2;
 
 
 #endif
+
+
+
+
+
+