Change:
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.