I have some code that iterates over a TChain (the old fashioned way) and rewrites the tree with a modification to a weight column (an enhanced hadd, in effect). However the weights in the output tree show significant corruption.
I am testing by merging one file, so the weights shouldn’t change. I can verify this while running:
However, the weights before and after merging do not match:
Before:
After:
Does anyone have any tips on what could be causing this? We originally saw the issue on EOS but this test was run with both the input and output files in my AFS work directory.
std::vector<double>* mc_sf = nullptr; // pointer because this is an STL container
to
std::vector<float>* mc_sf = nullptr; // pointer because this is an STL container
The I/O sub-system is capable of doing the conversion from std::vector<float> to std::vector<double> when reading (hence the correct printed information) but not when writing.