RE:[CINT] [ROOT] Problems with CINT (fwd)

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Thu May 02 2002 - 11:29:17 MEST


Hello Denis,

Thank you for reporting this problem.  I'll fix the problem 1) 
in cint5.15.37.  For 2), we need to discuss how exit() should 
behave in ROOT.

Masaharu Goto



>Date: Tue, 30 Apr 2002 23:37:51 +0200 (METDST)
>From: Rene Brun <Rene.Brun@cern.ch>
>To: cint@pcroot.cern.ch
>Subject: [CINT] [ROOT] Problems with CINT  (fwd)
>
>
>
>---------- Forwarded message ----------
>Date: Tue, 30 Apr 2002 20:08:57 +0200 (CEST)
>From: Denis Bertini <dbertini@lxg0402.gsi.de>
>To: roottalk@cern.ch
>Subject: [ROOT] Problems with CINT 
>
>
> Hi Rooters, 
> 
> 
> 1)
>
> I am facing a problem to access the pointers in my 
> event structure via CINT. I think it link to the way 
> CINT interprets level of indirection. 
> Let me explain briefly: 
> I have th following class "Composite"
> 
>     class Composite: public Element
>      {
>      protected:
>      TObjArray *fEventElements;
>     // something ... 
>           
>     // specific [] operator 
>     Element& operator[](Int_t i) {
>      return *static_cast<TGo4EventElement*>((*fEventElements)[i]);
>    //something
>     };
>   
>   Now with this overloaded [] operator i want to access my pointers, 
>   using macros commands like:
>    {
>      Composite * event = new Composite(); 
>      // .. initialize my structure composite
>      // access one element  
>      Element* sub_event= &(*event)[i][j][k];
>    }  
> 
>   I tested this access with pure compiled C++ code and it works fine. 
>   But, CINT can only access (using this syntax) one level of indirection. 
>   I need to do explicitely the following trick:
> 
>    {
>      Composite * event = new Composite();
>      // .. initialize my structure composite
>      // access one element
>      Element* sub_event= &(((*event)[i])
>                            .operator[](j))
>                            .operator[](k);     
>     }
>   ... in order to get the correct result. But it is not very nice !
>
>    So what am i doing wrong there?  
>                                            
>   2) In the last version of CINT (ROOT 303.04 22 April 2002) the
>      command exit(0) hangs for ever. In root 303.02 it was working 
>      correclty. 
>      
>                                 any hints ? 
>                                            thanks
>                                               Denis
>



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