2 Author: Constantin Loizides <loizides@ikf.physik.uni-frankfurt.de>
7 #include "AliL3Transform.h"
8 #include "AliL3ClustFinderNew.h"
9 #include "AliL3MemHandler.h"
10 #include "AliL3SpacePointData.h"
13 Example program how to run the "standalone" clusterfinder.
16 int main(int argc,char **argv)
20 cout<<"Usage: runit datafile"<<endl;
24 AliL3DigitRowData *digits = 0;
25 unsigned int ndigits=0;
27 //Does all the file/data handling
31 if(!file.SetBinaryInput(argv[1]))
33 cerr<<"Error opening file "<<argv[1]<<endl;
37 //Store the data in memory, and get the pointer to it:
38 digits = file.CompBinary2Memory(ndigits);
39 file.CloseBinaryInput();
41 //Storing all detector-spesific quantities, needed by the clusterfinder.
42 AliL3Transform::Init(dirname(argv[1]));
44 //The cluster finder itself.
45 AliL3ClustFinderNew cf;
48 cf.InitSlice(0,0,0,ndigits-1,10000);
51 cf.SetSTDOutput(kTRUE);
53 //Switch off deconvolution:
56 //Allocate memory to store found spacepoints
57 AliL3MemHandler fpoints;
58 AliL3SpacePointData *points=(AliL3SpacePointData*)fpoints.Allocate(10000*sizeof(AliL3SpacePointData));
59 cf.SetOutputArray(points);
61 //Give the data pointer to the cluster finder
62 cf.Read(ndigits,digits);