Reading TFile into TMemFile

Hello,

I am trying to read TFile from disc and clone it into TMemFile, which later becomes a TMessage.

What’s the simplest way to do the TFile → TMemFIle step? Or maybe I can somehow go straight from TFile into TMessage?

Thanks!

Can you clarify you goal and/or setup? (In first approximation, why is the receiver of the TMessage can not open/use the file directly)? (Depending on your answer, TMessage and TMemFile may or may not be the right tools).

TMessage is sent through network to worker, which expects a TFile.
I’m prototyping a processing pipeline, in final version worker(s) will probably expect just a TTree or a set of them, but for now it is what it is.
I don’t want to send a file to worker, store it on disc, and then load again.

I have adjusted this ROOT: tutorials/io/copyFiles.C Source File to my needs. Seems to work.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.