]>
Commit | Line | Data |
---|---|---|
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 | printf(" Do you want reconstruction from Digits file or RAW data \n"); | |
34 | printf(" If RAW, type 0 \n"); | |
35 | printf(" If Digits, type 1 \n"); | |
36 | Int_t itype; | |
37 | cin >> itype; | |
38 | ||
39 | // Create the PMD Cluster Finder | |
40 | AliPMDClusterFinder *clus = new AliPMDClusterFinder(fRunLoader); | |
41 | ||
42 | if (itype == 1) | |
43 | { | |
44 | clus->Load(); | |
45 | } | |
46 | else if (itype == 0) | |
47 | { | |
48 | clus->LoadClusters(); | |
49 | } | |
50 | ||
51 | ||
52 | for (Int_t ievt = 0; ievt < nevt; ievt++) | |
53 | { | |
54 | if (itype == 1) | |
55 | { | |
56 | // from digits data | |
57 | clus->Digits2RecPoints(ievt); | |
58 | } | |
59 | else if (itype == 0) | |
60 | { | |
61 | // from raw data | |
62 | AliRawReaderFile reader(ievt); | |
63 | clus->Digits2RecPoints(ievt, &reader); | |
64 | } | |
65 | } | |
66 | if (itype == 1) | |
67 | { | |
68 | clus->UnLoad(); | |
69 | } | |
70 | else if (itype == 0) | |
71 | { | |
72 | clus->UnLoadClusters(); | |
73 | } | |
74 | timer.Stop(); | |
75 | timer.Print(); | |
76 | } | |
77 |