Re: 'const' again

Rene Brun (Rene.Brun@cern.ch)
Thu, 03 Sep 1998 22:43:39 +0200


Rutger van der Eijk wrote:
>
> Hi,
>
> Again a message about 'const' etc.
>
> I somewhere need to stream a 'const Text_t*' into a TMessage, which is a
> TBuffer.
>
> I have
>
> const Text_t* name = <something>
> TMessage messOut(kMESS_OBJECT);
>
> and would like to do:
>
> messOut << name;
>
> This doesn't work because the operator is defined as
>
> TBuffer &TBuffer::operator<<(Char_t *c)
>
> I think this should be:
>
> TBuffer &TBuffer::operator<<(const Char_t *c
>
> as for all the other TBuffer input (i.e. <<) operators. Or is there
> (another) reason why I should not use the << operators? (Should I use the
> WriteArray member?... ifso why are << operators public?)

Good point.
>
> p.s. I'm curious to things discussed at CHEP98, will there be some
> note/report/summary?

I suppose you are refering to the Root Users meeting that we organized
yesterday night. We intend to post a summary of this meeting in the
coming days.
At the conference, many people/experiments have quoted their use
of Root and also many have announced their move to Root, including major
leading experiments in HEP and Nuclear Physics.

Rene Brun