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