2 #include "AliL3ClustFinderNew.h"
3 #include "AliL3MemHandler.h"
4 #include "AliL3SpacePointData.h"
6 //Example program how to run the "standalone" clusterfinder.
7 int main(int argc,char **argv)
11 cout<<"Usage: runit datafile"<<endl;
15 AliL3DigitRowData *digits = 0;
16 unsigned int ndigits=0;
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.
23 if(!file.SetBinaryInput(argv[1]))
25 cerr<<"Error opening file "<<argv[1]<<endl;
29 //Allocate memory to store found spacepoints
30 AliL3MemHandler fpoints;
31 AliL3SpacePointData *points=(AliL3SpacePointData*)fpoints.Allocate(10000*sizeof(AliL3SpacePointData));
32 cf.SetOutputArray(points);
34 //Store the data in memory, and get the pointer to it:
35 digits = file.CompBinary2Memory(ndigits);
36 file.CloseBinaryInput();
38 //Switch off deconvolution:
42 cf.InitSlice(0,0,0,20,10000);
46 //Give the data pointer to the cluster finder
47 cf.Read(ndigits,digits);