]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCH5OptimizedTables.C
Float_t replaced by Double_t
[u/mrichter/AliRoot.git] / TPC / AliTPCH5OptimizedTables.C
CommitLineData
2e9f335b 1#if !defined(__CINT__) || defined(__MAKECINT__)
2#include <fstream.h>
3#include <alles.h>
4#include "AliTPCCompression.h"
5#endif
6
7/*
8This macro compress and decompress an Altro format file using Huffman technique with 5 tables
9*/
10
11void 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;
a79660fb 16 //verbose level can be: 0=silent 1=few messages 2=pedantic output
2e9f335b 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
a79660fb 28 /*
2e9f335b 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}