template<typename T, typename HintType = void>
class o2::framework::ROOTSerialized< T, HintType >
Enforce ROOT serialization for a type
Usage: (with 'output' being the DataAllocator of the ProcessingContext) SomeType object; ROOTSerialized<decltype(object)> ref(object); output.snapshot(Output{}, ref);
- or - output.snapshot(Output{}, ROOTSerialized<decltype(object)>(object));
The existence of the ROOT dictionary for the wrapped type can not be checked at compile time, a runtime check must be performed in the substitution for the ROOTSerialized type.
An optional hint can be passed to point to the class info, supported types are TClass or const char. A pointer of the hint can be passed to the constructor in addition to the reference. In the first case, the TClass instance will be used directly (faster) while in the latter the TClass registry is searched by name. TClass* classinfo = ...; ROOTSerialized<decltype(object), TClass>(object, classinfo));
- or - ROOTSerialized<decltype(object), const char>(object, "classname"));
Definition at line 46 of file SerializationMethods.h.