We want to use TMemFile to create a TFile in memory and send it to a database which will then dump it on disk. It is important that the client does not hit the disk, thus the use of TMemFile instead of TFile.
In the present incarnation of TMemFile, it seems that the minimum size of the buffer is 2MB. We expected the parameter
defBlockSize to influence this size but it does not seem to be the case.
TH1F h1("asdf", "adf", 20, 0, 19); TMemFile m("memfile.root", "CREATE", "", ROOT::RCompressionSetting::EDefaults::kUseGeneralPurpose, 1024); m.WriteObject(&h1, "Digit"); std::cout << "TMemFile size " << m.GetSize() << "\n"; // TMemFile size 2097152
Are we doing it wrong ? How can we have a smaller file size ?
Barth and Sandro
ROOT Version: 6.18
Platform: Mac and CC7
Compiler: gcc and clang