Hello,
I use a standalone compiled program to store an Object in an ntuple. I created a dict-file with rootcint. This Object Contains a map<string,vector which is called m_PhysicsObjects. (There is also a dictfile for TMPhysicsObject.
My Code runs fine, and i can read out the events. But on every 20th or so event i get an error during writing:
Error in <TBranchElement::Fill>: Failed filling branch:m_PhysicsObjects, nbytes=-1
Error in <TBranchElement::Fill>: Failed filling branch:vpx.m_PhysicsObjects, nbytes=-1
Error in <TTree::Fill>: Failed filling branch:ntuple.vpx, nbytes=-1
This error is symptomatic of a Tree created as a memory-resident Tree
Instead of doing:
TTree *T = new Tree(...)
TFile *f = new TFile(...)
you should do:
TFile *f = new TFile(...)
TTree *T = new TTree(...)
The root file should be created before the TTree, i have enough diskspace, and the fact, that only 5% of the events are affecter really puzzle me…
any ideas?
Cheers,
Thomas