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