]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCDDLRawData.C
Logs added
[u/mrichter/AliRoot.git] / TPC / AliTPCDDLRawData.C
CommitLineData
2e9f335b 1#if !defined(__CINT__) || defined(__MAKECINT__)
2
3#include "AliTPCDDLRawData.h"
4#include "AliTPCCompression.h"
5#include <alles.h>
6#endif
7
8
9void 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 u->ReadAltroFormat("AltroFormatDDL.txt","AltroFormatDDL.dat");
23 //Tables are created and stored in as sequence of binary files
24 u->CreateTables("AltroFormatDDL.dat",NumTable);
25
26
27
28 //SLICE CREATION
29 //Slices are built here
30 timer.Start();
31 util->RawData(LDCsNumber);
32 timer.Stop();
33 timer.Print();
34
35
36 /*
37 //SLICE CHECKING
38 //An Altro File is created from the slides
39 util->RawDataAltroDecode(LDCsNumber,0);
40 ///The Altro file AltroDDLRecomposed.dat is converted in a txt file AltroDDLRecomposed.txt
41 //This file must be equal to the ones created above.
42 u->ReadAltroFormat("AltroDDLRecomposed.txt","AltroDDLRecomposed.dat");
43 */
44
45
46 //SLICE COMPRESSION
47 //Slices are compressed here using the tables created above or an optimized set of tables (Tables file for Huffman coding are required)
48 timer.Start();
49 util->RawDataCompDecompress(LDCsNumber,0);
50 timer.Stop();
51 timer.Print();
52
53
54 /*
55 //SLICE DECOMPRESSION
56 timer.Start();
57 util->RawDataCompDecompress(LDCsNumber,1);
58 timer.Stop();
59 timer.Print();
60 */
61
62
63 //SLICE DECOMPRESSED CHECKING
64 //A new Altro file is created from the decompressed slides
65 util->RawDataAltroDecode(LDCsNumber,1);
66 //Convertion of the Altro file AltroDDLRecomposedDec.dat in a txt file AltroDDLRecomposedDec.txt
67 //Useful for debugging
68 u->ReadAltroFormat("AltroDDLRecomposedDec.txt","AltroDDLRecomposedDec.dat");
69
70 delete util;
71 delete u;
72 return;
73}