00001
00002
00003 TChain *chain = new TChain("G-LCP");
00004
00005 rdGeantLcpTreeTest(){
00006
00007
00008
00009
00010
00011
00012 TString fItem="recoEffStudy/G2032.tree.root";
00013
00014 chain->AddFile(fItem, -1);
00015
00016 chain->ls();
00017 float pt;
00018 int nPKPi;
00019 chain->SetBranchAddress("pt",&pt);
00020 chain->SetBranchAddress("nPKPi",&nPKPi);
00021
00022
00023 int N=chain->GetEntries();
00024 printf("N=%d\n",N);
00025 system("date");
00026 int k;
00027 for(k=0;k<N;k++) {
00028 int ret=chain->GetEntry(k);
00029 assert(ret);
00030
00031 printf("%d %d %d %f\n",k,ret,nPKPi,pt);
00032 }
00033 system("date");
00034
00035 }