key4hep / k4FWCore

Core Components for the Gaudi-based Key4hep Framework
Apache License 2.0
10 stars 26 forks source link

IOSvc: Minor fixes for improving usage and errors #213

Closed jmcarcell closed 1 week ago

jmcarcell commented 1 month ago

BEGINRELEASENOTES

ENDRELEASENOTES

The two warnings are these:

EventLoopMgr      WARNING Unable to locate service "EventSelector"
EventLoopMgr      WARNING No events will be processed from external input.

they will appear always and this feature is not being used. In any case, this only overrides the default case, someone can create an EventLoopMgr and have the warnings. I opened an issue in Gaudi.

The most important is failing when importing ApplicationMgr from Configurables as most of the examples do not set the algorithms for reading and writing that the user doesn't need to worry about in almost any case, but the wrapper in k4FWCore does so one only needs to specify IOSvc.Input or IOSvc.Output.

jmcarcell commented 1 month ago

This should be ready to be merged. I will merge today if there aren't any comments.

jmcarcell commented 1 week ago

If think it might be simpler if we say to just always import ApplicationMgr from k4FWCore rather than if there is IOSvc then import from k4FWCore otherwise import from k4FWCore or Configurables.

In a similar vain maybe all the examples could import from k4FWCore rather than importing from Configurables when possible?

I agree this is a good idea and now all the examples import from k4FWCore.

Maybe in a longer run we could port our custom python wrappers (ApplicationMgr.py, IOSvc.py) back to C++ (no extra checks or python parsing needed on our side, users can import all they need from Configurables, easier to extend by users if needed)

About this I'm not sure, for ApplicationMgr that would require a reimplementation of the Gaudi one in C++ and then it can't be called ApplicationMgr anymore since there will always be already one available...