]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ALIFAST/AliFBigBang.cxx
Container for calibration data
[u/mrichter/AliRoot.git] / ALIFAST / AliFBigBang.cxx
1
2 //////////////////////////////////////////////////////////////////////////
3 //                                                                      //
4 // AliFBigBang                                                          //
5 //                                                                      //
6 // helper class to browse generated particles.                          //
7 //                                                                      //
8 //////////////////////////////////////////////////////////////////////////
9
10 #include <TBrowser.h>
11 #include <TParticle.h>
12 #include <TClonesArray.h>
13 #include "AliFast.h"
14 #include "AliFBigBang.h"
15
16 #include "AliFBrowsable.h"
17
18 ClassImp(AliFBigBang)
19
20
21
22 //_____________________________________________________________________________
23 AliFBigBang::AliFBigBang() 
24                 : TNamed("Histograms","Generated particles browser")
25 {
26    fBrowsables = 0;
27 }
28
29 //_____________________________________________________________________________
30 AliFBigBang::~AliFBigBang() 
31 {
32   if (fBrowsables) {
33      fBrowsables->Delete();
34      delete fBrowsables;
35      fBrowsables = 0;
36   }
37 }
38
39 //_____________________________________________________________________________
40 void AliFBigBang::Browse(TBrowser *b)
41 {
42   /*
43
44   TClonesArray *particles = mcarlo->Fruits();
45   Int_t nparticles = particles->GetEntriesFast();
46   TParticle *part;
47   AliFBrowsable *brow;
48   char name[64];
49   if (!fBrowsables) fBrowsables = new TObjArray(2*nparticles);
50   if (fBrowsables->GetSize() < nparticles) fBrowsables->Expand(nparticles);
51   for (Int_t i=0;i<nparticles;i++) {
52      part = (TParticle*)particles->UncheckedAt(i);
53      if (part->GetMother(i)) continue;
54      brow = GetBrowsable(i);
55      sprintf(name,"%s_%d",part->GetName(),i);
56      brow->SetName(name);
57      brow->SetRefObject(part);
58      b->Add(brow,name);
59   }
60   */
61 }
62
63 //_____________________________________________________________________________
64 AliFBrowsable *AliFBigBang::GetBrowsable(Int_t i)
65 {
66   AliFBrowsable *brow = (AliFBrowsable*)fBrowsables->At(i);
67   if (!brow) {
68      brow = new AliFBrowsable();
69      fBrowsables->AddAt(brow, i);
70      brow->SetBigBang(this);
71   } 
72   return brow;
73 }
74
75
76
77
78
79
80