{ ////////////////////////////////////////////////////////// // This file has been automatically generated // (Wed Aug 15 19:13:09 2001 by ROOT version3.01/06) // from TTree T/An example of a ROOT tree // found on file: event1_301.root ////////////////////////////////////////////////////////// //Reset ROOT and connect tree file gROOT->Reset(); TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("event1_301.root"); if (!f) { f = new TFile("event1_301.root"); } TTree *T = (TTree*)gDirectory->Get("T"); //Declaration of leaves types TObject; Char_t fType[20]; Int_t fNtrack; Int_t fNseg; Int_t fNvertex; UInt_t fFlag; Float_t fTemperature; fEvtHdr; fTracks; fH; Int_t fMeasures[10]; Float_t fMatrix[4][4]; Float_t fClosestDistance[20]; //Set branch addresses T->SetBranchAddress("event",&event); T->SetBranchAddress("TObject",&TObject); T->SetBranchAddress("fType[20]",fType); T->SetBranchAddress("fNtrack",&fNtrack); T->SetBranchAddress("fNseg",&fNseg); T->SetBranchAddress("fNvertex",&fNvertex); T->SetBranchAddress("fFlag",&fFlag); T->SetBranchAddress("fTemperature",&fTemperature); T->SetBranchAddress("fEvtHdr",&fEvtHdr); T->SetBranchAddress("fTracks",&fTracks); T->SetBranchAddress("fH",&fH); T->SetBranchAddress("fMeasures[10]",fMeasures); T->SetBranchAddress("fMatrix[4][4]",fMatrix); T->SetBranchAddress("fClosestDistance",fClosestDistance); // This is the loop skeleton // To read only selected branches, Insert statements like: // T->SetBranchStatus("*",0); // disable all branches // TTreePlayer->SetBranchStatus("branchname",1); // activate branchname Int_t nentries = T->GetEntries(); Int_t nbytes = 0; // for (Int_t i=0; iGetEntry(i); // } }