Skip to content

Commit

Permalink
Merge pull request #297 from JeffersonLab/nbrei_issue295
Browse files Browse the repository at this point in the history
Bugfixes for EICrecon
  • Loading branch information
nathanwbrei authored May 1, 2024
2 parents 56d1719 + be3d29d commit 94f9792
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/examples/TimesliceExample/MyFileReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct MyFileReader : public JEventSource {

void Close() override { }

Result Emit(JEvent&) override {
Result Emit(JEvent& event) override {

auto event_nr = event.GetEventNumber();

Expand Down
6 changes: 3 additions & 3 deletions src/libraries/JANA/JApplication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ void JApplication::Initialize() {
// Attach all plugins
plugin_loader->attach_plugins(component_manager.get());

// Resolve all event sources now that all plugins have been loaded
component_manager->resolve_event_sources();

// Give all components a JApplication pointer and a logger
component_manager->configure_components();

// Resolve all event sources now that all plugins have been loaded
component_manager->resolve_event_sources();

// Set desired nthreads. We parse the 'nthreads' parameter two different ways for backwards compatibility.
m_desired_nthreads = 1;
m_params->SetDefaultParameter("nthreads", m_desired_nthreads, "Desired number of worker threads, or 'Ncores' to use all available cores.");
Expand Down
5 changes: 3 additions & 2 deletions src/libraries/JANA/Services/JPluginLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ void JPluginLoader::attach_plugin(std::string soname) {
// Open shared object
void* handle = dlopen(soname.c_str(), RTLD_LAZY | RTLD_GLOBAL | RTLD_NODELETE);
if (!handle) {
LOG_DEBUG(m_logger) << dlerror() << LOG_END;
throw JException("Plugin dlopen() failed: %s", dlerror());
std::string err = dlerror();
LOG_DEBUG(m_logger) << "Plugin dlopen() failed: " << err << LOG_END;
throw JException("Plugin dlopen() failed: %s", err.c_str());
}

// Look for an InitPlugin symbol
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/JTestRoot/JTestRootEventSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class JTestRootEventSource : public JEventSource {

public:
JTestRootEventSource(std::string resource_name, JApplication* app);
JTestRootEventSource();
virtual ~JTestRootEventSource() = default;

Result Emit(JEvent& event) override;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/JTestRoot/JTestRootProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ JTestRootProcessor::JTestRootProcessor() {
SetCallbackStyle(CallbackStyle::ExpertMode);
}

void JTestRootProcessor::Process(const JEvent&) {
void JTestRootProcessor::Process(const JEvent& event) {
// Get the cluster objects
auto clusters = event.Get<Cluster>();

Expand Down

0 comments on commit 94f9792

Please sign in to comment.