Need the right way to generate dictionary for collection

_ROOT Version: 6.26.10
_Platform: macos M1 CPU

the Problem like below, How could I generate the dictionary for collection?

root[0000]:> struct a_t{double a; double b;} a;
root[0002]:> gInterpreter->GenerateDictionary("ROOT::VecOps::RVec<a_t>","ROOT/RVec.hxx");
root[0003]:> TTree * t1 = new TTree("t1","t1");
root[0004]:> ROOT::VecOps::RVec<a_t> b;
root[0005]:> t1->Branch("b",&b)
Error in <TTree::Branch>: The class requested (ROOT::VecOps::RVec<a_t>) for the branch "b" is an instance of an stl collection and does not have a compiled CollectionProxy. Please generate the dictionary for this collection (ROOT::VecOps::RVec<a_t>) to avoid to write corrupted data.
(TBranch *) nullptr

Maybe @Axel or @pcanal can help

You will need to create a header file declaring a_t so that you can pas it to GenereateDictionary. You probably also need/should generate a dictionary for a_t

oh I forgot that

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.