Hello Nikolay,
ROOT "constructs" event automatically when reading it from a file,
see example in $ROOTSYS/test/MainEvent.cxx. You only need to tell ROOT
about the address of Event object where you want the data to be read in.
>
> I want to keep in the *.root file a 'partially constructed' event
> and add (generate) some fields while reading.
> ==>
> Q2: Is there a method in TObject that called just after reading from
> buffer (i.e. virtual void TObject::Validate()) ?
No , there is no such a method, you may use customized Event::Streamer
instead.
... snip..
> The idea :
> Before writing 'events' - set fDecay and fCombination to 0 to keep disk space.
> Before reading - set gDecay, tune the 'internals' and
Customized Streamer function seems to be the best place for such
an action -
just don't stream fDecay etc out. Also don't forget to tell rootcint
that you don't want it to generate Streamer automatically - put
line like
#pragma link C++ class Event-;
(note "-") into your LinkDef.h.
... snip..
> If I need to rewrite the Streamer method,
> how to generate 'default' version of Event::Streamer ?
> (I look into EventCint.C, but see only some CINT internal names)
Look into the end of this file, or search for Event::Streamer in it,
it should be in there.
Regards, Pasha.