EDM FAQ: The Streamer() utilities


As of this writing the TBuffer class supplied by ROOT defines redirection operators for most built-in and ROOT-specific data types. It lacks support for a number of standard as well as commonly-used classes. As an aid to developers, we have created some operator << and >> methods which in effect extend TBuffer's support for new data types. The EdmUtilities package contains a number of header files beginning with "TBuffer" which implement redirection into and out of a TBuffer for the following classes:

As an example, ToyMuon contains a bool data member _is_golden. It can stream this in and out using, respectively:
#include "EdmUtilities/TBufferBoolIo.hh"
// Streamer(TBuffer& iobuffer): isReading() section
    iobuffer >> _is_golden ; // read in a bool

and

// Streamer(TBuffer& iobuffer): isWriting() section
    iobuffer << _is_golden ; // write out a bool


Comments on this page may be sent to Rob Kennedy