Skimming Vector<float> PF info; TBuffer Errors

Hello,

I am trying to skim Particle Flow tree variables from many ROOT files.

When I test the code as a macro on a single ROOT file it runs smoothly, but when I run it over 100s of ROOT files using condor, I get " *** Break *** segmentation violation" errors resulting from messages like:

“Error in TBufferFile::ReadVersion: Could not find the StreamerInfo with a checksum of 0x0 for the class “vector” in /eos/user/c/clemahie/HIForward/HiForward_Hiforest_PbPb_Run2018/2018/230301_151751/0001/HiForestAOD_trig_1005.root.”

and “Error in TBufferFile::CheckByteCount: object of class vector read too few bytes: 6 instead of 234”

pfSkimEx.C (4.8 KB)

(I am using ROOT 6.24/08 on lxplus)
Attached is my .C file as well as the .sub and .sh files. Thanks for any help.
Cole
pfSkimEx_sh.txt (324 Bytes)
pfSkimEx_sub.txt (425 Bytes)

I am using ROOT 6.24/08 on lxplus

Is the same ROOT version that you also have in the Condor environment?

Can you check which version it is using (e.g. by adding root --version to a new line in your .sh script).

I also see that you have this line in your submission file:

requirements 	      = (OpSysAndVer =?= "CentOS7")

CentOS7 is not the newest anymore. Maybe if you use CentOS8, the problem will resolve itself?

2 possibilities. The file (HiForestAOD_trig_1005.root) mentioned in the error message could be broken. You can test that (if you did not already) by running ‘just’ on that file. The 2nd possibility is that some of the file have larger arrays than expected and you ended up with memory over-write. i.e.

  float trkPt[10000], trkEta[10000];
  float jetPt[200]={0}, jetEta[200]={0}, jetPhi[200]={0};

maybe on some of the files they are more than 1000 track or more than 200 jets.

Thank you all for your suggestions. I have found an easier and more efficient way to do what I want to do by first making cuts and then cloning the branches from the original files I am interested in.

This avoids my previous use of large arrays and vectors and I have no errors.

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