[ROOT] Problem with a Branch whose "buffer variable" is a pointer

From: David Chamont (David.Chamont@poly.in2p3.fr)
Date: Thu Feb 07 2002 - 14:05:04 MET


Hi,

Given the following code :

  int main()
   {
    TROOT root("dummy","dummy") ;
    TFile file("dummy.root","recreate") ;
     int split = 99 ;
     int bufsize = 16000 ;
     RtSimHit * hit = 0 ;
     TTree tree("T","CMS demo tree");
     tree.Branch("hit","RtSimHit",&hit,bufsize,split) ;
  ...

I observe that after the last call, the pointer hit
is not any more null. Is it on purpose ? If so, why ?

David C.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:41 MET