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