]>
Commit | Line | Data |
---|---|---|
dc627cea | 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 | ||
7cf8248d | 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 | ||
01b56f5c | 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; | |
dc627cea | 38 | |
39 | // Create the PMD Cluster Finder | |
7cf8248d | 40 | AliPMDClusterFinder *clus = new AliPMDClusterFinder(fRunLoader); |
50555ba1 | 41 | |
42 | if (itype == 1) | |
01b56f5c | 43 | { |
44 | clus->Load(); | |
45 | } | |
50555ba1 | 46 | else if (itype == 0) |
01b56f5c | 47 | { |
48 | clus->LoadClusters(); | |
49 | } | |
452cffbf | 50 | |
51 | ||
7cf8248d | 52 | for (Int_t ievt = 0; ievt < nevt; ievt++) |
dc627cea | 53 | { |
50555ba1 | 54 | if (itype == 1) |
01b56f5c | 55 | { |
56 | // from digits data | |
57 | clus->Digits2RecPoints(ievt); | |
58 | } | |
50555ba1 | 59 | else if (itype == 0) |
01b56f5c | 60 | { |
61 | // from raw data | |
62 | AliRawReaderFile reader(ievt); | |
63 | clus->Digits2RecPoints(ievt, &reader); | |
64 | } | |
65 | } | |
50555ba1 | 66 | if (itype == 1) |
01b56f5c | 67 | { |
68 | clus->UnLoad(); | |
69 | } | |
50555ba1 | 70 | else if (itype == 0) |
01b56f5c | 71 | { |
72 | clus->UnLoadClusters(); | |
dc627cea | 73 | } |
dc627cea | 74 | timer.Stop(); |
75 | timer.Print(); | |
76 | } | |
77 |