Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gaudi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaudi
Gaudi
Commits
be086a4c
Commit
be086a4c
authored
2 years ago
by
Marco Clemencic
Browse files
Options
Downloads
Patches
Plain Diff
Take into account ROOT message suppression in ROOTErrorHandlerAdapter
parent
003faa12
No related branches found
No related tags found
1 merge request
!1412
Use MessageSvc to handle ROOT messages
Pipeline
#5040460
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.cpp
+11
-7
11 additions, 7 deletions
GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.cpp
with
11 additions
and
7 deletions
GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.cpp
+
11
−
7
View file @
be086a4c
...
...
@@ -51,13 +51,17 @@ namespace {
/// @brief Adapter to forward ROOT messages to a MessageSvc.
void
ROOTErrorHandlerAdapter
(
int
level
,
Bool_t
abort
,
const
char
*
location
,
const
char
*
msg
)
{
if
(
s_messageSvcInstance
)
{
// # Map ROOT level to Gaudi level:
// ROOT levels go from 0 to 6000 in step of 1000,
// kInfo is 1000 while MSG::INFO is 3, so we aim for `level / 1000 + 2`,
// but we have to put a cap at MSG::FATAL.
int
msgLevel
=
std
::
min
<
int
>
(
level
/
1000
+
2
,
MSG
::
FATAL
);
if
(
msgLevel
>=
s_messageSvcInstance
->
outputLevel
(
location
)
)
s_messageSvcInstance
->
reportMessage
(
Message
{
location
,
msgLevel
,
msg
},
msgLevel
);
// we pass the message to MessageSvc only if it is not suppressed by ROOT itself
if
(
level
>=
gErrorIgnoreLevel
)
{
// # Map ROOT level to Gaudi level:
// ROOT levels go from 0 to 6000 in step of 1000,
// kInfo is 1000 while MSG::INFO is 3, so we aim for `level / 1000 + 2`,
// but we have to put a cap at MSG::FATAL.
int
msgLevel
=
std
::
min
<
int
>
(
level
/
1000
+
2
,
MSG
::
FATAL
);
if
(
msgLevel
>=
s_messageSvcInstance
->
outputLevel
(
location
)
)
{
s_messageSvcInstance
->
reportMessage
(
Message
{
location
,
msgLevel
,
msg
},
msgLevel
);
}
}
}
else
{
// If a message is sent when we do not have an IMessageSvc, let's use something else
if
(
s_originalRootErrorHandler
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment