FairRoot
FairRoot copied to clipboard
Write std::array to file using FairRootManager->RegisterAny()
Is your feature request related to a problem? Please describe.
Since PR#4425 (more information) it is possible to store a simple std::array into a TTree. After installing FairRoot with Root 6.20.00 I was hoping to achive the same with FairRoot by FairRootManager->RegisterAny
, but this still fails with [FATAL] No dictionary found for std::array<double, 1ul>
.
Maybe I did not consider something inside FairRoot while installing it with the newest Root version and it will work out of the box with the next release?
Describe the solution you'd like
auto ptrToArray = new std::array<double, 5>(); FairRootManager::Instance()->RegisterAny("myArray", ptrToArray, kTRUE);
should write the array into the file.
Dear Vadim,
since we are still not supporting the latest ROOT (6.20), we do not support storing std::array as branch in FairRoot yet. Did you try to use the std::vector to store your data?