]>
Commit | Line | Data |
---|---|---|
cc80f89e | 1 | void MakeClusterTree(Int_t n) |
2 | { | |
3 | TFile * f = new TFile("pokus.root","recreate"); | |
4 | AliTPCClustersArray arr; | |
5 | arr.MakeArray(10000); | |
6 | arr.MakeTree(); | |
7 | for (Int_t i=0;i<n;i++) { | |
8 | AliTPCClustersRow * row =new AliTPCClustersRow; | |
9 | row->SetIndex(i); | |
10 | arr.AddSegment(row); | |
11 | } | |
12 | for (Int_t i=0;i<n;i++) arr.StoreSegment(n-i); | |
13 | arr.GetTree()->Write("pokus1"); | |
14 | ||
15 | ||
16 | } | |
17 | ||
18 | ||
19 | void MakeTree(Int_t n) | |
20 | { | |
21 | AliSegmentArray arr; | |
22 | ||
23 | TFile * f= new TFile("pokus.root","recreate"); | |
24 | arr.MakeArray(10000); | |
25 | arr.MakeTree(); | |
26 | // for (Int_t i=0;i<n;i++) arr.AddSegment(new AliSegment(Int_t((gRandom->Rndm())*n))); | |
27 | ||
28 | //for (Int_t i=0;i<n;i++) arr.StoreSegment(Int_t((gRandom->Rndm())*n)); | |
29 | for (Int_t i=0;i<n;i++) arr.AddSegment(new AliSegment(i)); | |
30 | for (Int_t i=0;i<n;i++) arr.StoreSegment(n-i); | |
31 | arr.GetTree()->Write("pokus1"); | |
32 | } | |
33 | ||
34 | void ConnectTree(Int_t n,AliSegmentArray *a) | |
35 | { | |
36 | AliSegmentArray &arr= *a; | |
37 | // TFile * f = new TFile("pokus.root","update"); | |
38 | TFile * f = new TFile("pokus.root","update"); | |
39 | arr.MakeArray(10000); | |
40 | arr.ConnectTree("pokus1"); | |
41 | for (Int_t i=0;i<n;i++) arr.LoadSegment(i); | |
42 | for (Int_t i=0;i<n;i++) | |
43 | { | |
44 | if (arr[i]==0) continue; | |
45 | if (arr[i]->GetID()!=i) cout<<i<<"\n"; | |
46 | } | |
47 | } | |
48 |