]>
Commit | Line | Data |
---|---|---|
b62e2a95 | 1 | #if !defined(__CINT__) |
2e9f335b | 2 | |
3 | #include "AliTPCDDLRawData.h" | |
4 | #include "AliTPCCompression.h" | |
2e9f335b | 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(); | |
9f992f70 | 18 | //u->SetVerbose(1); |
2e9f335b | 19 | //The file "AltroFormatDDL.dat" is converted in a txt file "AltroFormatDDL.txt" |
20 | //that is used for debugging | |
b62e2a95 | 21 | |
9f992f70 | 22 | cout<<"Creating a txt file from an Altro format file"<<endl; |
2e9f335b | 23 | u->ReadAltroFormat("AltroFormatDDL.txt","AltroFormatDDL.dat"); |
b62e2a95 | 24 | |
2e9f335b | 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 | ||
b62e2a95 | 37 | |
2e9f335b | 38 | //SLICE CHECKING |
39 | //An Altro File is created from the slides | |
a79660fb | 40 | cout<<"slice control"<<endl; |
2e9f335b | 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. | |
9f992f70 | 44 | cout<<"Creating a txt file from an Altro format file"<<endl; |
2e9f335b | 45 | u->ReadAltroFormat("AltroDDLRecomposed.txt","AltroDDLRecomposed.dat"); |
b62e2a95 | 46 | |
9f992f70 | 47 | |
2e9f335b | 48 | |
49 | //SLICE COMPRESSION | |
a79660fb | 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) | |
2e9f335b | 53 | timer.Start(); |
54 | util->RawDataCompDecompress(LDCsNumber,0); | |
55 | timer.Stop(); | |
56 | timer.Print(); | |
57 | ||
b62e2a95 | 58 | |
2e9f335b | 59 | //SLICE DECOMPRESSION |
60 | timer.Start(); | |
61 | util->RawDataCompDecompress(LDCsNumber,1); | |
62 | timer.Stop(); | |
63 | timer.Print(); | |
9f992f70 | 64 | |
b62e2a95 | 65 | |
66 | ||
2e9f335b | 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 | |
9f992f70 | 72 | cout<<"Creating a txt file from an Altro format file"<<endl; |
2e9f335b | 73 | u->ReadAltroFormat("AltroDDLRecomposedDec.txt","AltroDDLRecomposedDec.dat"); |
b62e2a95 | 74 | |
2e9f335b | 75 | delete util; |
76 | delete u; | |
77 | return; | |
78 | } |