]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/comp/AliL3DataCompressor.h
Introduction of a fast version of the AliITSVertexerZ for HLT
[u/mrichter/AliRoot.git] / HLT / comp / AliL3DataCompressor.h
index de73de4e072df87a99026b1d9b5ecd29cf19344e..a67bcf3b117a9a69f432c42a1aa1c908dd1f7972 100644 (file)
@@ -3,6 +3,8 @@
 #ifndef AliL3_DataCompressor
 #define AliL3_DataCompressor
 
+#include "AliL3RootTypes.h"
+
 class AliL3SpacePointData;
 class AliL3Benchmark;
 class AliL3TrackArray;
@@ -14,44 +16,57 @@ class TFile;
 #endif
 
 struct TempCluster {
-  Float_t pad;
-  Float_t time;
-  Float_t sigmaY2;
-  Float_t sigmaZ2;
-  Int_t charge;
-  Int_t padrow;
+  Float_t fPad; // Pad
+  Float_t fTime; // Time
+  Float_t fSigmaY2; // SigmaY2
+  Float_t fSigmaZ2; // SigmaZ2
+  Int_t fCharge; // Charge
+  Int_t fPadrow; // Pad row
 };
 
 class AliL3DataCompressor {
   
+ public:
+  AliL3DataCompressor();
+  AliL3DataCompressor(Char_t *path,Bool_t keep,Bool_t writeshape);
+  virtual ~AliL3DataCompressor();
+  
+  virtual void LoadData(Int_t event,Bool_t sp=kTRUE);
+  virtual void FillData(Int_t minhits,Bool_t expand);
+  virtual void WriteRemaining(Bool_t select);
+  void DetermineMinBits();
+  void CompressAndExpand(Bool_t arithmeticCoding=kTRUE);
+  void RestoreData(Bool_t remainingOnly=kFALSE);
+  void DoBench(Char_t *fname="benchmark");
+  void DoNotCompress() {fNoCompression=kTRUE;}
+
+  Int_t GetNusedClusters() const {return fNusedClusters;}
+  Int_t GetNunusedClusters() const {return fNunusedClusters;}
+
+ protected:
+  Char_t fPath[1024];   //! Path to the files
+  Int_t fEvent; // Current event
+  Int_t fNusedClusters; // Number of used clusters
+  Int_t fNunusedClusters; // Number of unused clusters
+  
+  Bool_t fWriteClusterShape; // Flag to write the cluster's shape
+  Bool_t fKeepRemaining; // Flag to keep the remaining clusters
+  Bool_t fSinglePatch; // Flag to run over single patch (?)
+  Bool_t fWriteIdsToFile; // Flag (not used?)
+  Bool_t fNoCompression; //Just process the data through the chain, but do not compress. (input=output). Mostly for debugging...
+
  private:
-  AliL3Benchmark *fBenchmark;    //!
-  AliL3TrackArray *fInputTracks; //!
-  AliL3SpacePointData *fClusters[36][6]; //!
-  ofstream *fCompRatioFile;      //!
+  AliL3Benchmark *fBenchmark;    //! Benchmark
+  AliL3TrackArray *fInputTracks; //! Array of input tracks
+  AliL3SpacePointData *fClusters[36][6]; //! Array of pointers to clusters
+  ofstream *fCompRatioFile;      //! Stream to write the ration between use and unused clusters
 #ifdef use_root
-  TFile *fOutputFile;            //!
+  TFile *fOutputFile;            //! Output file
 #else
-  FILE *fOutputFile;
+  FILE *fOutputFile; // Output file
 #endif
-  
-  UInt_t fNcl[36][6];
-  
-  static Int_t fNumPadBits;
-  static Int_t fNumTimeBits;
-  static Int_t fNumChargeBits;
-  static Int_t fNumShapeBits;
-  
-  static Float_t fXYResidualStep1;
-  static Float_t fXYResidualStep2;
-  static Float_t fXYResidualStep3;
-  static Float_t fZResidualStep1;
-  static Float_t fZResidualStep2;
-  static Float_t fZResidualStep3;
-  static Float_t fXYWidthStep;
-  static Float_t fZWidthStep;
-  static Int_t fClusterCharge;
-  
+  UInt_t fNcl[36][6]; // Array containing numbers of clusters
+   
   void SelectRemainingClusters();
   void ExpandTrackData(AliL3TrackArray *tracks);
   void ReadUncompressedData(TempCluster **clusters,Int_t *ncl,const Int_t maxpoints);
@@ -61,41 +76,6 @@ class AliL3DataCompressor {
   void OpenOutputFile();
   void CloseOutputFile();
   
- protected:
-  Char_t fPath[1024];            //!
-  Int_t fEvent;
-  
-  Bool_t fWriteClusterShape;
-  Bool_t fKeepRemaining;
-  Bool_t fSinglePatch;
-  
- public:
-  AliL3DataCompressor();
-  AliL3DataCompressor(Char_t *path,Bool_t keep,Bool_t writeshape);
-  virtual ~AliL3DataCompressor();
-  
-  virtual void LoadData(Int_t event,Bool_t sp=kTRUE);
-  virtual void FillData(Int_t minhits,Bool_t expand);
-  virtual void WriteRemaining(Bool_t select);
-  void CompressAndExpand();
-  void RestoreData(Bool_t remaining_only=kFALSE);
-  void DoBench(Char_t *fname="benchmark");
-  
-  void SetBitNumbers(Int_t pad,Int_t time,Int_t charge,Int_t shape);
-  void SetTransverseResolutions(Float_t res1,Float_t res2,Float_t res3,Float_t width=0.005);
-  void SetLongitudinalResolutions(Float_t res1,Float_t res2,Float_t res3,Float_t width=0.005);
-  
-  static const Int_t GetNPadBits() {return fNumPadBits;}
-  static const Int_t GetNTimeBits() {return fNumTimeBits;}
-  static const Int_t GetNChargeBits() {return fNumChargeBits;}
-  static const Int_t GetNShapeBits() {return fNumShapeBits;}
-  static const Float_t GetXYWidthStep() {return fXYWidthStep;}
-  static const Float_t GetZWidthStep() {return fZWidthStep;}
-  static const Int_t GetClusterCharge() {return fClusterCharge;}
-  static const Float_t GetXYResidualStep(Int_t row);
-  static const Float_t GetZResidualStep(Int_t row);
-
-
   ClassDef(AliL3DataCompressor,1) 
 
 };