]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCH5OptimizedTables.C
Included primary vertex rec. with pixels or tracks in pp (A.Dainese)
[u/mrichter/AliRoot.git] / TPC / AliTPCH5OptimizedTables.C
1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 #include <fstream.h>
3 #include <alles.h>
4 #include "AliTPCCompression.h"
5 #endif
6
7 /*
8 This macro compress and decompress an Altro format file using Huffman technique with 5 tables
9 */
10
11 void AliTPCH5OptimizedTables(const char* fSource="AltroFormat.dat",const char* fDest="CompressedData.dat"){
12   cout<<"Source file: "<<fSource<<" Output file: "<<fDest<<endl;
13   static const Int_t NumTable=5;
14   AliTPCCompression *util = new AliTPCCompression();
15   TStopwatch timer;
16   //verbose level can be: 0=silent 1=few messages 2=pedantic output
17   util->SetVerbose(2);
18   //Tables are created
19   util->CreateTables(fSource,NumTable);
20   //util->ReadAltroFormat("File1.txt","AltroFormat.dat");
21   //The source file is compressed 
22   
23   timer.Start();
24   util->CompressDataOptTables(NumTable,fSource,fDest);
25   timer.Stop();
26   timer.Print();
27   
28   /*  
29   //The Compressed file is decompressed  
30   timer.Start();
31   util->DecompressDataOptTables(NumTable,fDest);
32   timer.Stop();
33   timer.Print();
34   //util->ReadAltroFormat("File2.txt","SourceDecompressed.dat");
35   */
36   delete util;
37 }