It's the same object, available in any of the classes because of inheritance.

ios_base -> ios -> iostream -> fstream