]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/AliPMDDigits2Recpoints.C
Better sorting algorithm
[u/mrichter/AliRoot.git] / PMD / AliPMDDigits2Recpoints.C
1 // ----------------------------------------------------//
2 //                                                     //
3 //    This macro does Digits to Reconstructed Points   //
4 //                                                     //
5 // ----------------------------------------------------//
6
7 #include "Riostream.h"
8 #include "TROOT.h"
9 #include "TFile.h"
10 #include "TNetFile.h"
11 #include "TRandom.h"
12 #include "TTree.h"
13 #include "TBranch.h"
14 #include "TClonesArray.h"
15 #include "TStopwatch.h"
16 #include <stdlib.h>
17
18 void AliPMDDigits2Recpoints(Int_t nevt=1) 
19 {
20   TStopwatch timer;
21   timer.Start();
22
23   // Open the AliRoot file
24   AliRunLoader *fRunLoader = AliRunLoader::Open("galice.root");
25   if (!fRunLoader)
26     {
27       cerr<<"Can't load RunLoader"<<endl;
28       return 1;
29     }
30   fRunLoader->LoadgAlice();
31   gAlice = fRunLoader->GetAliRun();
32
33
34   // Create the PMD Cluster Finder 
35   AliPMDClusterFinder *clus = new AliPMDClusterFinder(fRunLoader);
36   
37   clus->SetDebug(1);
38   clus->Load();
39
40   for (Int_t ievt = 0; ievt < nevt; ievt++)
41     {
42       clus->Digits2RecPoints(ievt);
43     }
44   clus->UnLoad("R");
45
46   timer.Stop();
47   timer.Print();
48 }
49