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