1 #ifndef DataFormats_Portable_interface_PortableHostObjectReadRules_h 2 #define DataFormats_Portable_interface_PortableHostObjectReadRules_h 4 #include <TGenericClassInfo.h> 5 #include <TVirtualObject.h> 16 using Product =
typename Object::Product;
27 char *address =
static_cast<char *
>(from_buffer->GetObject());
29 static ptrdiff_t product_offset = from_buffer->GetClass()->GetDataMemberOffset(
"product_");
31 OnFile onfile = {*(Product **)(address + product_offset)};
34 Object *newObj = (Object *)
target;
37 Object::ROOTReadStreamer(newObj, *onfile.product_);
48 TGenericClassInfo *GenerateInitInstance(
T const *);
51 std::vector<ROOT::Internal::TSchemaHelper> readrules(1);
52 ROOT::Internal::TSchemaHelper &rule = readrules[0];
53 rule.fTarget =
"buffer_,product_";
54 rule.fSourceClass =
type;
55 rule.fSource =
type +
"::Product* product_;";
56 rule.fCode =
type +
"::ROOTReadStreamer(newObj, *onfile.product_)";
57 rule.fVersion =
"[1-]";
61 rule.fFunctionPtr =
reinterpret_cast<void *
>(::readPortableHostObject_v1<T>);
62 rule.fAttributes =
"";
65 TGenericClassInfo *
instance = GenerateInitInstance((
T const *)
nullptr);
72 #define SET_PORTABLEHOSTOBJECT_READ_RULES(OBJECT) \ 73 static bool EDM_CONCATENATE(set_PortableHostObject_read_rules_done_at_, __LINE__) [[maybe_unused]] = \ 74 ROOT::set_PortableHostObject_read_rules<OBJECT>(EDM_STRINGIZE(OBJECT)) 76 #endif // DataFormats_Portable_interface_PortableHostObjectReadRules_h
static PFTauRenderPlugin instance
static void readPortableHostObject_v1(char *target, TVirtualObject *from_buffer)
static bool set_PortableHostObject_read_rules(std::string const &type)