00001 #ifndef __CINT__
00002 #include <stdio.h>
00003 #include "TSystem.h"
00004 #include "TBenchmark.h"
00005 #include "TFile.h"
00006 #include "TTree.h"
00007 #include "TH1.h"
00008 #include "TCanvas.h"
00009 #include "TTreeIter.h"
00010 #endif
00011
00012 TBranch *tb=0;
00013 TFile *muFile =0;
00014 TTree *muTree=0;
00015 TH1F *hz=0;
00016 TH1F *hx=0;
00017 TH1F *ht=0;
00018 TCanvas *c1=0;
00019
00020 void th()
00021 {
00022
00023 TTreeIter th(muTree);
00024 th.AddFile("test.MuDst.root");
00025
00026
00027 const int *&run = th("MuEvent.mEventInfo.mRunId");
00028 const int *&evt = th("MuEvent.mEventInfo.mId");
00029 const int& nGlobs = th("GlobalTracks");
00030 printf("&run=%p &evt=%p\n",&run,&evt);
00031 int n=0;
00032 while (th.Next())
00033 {
00034 printf("serial = %d run=%d evt=%d nGlo = %d\n",n,*run,*evt,nGlobs);n++;
00035 }
00036 }