From c20d8f33fe9f072d94b06fe55bb40341707989ae Mon Sep 17 00:00:00 2001 From: Stewart Martin-Haugh <smh@cern.ch> Date: Thu, 5 Apr 2018 15:11:28 +0200 Subject: [PATCH] Clarify use of MsgStream macros --- rules.org | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rules.org b/rules.org index 20c3c87..d14bed3 100644 --- a/rules.org +++ b/rules.org @@ -1988,6 +1988,11 @@ private: Athena-aware could use =cerr= before throwing an exception, but all Athena-aware classes should use =MSG::FATAL= and/or throw an exception. + When using =MsgStream=, note that a call to e.g. =msg() << MSG::VERBOSE= that is suppressed by the output level has a higher runtime cost than + a call suppressed by =if (msgLvl <= MSG::VERBOSE)=. The =ATH_MSG= macros (=ATH_MSG_INFO= and =ATH_MSG_DEBUG= etc) wrap =msg()= calls in appropriate if statements and + are preferred in general for two reasons: they take up less space in the source code and indicate immediately that the message is correctly handled. + + - *Check for all errors reported from functions.* [<<check-return-status>>] -- GitLab