4 //***************************************************************************
8 // This is a basic example on how the tree of reconstructed events
10 //Dynamically link some shared libs
11 if (gClassTable->GetID("AliRun") < 0) {
12 gROOT->LoadMacro("loadlibs.C");
17 // Connect the Root Galice file containing ...
18 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("tree_reco.root");
19 if (!file) file = new TFile("tree_reco.root");
21 cout << "File tree_reco.root not found\n";
25 TFile *galice_file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
26 if (!galice_file) galice_file = new TFile("galice.root");
28 cout << "File galice.root not found\n";
32 // Get AliRun object from file or create it if not on file
34 gAlice = (AliRun*)galice_file->Get("gAlice");
36 cout << "AliRun object found on file\n";
38 cout << "AliRun object not found on file !!!\n";
43 TTree *tree = (TTree*)file->Get("TreeRecoEvent");
44 TBranch *branch = tree->GetBranch("Event");
45 AliMUONRecoEvent *event = 0;
46 branch->SetAddress(&event);
47 Int_t nentries = (Int_t)tree->GetEntries(); // no. of reco events on file
49 for (Int_t evNumber=0; evNumber<nentries; evNumber++) {
50 tree->GetEntry(evNumber);
51 cout << "Event : " << event->GetNoEvent() << " with" << event->GetNoTracks() << " tracks\n";
52 // print reconstr. event information
53 // event->EventInfo();