1 #ifndef art_Framework_IO_Root_detail_readMetadata_h 2 #define art_Framework_IO_Root_detail_readMetadata_h 17 auto branch = md->GetBranch(art::rootNames::metaBranchRootName<T>());
18 assert(branch !=
nullptr);
19 auto mdField = requireDict ? root::getObjectRequireDict<T>() :
T{};
20 auto field_ptr = &mdField;
21 branch->SetAddress(&field_ptr);
23 branch->SetAddress(
nullptr);
32 auto branch = md->GetBranch(art::rootNames::metaBranchRootName<T>());
33 if (branch ==
nullptr) {
36 auto mdField = requireDict ? root::getObjectRequireDict<T>() :
T{};
37 auto field_ptr = &mdField;
38 branch->SetAddress(&field_ptr);
40 branch->SetAddress(
nullptr);
void swap(Handle< T > &a, Handle< T > &b)
T readMetadata(TTree *md, bool const requireDict=true)