RE:cint message

Christoph Borgmeier (borg@mail.desy.de)
Fri, 28 Aug 1998 10:31:05 +0200 (MET DST)


On 28 Aug 1998, Pasha Murat wrote:

> Masaharu Goto writes:
> > Christoph,
> >
[...]
> > >class STLObjArray<MC_Track*> in ObjArray.hh line 57 original base of
> > >virtual func
[...]
> > This is no harm and this means those classes are roots of polymorphic
> > inheritance. This is just an information. I thought it would be sometimes
> > useful to knew which were the grand-base classes. So far, no one is using
> > this info.
> >
>
> I'd like to comment here that for ROOT users this information
> makes a lot of sense. The diagnostics above warns user that the
> corresponding class has not been derived from TObject and therefore
> virtual functions of TObject as Draw(...), Streamer(...) etc can't be
> used.
> Next, all ROOT containers are lists of TObject*'s, so it is also
> dangerous to put objects of such a class into any of ROOT containers.

Hello,

this comment makes me curious: the class definition starts as follows:

-----------------------------------------------------------------
template<class T>
class STLlObjArray: public TObjArray
{
public:
typedef T value_type;
typedef value_type& reference;
typedef const value_type& const_reference;
[...]
-----------------------------------------------------------------

It's clear, this class is mainly a wrapper for TObjArray, providing STL
compatibility and standard iterators. It was meant to fit completely into
the ROOT frameworks. Can someone see, what's wrong here?

Best regards
Christoph

-- 
 Christoph Borgmeier    Mail:  DESY F15/HERA-B, Geb. 61/117
                               Notkestr. 85, 22607 Hamburg
 Humboldt Univ Berlin   Phone: +49 40 8998 4850
                        Email: Christoph.Borgmeier@desy.de