Hi,
I have noticed some very confusing behaviour of the ModelConfig::Print() method.
If the model has an associated snapshot, then that shapshot is loaded in order to print its contents. That means that adding a mc->Print() for information or debugging can alter the values in the workspace. I discovered this when I got different (incorrect) results when I enabled debugging output.
Surely a Print method should never change anything.
Another (minor) unconventional behaviour of ModelConfig’s Print() is that it only prints its output if RooMsgService has INFO messages enabled. For other classes, Print() always produces its output (unless the defaultPrintStream is directed elsewhere) and it’s up to the caller to decide whether to call Print. ModelConfig’s behaviour may sometimes be more convenient, but the non-standard behaviour is confusing when it sometimes doesn’t produce any output.
Tim.