Add missing include of iostream

Fix compilation errors in ROOT6 IB by adding missing include of iostream.  To avoid adding an include of iostream in a header, the functions using std::cout were moved into the .cc file.  Since these are called in error cases only, there is no performance impact.
This is being queued to the main 7_1_X branch for code commonality.