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