I've got a problem when trying to go from trees to chains :
//1 TFile* f = new TFile("a702minbiaspion.root") ;
//1 TTree* EM = (TTree*)f->Get("EM");
//2 TChain* EM = new TChain("EM") ;
//2 EM->Add("a702minbiaspion.root") ;
RBEvent *event = new RBEvent ;
UInt_t fHeader_fTrigger;
Int_t fNparticleEM;
EM->SetBranchAddress("event",&event);
EM->SetBranchAddress("fHeader.fTrigger",&fHeader_fTrigger);
EM->SetBranchAddress("fNparticleEM",&fNparticleEM);
EM->SetBranchStatus("*",1) ;
Int_t i ;
Int_t n=0 ;
for (i=0;i<5;i++) {
n += EM->GetEvent(i,1) ;
printf("n=%d fNparticleEM=%d fHeader_fTrigger=%x\n",n,fNparticleEM,
fHeader_fTrigger) ;
}
The case 1 gives me what is expected, i.e. sth like :
n=483 fNparticleEM=2 fHeader_fTrigger=26008200
n=1080 fNparticleEM=2 fHeader_fTrigger=26008000
n=1563 fNparticleEM=2 fHeader_fTrigger=26008200
n=2198 fNparticleEM=2 fHeader_fTrigger=600c600
n=2833 fNparticleEM=2 fHeader_fTrigger=26008000
But case 2 gives :
n=483 fNparticleEM=0 fHeader_fTrigger=0
n=1080 fNparticleEM=0 fHeader_fTrigger=0
n=1563 fNparticleEM=0 fHeader_fTrigger=0
n=2198 fNparticleEM=0 fHeader_fTrigger=0
n=2833 fNparticleEM=0 fHeader_fTrigger=0
What am I missing ?
Thanks again for your help.
-- APHECETCHE Laurent (mailto:aphecetche@ganil.fr) GANIL, B.P. 5027, 14076, Caen Cedex 5, France Vox: +33 (0)2 31 45 45 85 - Fax: +33 (0)2 31 45 46 65 WWW: http://ganp03.in2p3.fr/nof/ & (perso.) http://www.mygale.org/~p0mp0n