Dear experts of ROOT:
I wrote a shared library
that contains custom classes (like hit.hh
) for which I generate a dictionary (see Makefile
and LinkDef.h
)
I then use this library in executables, for instance app/PlotToy.cc
that loads TTree
where vector<vector <hit> >
are stored.
If I use the code on a server running root version SL7_v6.20.04 install as a pre-compile library the code runs smoothly.
Now, if I used on more recent root version like root_v6.24.04 or root_v6.32.02 (precompile version for ubuntu 22.04) on my laptop I keep getting this type or error message:
Warning in <TClass::Init>: no dictionary for class trk is available Warning in <TClass::Init>: no dictionary for class hit is available Error in <TTree::SetBranchAddress>: The class requested (vector<vector<trk> >) for the branch "trks" is an instance of an stl collection and does not have a compiled CollectionProxy. Please generate the dictionary for this collection (vector<vector<trk> >) to avoid to write corrupted data. Error in <TTree::SetBranchAddress>: The class requested (vector<vector<hit> >) for the branch "hits" is an instance of an stl collection and does not have a compiled CollectionProxy. Please generate the dictionary for this collection (vector<vector<hit> >) to avoid to write corrupted data.
If I add in the executable an object (not used otherwise) that employs some of these custom objects like
TrkPropMCS* trkProp = new TrkPropMCS("/home/mperrint/Analysis/Tagging/ToyBeamLine//dat/NA62/beam4-NA62.cfg");
that uses track
, then the code runs and is able to find the dictionary.
Would you have any idea on what could cause the executable to not find the dictionnay at run time when I don’t include those useless classes?
thanks in advance,
mathieu