]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/programs/runit.cxx
Minor changes to check for NOLOGGING env str and solved some very minor bugs
[u/mrichter/AliRoot.git] / HLT / programs / runit.cxx
CommitLineData
3539d83a 1#include "stream.h"
2#include "AliL3ClustFinderNew.h"
3#include "AliL3MemHandler.h"
4#include "AliL3SpacePointData.h"
5
6//Example program how to run the "standalone" clusterfinder.
7int main(int argc,char **argv)
8{
9 if(argc!=2)
10 {
11 cout<<"Usage: runit datafile"<<endl;
12 return -1;
13 }
14
15 AliL3DigitRowData *digits = 0;
16 unsigned int ndigits=0;
17
18 AliL3MemHandler file; //Does all the file/data handling
19 AliL3Transform transform; //Storing all detector-spesific quantities, needed by the clusterfinder.
20 AliL3ClustFinderNew cf(&transform); //The cluster finder itself.
21
22 //Open the data file:
23 if(!file.SetBinaryInput(argv[1]))
24 {
25 cerr<<"Error opening file "<<argv[1]<<endl;
26 return -1;
27 }
28
29 //Allocate memory to store found spacepoints
30 AliL3MemHandler fpoints;
31 AliL3SpacePointData *points=(AliL3SpacePointData*)fpoints.Allocate(10000*sizeof(AliL3SpacePointData));
32 cf.SetOutputArray(points);
33
34 //Store the data in memory, and get the pointer to it:
35 digits = file.CompBinary2Memory(ndigits);
36 file.CloseBinaryInput();
37
38 //Switch off deconvolution:
39 cf.SetDeconv(false);
40
41 //Init cluster finder
42 cf.InitSlice(0,0,0,20,10000);
43 cf.SetXYError(0.2);
44 cf.SetZError(0.3);
45
46 //Give the data pointer to the cluster finder
47 cf.Read(ndigits,digits);
48
49 //Start processing:
50 cf.ProcessDigits();
51
52 return 0;
53}
54
55
56
57
58