PHOS module
[u/mrichter/AliRoot.git] / PHOS / RecAna.C
CommitLineData
83974468 1#define RecAna_cxx
2#include "RecAna.h"
3
4void RecAna::Loop()
5{
6 // In a Root session, you can do:
7 // Root > .L RecAna.C
8 // Root > RecAna t(filename)
9 // Root > t.GetEvent(evt); // Fill t data members with event number evt
10 // Root > t.Show(); // Show values of current event e
11 // Root > t.Show(evt); // Read and show values of entry evt
12 // Root > t.Loop(); // Loop on all entries
13 //
14
15 // This is the loop skeleton
16 // To read only selected branches, Insert statements like:
17 // METHOD1:
18 // fTree->SetBranchStatus("*",0); // disable all branches
19 // fTree->SetBranchStatus("branchname",1); // activate branchname
20 // METHOD2: replace line
21 // fTree->GetEntry(i); // read all branches
22 //by b_branchname->GetEntry(i); //read only this branch
23 if (fTree == 0) return;
24
25 Int_t nentries = Int_t(fTree->GetEntries());
26
27 Int_t nbytes = 0, nb = 0;
28 for (Int_t i=0; i<nentries;i++) {
29 if (LoadTree(i) < 0) break;
30 nb = fTree->GetEntry(i); nbytes += nb;
31 }
32}