Skip to content

Commit

Permalink
Small bugfix: JMultifactory app pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwbrei committed May 8, 2024
1 parent 11674a7 commit 3fd909f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/libraries/JANA/JMultifactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,12 @@ void JMultifactory::SetCollection(std::string tag, std::unique_ptr<typename JFac

template <typename T>
void JMultifactoryHelper<T>::Process(const std::shared_ptr<const JEvent> &event) {
mMultiFactory->SetApplication(this->GetApplication());
mMultiFactory->Execute(event);
}

#ifdef JANA2_HAVE_PODIO
template <typename T>
void JMultifactoryHelperPodio<T>::Process(const std::shared_ptr<const JEvent> &event) {
mMultiFactory->SetApplication(this->GetApplication());
mMultiFactory->Execute(event);
}
#endif // JANA2_HAVE_PODIO
Expand Down
7 changes: 6 additions & 1 deletion src/libraries/JANA/Omni/JComponentFwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ struct JComponent {
return m_status;
}

void SetApplication(JApplication* app) { m_app = app; }
void SetApplication(JApplication* app) {
if (app == nullptr) {
throw JException("Attempting to set a null JApplication pointer!");
}
m_app = app;
}

void SetLogger(JLogger logger) { m_logger = logger; }

Expand Down

0 comments on commit 3fd909f

Please sign in to comment.