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