Skip to content

Commit

Permalink
Harmonize verbosities
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehvogel authored and tmadlener committed Apr 24, 2024
1 parent e7976fe commit ddbb7ab
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion k4MarlinWrapper/k4MarlinWrapper/MarlinProcessorWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class MarlinProcessorWrapper : public GaudiAlgorithm {
virtual StatusCode initialize() override final;

private:
std::string m_verbosity = "MESSAGE";
std::string m_verbosity = "ERROR";
marlin::Processor* m_processor = nullptr;

/// Load libraries specified by MARLIN_DLL environment variable
Expand Down
18 changes: 18 additions & 0 deletions k4MarlinWrapper/src/components/MarlinProcessorWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,24 @@ StatusCode MarlinProcessorWrapper::initialize() {
}
}

// Set m_verbosity from OutputLevel of the MarlinProcessorWrapper
MSG::Level outputLevel = msgLevel();
switch (outputLevel) {
case MSG::ERROR:
m_verbosity = "ERROR";
break;
case MSG::WARNING:
m_verbosity = "WARNING";
break;
case MSG::INFO:
m_verbosity = "MESSAGE";
break;
case MSG::DEBUG:
m_verbosity = "DEBUG";
break;
}

// pass m_verbosity to overwrite it if explicitly stated in wrapped parameters
auto parameters = parseParameters(m_parameters, m_verbosity);
if (instantiateProcessor(parameters, m_processorType).isFailure()) {
return StatusCode::FAILURE;
Expand Down

0 comments on commit ddbb7ab

Please sign in to comment.