]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/programs/runvhdlhough.cxx
Merged HLT tag v1-2 with ALIROOT tag v3-09-Release.
[u/mrichter/AliRoot.git] / HLT / programs / runvhdlhough.cxx
1 // $Id$
2    
3 // Author: Constantin Loizides <loizides@ikf.uni-frankfurt.de>
4
5
6 #include "AliL3StandardIncludes.h"
7
8 #include "AliL3RootTypes.h"
9 #include "AliL3Transform.h"
10 #include "AliL3VHDLClusterFinder.h"
11 #include "AliL3AltroMemHandler.h"
12 #include "AliL3Logging.h"
13 #include "AliL3Logger.h"
14
15 #if GCCVERSION == 3
16 using namespace std;
17 #else
18 #include <stream.h>
19 #endif
20
21
22 /**
23 Example program how to run the vhdl hough code.
24 */
25
26 int main(int argc,char **argv)
27 {
28 #if 0
29   Int_t slice=0;
30   Int_t patch=0;
31   Int_t fm=4;
32   Int_t th=10;
33
34   AliL3Logger l;
35   l.Set(AliL3Logger::kAll);
36   l.UseStderr();
37   //l.UseStdout();
38   //l.UseStream();
39
40   if(argc<2){
41     cout<<"Usage: runvhdlcf altrodatafile [slice] [patch] [matchwidth] [threshold]"<<endl;
42     return -1;
43   }
44   if (argc>2) {
45     slice=atoi(argv[2]);
46   }
47   if (argc>3) {
48     patch=atoi(argv[3]);
49   }
50   if (argc>4) {
51     fm=atoi(argv[4]);
52   }
53   if (argc>5) {
54     th=atoi(argv[5]);
55   }
56
57   //Storing all specific quantities, needed by the Cluster Finder.
58   //Char_t fname[1024];
59   //strcpy(fname,argv[1]);
60   //AliL3Transform::Init(dirname(fname)); 
61   //strcpy(fname,argv[1]);
62
63   FILE *afile=fopen(argv[1],"r");
64   if(!afile) {
65     cerr << "Can't open file " << argv[1] << endl;
66     exit(1);
67   }
68
69   AliL3VHDLClusterFinder cf;
70   cf.SetASCIIInput(afile);
71
72   //set cluster finder parameters
73   cf.SetMatchWidth(fm);
74   cf.SetThreshold(th);
75   //cf.SetXYError(0.2);
76   //cf.SetZError(0.3);
77   cf.SetSTDOutput(kTRUE);
78   cf.SetCalcErr(kTRUE);
79   //cf.SetDeconv(kFALSE);
80   
81   //start processing data
82   cf.ProcessDigits();
83
84   if(afile) fclose(afile);
85   exit(1);
86 #endif
87 }
88
89
90
91
92