You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment writing collections and frames is possible from python but a bit cumbersome:
fromedm4hepimportedm4hepfromROOTimportpodiofrompodio.root_ioimportWriterimportcppyywriter=Writer('frame.root') # This will write the frame to a file called frame.rootframe=podio.Frame() # This is where the collection and other things will be storedcoll=edm4hep.MCParticleCollection() # Create an EDM4hep collectioncoll.create() # Create a MutableMCParticle objectframe.put(cppyy.gbl.std.move(coll), "MCParticles") # Add collection to frame writer.writeFrame(frame, 'events')
writer.finish()
I think the agreement here is that frame.put should work without cppyy.gbl.std.move (and also with it in case someone is translating literally the C++ code?). I can give it a try this week, it should be easy to do
The text was updated successfully, but these errors were encountered:
I am not entirely sure about whether it has to work both ways actually. I think having it work without std.move should be the main goal. In principle std::move(std::move(foo)) should be valid c++, but I am not sure whether cppyy can handle it. Maybe it does and it just works out of the box. Otherwise we just document it.
Another interesting question to clarify is the state in which the collection is in after put (mainly for documentation purposes).
At the moment writing collections and frames is possible from python but a bit cumbersome:
I think the agreement here is that
frame.put
should work withoutcppyy.gbl.std.move
(and also with it in case someone is translating literally the C++ code?). I can give it a try this week, it should be easy to doThe text was updated successfully, but these errors were encountered: