1 #ifndef art_Framework_IO_Root_detail_readMetadata_h 2 #define art_Framework_IO_Root_detail_readMetadata_h 15 auto branch = md->GetBranch(art::rootNames::metaBranchRootName<T>());
16 assert(branch !=
nullptr);
18 auto mdField = requireDict ? root::getObjectRequireDict<T>() : T{};
19 auto field_ptr = &mdField;
20 branch->SetAddress(&field_ptr);
22 branch->SetAddress(
nullptr);
30 auto branch = md->GetBranch(art::rootNames::metaBranchRootName<T>());
31 if (branch ==
nullptr) {
35 auto mdField = requireDict ? root::getObjectRequireDict<T>() : T{};
36 auto field_ptr = &mdField;
37 branch->SetAddress(&field_ptr);
39 branch->SetAddress(
nullptr);
40 std::swap(mdField, field);
T readMetadata(TTree *md, bool const requireDict=true)