I have a macro mymacro.C which is interpreted in ROOT (root -l mymacro.C). In this macro, I open a file using fstream::open, like so:
#include