ATLAS Offline Software
Loading...
Searching...
No Matches
TConvertingBranchElement.h File Reference

A variant of TBranchElement that can call converters when reading objects in split mode. More...

#include <atomic>
#include "TBranchElement.h"
Include dependency graph for TConvertingBranchElement.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TConvertingBranchElement
 A variant of TBranchElement that can call converters when reading objects in split mode. More...

Detailed Description

A variant of TBranchElement that can call converters when reading objects in split mode.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Dec, 2006

This class adds the ability to call converters on classes being read in split mode. It is implemented as a derived class of TBranchElement. In order to use it, you must first register your converters with TConverterRegistry (and call TConvertingBranchElement::Initialize, but normally the registry class will take care of that).

A few notes:

  • The Initialize method will change the New() method of the TBranchElement class to point at our new method. Thus, when we read a TBranchElement from a file, we'll actually make an instance of this class instead. (TBranchElement instances that are created explicitly, for writing, are not affected by this.)
  • We make some changes in the contents of the TBranchElement if a conversion is happening. However, the old values are saved, so that when the branch gets written, the original values are restored.

TODO:

  • Alternate name in file.
  • Emulated persistent class.
  • Rewriting the same tree doesn't really work. In the rewritten file, we get the new streamerinfo's for the classes with conversions.

Definition in file TConvertingBranchElement.h.