Closed mcasales closed 5 months ago
It seems to be an issue with ROOT when we want to write the same tree with two opened files. I've added two minimal example scripts, one with the current way we fill the CAFs (test_bad.cpp) and one with the fix proposed in the branch iss62_flat_tree_fix
After the fix we get for the FLAT CAF:
root [0]
Attaching file test_cafs3.flat.root as _file0...
(TFile *) 0x29dd0e0
root [1] meta->Scan()
************************************************************
* Row * pot.pot * run.run * subrun.su * version.v *
************************************************************
* 0 * 1.015e+16 * 1 * 0 * 5 *
************************************************************
And for the CAF:
Attaching file test_cafs3.root as _file0...
(TFile *) 0x3a43120
root [1] meta->Scan()
************************************************************
* Row * pot.pot * run.run * subrun.su * version.v *
************************************************************
* 0 * 1.015e+16 * 1 * 0 * 5 *
************************************************************
Reading pot of file from
meta.pot
works well for cafs, but not for flatcafs. They still have the correct info inrec.beam.pulsepot
, but it seems the meta tree is filled incorrectly/empty. See output from opening flatcaf meta tree:and output from meta tree in cafs: