]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/programs/gettransform.cxx
Little bugfixes for new alitroot version.
[u/mrichter/AliRoot.git] / HLT / programs / gettransform.cxx
1 //$Id$
2
3 //Author: Constantin Loizides <mailto:loizides@ikf.uni-frankfurt.de>
4
5 /**
6    This program extracts parameters and lookup tables needed for the
7    vhdl implementation of the Hough transform. 
8 */
9
10 #include <AliL3StandardIncludes.h>
11 #include <AliL3RootTypes.h>
12 #include <AliL3Transform.h>
13 #include <AliL3Logging.h>
14 #include <AliL3Logger.h>
15 #include <AliL3MemHandler.h>
16 #include <AliL3HoughTransformerVhdl.h>
17
18 int main(int argc,char **argv)
19 {
20   Int_t patch=0;
21   Int_t slice=0;
22   Char_t path[1000];
23
24   AliL3Logger l;
25   l.Set(AliL3Logger::kAll);
26   l.UseStderr();
27   //l.UseStdout();
28   //l.UseStream();
29     
30   if (argc>1) {
31     slice=atoi(argv[1]);
32   }
33   if (argc>2) {
34     patch=atoi(argv[2]);
35   }  
36   if (argc>3) {
37     strcpy(path,argv[3]);
38   } else strcpy(path,"/tmp/data/RawData/slice0");
39   if(argc>4){
40     cout<<"Usage: transform [slice] [patch] [path]"<<endl;
41     exit(1);
42   }
43
44   AliL3Transform::Init(path);
45   //cerr << "Transform version: " << AliL3Transform::GetVersion() << endl;
46
47   AliL3HoughTransformerVhdl vtest(slice,patch,100,10);
48   vtest.CreateHistograms(64,0.1,64,-30,30);
49   vtest.PrintVhdl();
50   exit(0);
51 }
52