Currently the ROOTWriter and ROOTReader (TTree) based store the GenericParameters of a Frame directly via a custom dictionary, e.g.:
|
GenericParameters params; |
|
auto* emd = ¶ms; |
|
branch->SetAddress(&emd); |
|
branch->GetEntry(localEntry); |
|
return params; |
On the other hand the RNTuple backend splits these up into pairs of vectors for the keys and the values:
|
model->AddField(RFieldBase::Create(root_utils::intKeyName, "std::vector<std::string>>").Unwrap()); |
|
model->AddField(RFieldBase::Create(root_utils::floatKeyName, "std::vector<std::string>>").Unwrap()); |
|
model->AddField(RFieldBase::Create(root_utils::doubleKeyName, "std::vector<std::string>>").Unwrap()); |
|
model->AddField(RFieldBase::Create(root_utils::stringKeyName, "std::vector<std::string>>").Unwrap()); |
|
|
|
model->AddField(RFieldBase::Create(root_utils::intValueName, "std::vector<std::vector<int>>").Unwrap()); |
|
model->AddField(RFieldBase::Create(root_utils::floatValueName, "std::vector<std::vector<float>>").Unwrap()); |
|
model->AddField(RFieldBase::Create(root_utils::doubleValueName, "std::vector<std::vector<double>>").Unwrap()); |
|
model->AddField(RFieldBase::Create(root_utils::stringValueName, "std::vector<std::vector<std::string>>").Unwrap()); |
These should both use the same mechanism to avoid confusion. Given that RNTuple doesn't support writing map types and that pairs of vectors are easier to interpret without knowing about GenericParameters, we decided to switch the TTree based backend to that as well. See EDM4hep meeting on Apr 23, 2024
Currently the
ROOTWriterandROOTReader(TTree) based store theGenericParametersof a Frame directly via a custom dictionary, e.g.:podio/src/ROOTReader.cc
Lines 42 to 46 in 02a4b9d
On the other hand the RNTuple backend splits these up into pairs of vectors for the keys and the values:
podio/src/RNTupleWriter.cc
Lines 249 to 257 in 02a4b9d
These should both use the same mechanism to avoid confusion. Given that RNTuple doesn't support writing map types and that pairs of vectors are easier to interpret without knowing about GenericParameters, we decided to switch the TTree based backend to that as well. See EDM4hep meeting on Apr 23, 2024