Failed filling branch

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?


Could you provide the shortest possible RUNNING setup reproducing your problem ?


Hm, i guess this would be rather complicated…

The funny thing is, that I made another test, and found out, that all of the Events are written to the file correctly…

So, is there a way, to switch off this warning somehow?

Well! this is a serious error message, meaning that something wrong is happening, you better try to understand the underlying problem. ::slight_smile:
and if you insist disabling the error message, you can always set

gErrorIgnoreLevel = kFatal; // or higher (see TError.h)