Hi,
For creating a temporary TFile, I’m wondering if I can do something smarter than my so-far standard
TFile* dummy = new TFile("/tmp/dummy.root","recreate");
// create tons of temporary objects
// do work
TFile* of = new TFile(targetfilename.c_str(),"recreate");
of->WriteTObject(thing_i_want_to_store);
of->Close();
delete of;
I’m thining about using something from gnu.org/software/libc/manual … Files.html (such that i can run several instances of the same program). On stackoverflow mkstemp() or tmpfile() are recommended, yet these already open the file and return a filedescriptor, of which i don’t know if i can use it in combination with TFile.
Any recommendations?
Thanks,
Paul