Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmonize verbosities #182

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading