This code doesn’t work.
void test() {
gInterpreter->GenerateDictionary("vector<deque<float> >","vector");
TFile* file = new TFile("file", "recreate");
TTree* tree = new TTree("tree", "tree");
std::vector< std::deque<float> > vecdeq;
tree->Branch("branch", &vecdeq);
vecdeq = {{1, 2, 3, 4}, {5, 6, 7}};
tree->Fill();
tree->Write();
file->Close();
}
The message is: “Error in TTree::Branch: The class requested (vector<deque >) for the branch “branch” is an instance of an stl collection and does not have a compiled CollectionProxy. Please generate the dictionary for this collection (vector<deque >) to avoid to write corrupted data.”
How can I make tree branch of type vector<deque>?