2 Author: Constantin Loizides <loizides@ikf.physik.uni-frankfurt.de>
7 #include "AliL3RootTypes.h"
8 #include "AliL3Transform.h"
9 #include "AliL3ClustFinderNew.h"
10 #include "AliL3MemHandler.h"
11 #include "AliL3SpacePointData.h"
14 Example program how to run the "standalone" clusterfinder.
17 int main(int argc,char **argv)
24 l.Set(AliL3Logger::kAll);
30 cout<<"Usage: runit datafile [slice] [patch]"<<endl;
40 AliL3DigitRowData *digits = 0;
41 unsigned int ndigits=0;
43 //Storing all specific quantities, needed by the Cluster Finder.
45 strcpy(fname,argv[1]);
46 AliL3Transform::Init(dirname(fname));
47 strcpy(fname,argv[1]);
49 //Does all the file/data handling
52 //Give slice and patch information (see filename convention)
53 if((patch>=0)&&(patch<6)) file.Init(slice,patch);
55 Int_t srows[2]={0,175};
56 file.Init(slice,0,srows);
60 if(!file.SetBinaryInput(fname))
62 cerr<<"Error opening file "<<fname<<endl;
66 //Store the data in memory, and get the pointer to it:
67 digits = file.CompBinary2Memory(ndigits);
68 file.CloseBinaryInput();
70 //The cluster finder itself.
71 AliL3ClustFinderNew cf;
74 cf.InitSlice(0,0,0,ndigits-1,10000);
77 cf.SetSTDOutput(kTRUE);
80 //Switch off deconvolution:
83 //Allocate memory to store found spacepoints
84 AliL3MemHandler fpoints;
85 AliL3SpacePointData *points=(AliL3SpacePointData*)fpoints.Allocate(10000*sizeof(AliL3SpacePointData));
86 cf.SetOutputArray(points);
88 //Give the data pointer to the cluster finder
89 cf.Read(ndigits,digits);