ROOT Version: 6.16.1
Platform: Mac OS
Compiler: clang
I am having a problem with a class that wrote a “double isolation[12]” among its members in a TTree to a set of files. New data has 14 instead of 12 for “isolation”, so I decided it may be better to replace the double array with “std::vector isolation”. I increased the clasdef version from 3 to 4.
To facilitate the reading of the old data files, I first tried a custom streamer, but this is not called because the TTree was split. I then tried to create a conversion rule in the linkdef file:
#pragma read \
sourceClass="SvtTrack" \
source="double isolation[12]" \
version=[-3] \
targetClass="SvtTrack" \
target="isolation" \
embed="true" \
include="iostream,vector" \
code = "{std::cout << \"custom streamer \"; std::copy(&onfile.isolation[0],&onfile.isolation[11],std::back_inserter(isolation));}"
I verified that this ends up in the dictionary that gets created, but the code is never called when reading from the TTree. I still get the error:
Warning in <TStreamerInfo::BuildOld>: Cannot convert SvtTrack::isolation from type: double to type: vector<double>, skip element
Can someone please point me on how to resolve this?
THANKS!