Strange side effect

Hello ROOTers,
the following statement in a ctor of a class (called once)
p.SetXYZM(fPx, fPy, fPz, TDatabasePDG::Instance()->GetParticle(fPdgCode)->Mass());
causes a ROOT file -not related to this class at all- used for output not to be written properly for every single entry of the TTree that it contains.
Edit (16:52): When trying to open the file in a new session:
Warning in TFile::Init: file sim.root probably not closed, trying to recover
Info in TFile::Recover: sim.root, recovered key TTree:sim at address 218724

Putting a hardcoded value in the place of TDatabasePDG::Instance()->GetParticle(fPdgCode)->Mass()
makes the problem disappear. Any hint? cheers,
filimon

Could you provide the shortest possible running script reproducing this problem?

Rene

Unfortunately not, in a simple example this seems to be OK, initially I thought maybe a file open inside TDatabasePDG to retrieve the particle table could be a problem but it does not seem to be the case, supported by code scanning too. There is something subtler in my code it seems…

Hi,

sounds like valgrind (valgrind.org) might help you track it down.

Cheers, Axel.