-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add support for running together with functional algorithms #188
Conversation
DataObject* p; | ||
auto sc = m_podioDataSvc->retrieveObject(e4h_coll_name, p); | ||
auto ptr = dynamic_cast<AnyDataWrapper<std::shared_ptr<podio::CollectionBase>>*>(p); | ||
if (sc.isFailure() || !ptr) { | ||
error() << "No collection with name: " << e4h_coll_name << " available for conversion" << endmsg; | ||
} else { | ||
collPtr = dynamic_cast<podio::CollectionBase*>(ptr->getData().get()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this path not possible for cases where it is in a Frame? I.e. could we just have one path through this, and drop the usage of the evtFrame
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this question mixes two things: the collection is either in the Frame if it has been produced with the non-functional algorithms or it is not if it has been produced by functional algorithms; then we can not use the event frame by asking the data service for the collections instead (but this could have been done earlier and doesn't have much to do with the current changes) as it is right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was more aiming at the question, whether we can reach collections that have been produced by non-functional algorithms via the data svc, instead of going to the event Frame?
Looking at the test that you are hooking on here, I think we could even remove the current |
|
Any more comments or can we merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looks good to me.
podio::CollectionBase* collPtr = nullptr; | ||
DataObject* p; | ||
auto sc = m_podioDataSvc->retrieveObject(e4h_coll_name, p); | ||
if (sc.isFailure()) { | ||
throw GaudiException("Collection not found", name(), StatusCode::FAILURE); | ||
} | ||
auto ptr = dynamic_cast<DataWrapperBase*>(p); | ||
if (ptr) { | ||
collPtr = ptr->collectionBase(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly more verbose than before, but at least we got the detail of using a Frame out of here.
These are the minimal changes needed to make the wrapper work with functional algorithms using
PodioInput
andPodioOutput
. Working with the newIOSvc
will take a bit more work since more changes are needed.BEGINRELEASENOTES
ENDRELEASENOTES