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_);
45 using Implementation =
typename Collection::Implementation;
52 Implementation &impl_;
56 char *address =
static_cast<char *
>(from_buffer->GetObject());
58 static ptrdiff_t impl_offset = from_buffer->GetClass()->GetDataMemberOffset(
"impl_");
60 OnFile onfile = {*(Implementation *)(address + impl_offset)};
63 Collection *newObj = (Collection *)
target;
66 Collection::ROOTReadStreamer(newObj, onfile.impl_);
77 TGenericClassInfo *GenerateInitInstance(
T const *);
80 std::vector<ROOT::Internal::TSchemaHelper> readrules(1);
81 ROOT::Internal::TSchemaHelper &rule = readrules[0];
82 rule.fTarget =
"buffer_,layout_,view_";
83 rule.fSourceClass =
type;
84 rule.fSource =
type +
"::Layout layout_;";
85 rule.fCode =
type +
"::ROOTReadStreamer(newObj, onfile.layout_)";
86 rule.fVersion =
"[1-]";
90 rule.fFunctionPtr =
reinterpret_cast<void *
>(::readPortableHostCollection_v1<T>);
91 rule.fAttributes =
"";
94 TGenericClassInfo *
instance = GenerateInitInstance((
T const *)
nullptr);
102 template <
typename T>
105 TGenericClassInfo *GenerateInitInstance(
T const *);
108 std::vector<ROOT::Internal::TSchemaHelper> readrules(1);
109 ROOT::Internal::TSchemaHelper &rule = readrules[0];
110 rule.fTarget =
"buffer_,impl_";
111 rule.fSourceClass =
type;
112 rule.fSource =
type +
"::Implementation impl_;";
113 rule.fCode =
type +
"::ROOTReadStreamer(newObj, onfile.impl_)";
114 rule.fVersion =
"[1-]";
118 rule.fFunctionPtr =
reinterpret_cast<void *
>(::readPortableHostMultiCollection_v1<T>);
119 rule.fAttributes =
"";
122 TGenericClassInfo *
instance = GenerateInitInstance((
T const *)
nullptr);
129 #define SET_PORTABLEHOSTCOLLECTION_READ_RULES(COLLECTION) \ 130 static bool EDM_CONCATENATE(set_PortableHostCollection_read_rules_done_at_, __LINE__) [[maybe_unused]] = \ 131 ROOT::set_PortableHostCollection_read_rules<COLLECTION>(EDM_STRINGIZE(COLLECTION)) 133 #define SET_PORTABLEHOSTMULTICOLLECTION_READ_RULES(COLLECTION) \ 134 static bool EDM_CONCATENATE(set_PortableHostMultiCollection_read_rules_done_at_, __LINE__) [[maybe_unused]] = \ 135 ROOT::set_PortableHostMultiCollection_read_rules<COLLECTION>(EDM_STRINGIZE(COLLECTION)) 137 #endif // DataFormats_Portable_interface_PortableHostCollectionReadRules_h
static PFTauRenderPlugin instance
static bool set_PortableHostMultiCollection_read_rules(std::string const &type)
static bool set_PortableHostCollection_read_rules(std::string const &type)
static void readPortableHostMultiCollection_v1(char *target, TVirtualObject *from_buffer)
static void readPortableHostCollection_v1(char *target, TVirtualObject *from_buffer)