]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCDDLRawData.C
doxy: TPC/fastSimul
[u/mrichter/AliRoot.git] / TPC / AliTPCDDLRawData.C
1 #if !defined(__CINT__) 
2
3 #include "AliTPCDDLRawData.h"
4 #include "AliTPCCompression.h"
5 #endif
6
7 /// \file AliTPCDDLRawData.C
8
9 void AliTPCDDLRawData(Int_t eventNumber=0, Int_t LDCsNumber=12){
10   AliTPCDDLRawData *util=new AliTPCDDLRawData();
11   AliTPCCompression *u=new AliTPCCompression();
12   TStopwatch timer;
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   while (eventNumber<=0){
35     cout<<"Insert the event number:";
36     cin>>eventNumber;
37     cout<<endl;
38   }
39
40   //SLICE CREATION
41   //Slices are built here
42   timer.Start();
43   util->RawData(LDCsNumber,eventNumber);
44   timer.Stop();
45   timer.Print();
46
47   /*
48   //SLICE CHECKING
49   //An Altro File is created from the slides
50   cout<<"slice control"<<endl;
51   util->RawDataAltroDecode(LDCsNumber,eventNumber,0);
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");
55   */
56   
57
58   //SLICE COMPRESSION
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)
62   timer.Start();
63   util->RawDataCompDecompress(LDCsNumber,eventNumber,0);
64   timer.Stop();
65   timer.Print();
66
67   /*  
68   //SLICE DECOMPRESSION
69   timer.Start();
70   util->RawDataCompDecompress(LDCsNumber,eventNumber,1);
71   timer.Stop();
72   timer.Print();
73   */
74   
75   /*
76   //SLICE DECOMPRESSED CHECKING  
77   //A new Altro file is created from the decompressed slides
78   util->RawDataAltroDecode(LDCsNumber,eventNumber,1);
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");
82   */
83   delete util;
84   delete u;
85   return;
86 }