]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/programs/runvhdlhough.cxx
L3 becomes HLT
[u/mrichter/AliRoot.git] / HLT / programs / runvhdlhough.cxx
CommitLineData
3e87ef69 1// $Id$
2
3// Author: Constantin Loizides <loizides@ikf.uni-frankfurt.de>
02f030e3 4//*-- Copyright &copy ALICE HLT Group
3e87ef69 5
6
4aa41877 7#include "AliHLTStandardIncludes.h"
3e87ef69 8
4aa41877 9#include "AliHLTRootTypes.h"
10#include "AliHLTTransform.h"
11#include "AliHLTVHDLClusterFinder.h"
12#include "AliHLTAltroMemHandler.h"
13#include "AliHLTLogging.h"
14#include "AliHLTLogger.h"
3e87ef69 15
0bd0c1ef 16#if __GNUC__ == 3
3e87ef69 17using namespace std;
18#else
19#include <stream.h>
20#endif
21
22
23/**
24Example program how to run the vhdl hough code.
25*/
26
27int 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
4aa41877 35 AliHLTLogger l;
36 l.Set(AliHLTLogger::kAll);
3e87ef69 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]);
4aa41877 61 //AliHLTTransform::Init(dirname(fname));
3e87ef69 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
4aa41877 70 AliHLTVHDLClusterFinder cf;
3e87ef69 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