]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCDDLRawData.C
Solving problems on Sun (D.Favretto)
[u/mrichter/AliRoot.git] / TPC / AliTPCDDLRawData.C
1 #if !defined(__CINT__) 
2
3 #include "AliTPCDDLRawData.h"
4 #include "AliTPCCompression.h"
5 #endif
6
7
8 void AliTPCDDLRawData(Int_t LDCsNumber=12){
9   AliTPCDDLRawData *util=new AliTPCDDLRawData();
10   AliTPCCompression *u=new AliTPCCompression();
11   TStopwatch timer;
12
13   static const Int_t NumTable=5;
14   
15   //TABLES CREATION
16   //The Altro File "AltroFormatDDL.dat" is built from "AliTPCDDL.dat"
17   util->RawDataAltro();
18   //u->SetVerbose(1);
19   //The file "AltroFormatDDL.dat" is converted in a txt file "AltroFormatDDL.txt"
20   //that is used for debugging
21   
22   cout<<"Creating a txt file from an Altro format file"<<endl;
23   u->ReadAltroFormat("AltroFormatDDL.txt","AltroFormatDDL.dat");
24   
25   //Tables are created and stored in as sequence of binary files
26   u->CreateTables("AltroFormatDDL.dat",NumTable);
27   
28
29   
30   //SLICE CREATION
31   //Slices are built here
32   timer.Start();
33   util->RawData(LDCsNumber);
34   timer.Stop();
35   timer.Print();
36   
37   
38   //SLICE CHECKING
39   //An Altro File is created from the slides
40   cout<<"slice control"<<endl;
41   util->RawDataAltroDecode(LDCsNumber,0);
42   ///The Altro file AltroDDLRecomposed.dat is converted in a txt file AltroDDLRecomposed.txt
43   //This file must be equal to the ones created above.
44   cout<<"Creating a txt file from an Altro format file"<<endl;
45   u->ReadAltroFormat("AltroDDLRecomposed.txt","AltroDDLRecomposed.dat");
46   
47   
48   
49   //SLICE COMPRESSION
50   cout<<"Slice Compression"<<endl;
51   //Slices are compressed here using the tables created above or an optimized set of tables 
52   //(Tables file for Huffman coding are required)
53   timer.Start();
54   util->RawDataCompDecompress(LDCsNumber,0);
55   timer.Stop();
56   timer.Print();
57   
58   
59   //SLICE DECOMPRESSION
60   timer.Start();
61   util->RawDataCompDecompress(LDCsNumber,1);
62   timer.Stop();
63   timer.Print();
64   
65   
66   
67   //SLICE DECOMPRESSED CHECKING  
68   //A new Altro file is created from the decompressed slides
69   util->RawDataAltroDecode(LDCsNumber,1);
70   //Convertion of the Altro file AltroDDLRecomposedDec.dat in a txt file AltroDDLRecomposedDec.txt
71   //Useful for debugging
72   cout<<"Creating a txt file from an Altro format file"<<endl;
73   u->ReadAltroFormat("AltroDDLRecomposedDec.txt","AltroDDLRecomposedDec.dat");
74   
75   delete util;
76   delete u;
77   return;
78 }