22namespace Experimental {
40 Error(
"TBufferMerger",
"cannot write to output file");
48 if (!
f.expired())
Fatal(
"TBufferMerger",
" TBufferMergerFiles must be destroyed before the server");
58 gROOT->GetListOfFiles()->Remove(
f.get());
104 std::queue<TBufferFile *> queue;
111 while (!queue.empty()) {
112 std::unique_ptr<TBufferFile> buffer{queue.front()};
void Error(const char *location, const char *msgfmt,...)
void Fatal(const char *location, const char *msgfmt,...)
R__EXTERN TVirtualMutex * gROOTMutex
#define R__LOCKGUARD(mutex)
const char * GetMergeOptions()
Returns the current merge options.
void Push(TBufferFile *buffer)
friend class TBufferMergerFile
std::shared_ptr< TBufferMergerFile > GetFile()
Returns a TBufferMergerFile to which data can be written.
std::queue< TBufferFile * > fQueue
size_t GetQueueSize() const
Returns the number of buffers currently in the queue.
void SetMergeOptions(const TString &options)
Sets the merge options.
void Init(std::unique_ptr< TFile >)
virtual ~TBufferMerger()
Destructor.
size_t GetAutoSave() const
Returns the current value of the auto save setting in bytes (default = 0).
void SetAutoSave(size_t size)
By default, TBufferMerger will call TFileMerger::PartialMerge() for each buffer pushed onto its merge...
TBufferMerger()
TBufferMerger has no default constructor.
std::vector< std::weak_ptr< TBufferMergerFile > > fAttachedFiles
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
Small helper to keep current directory context.
virtual Bool_t OutputFile(const char *url, Bool_t force)
Open merger output file.
const char * GetOutputFileName() const
const char * GetMergeOptions()
void SetMergeOptions(const TString &options)
virtual Bool_t PartialMerge(Int_t type=kAll|kIncremental)
Merge the files.
virtual void Reset()
Reset merger file list.
virtual Bool_t AddAdoptFile(TFile *source, Bool_t cpProgress=kTRUE)
Add the TFile to this file merger and give ownership of the TFile to this object (unless kFALSE is re...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
A TMemFile is like a normal TFile except that it reads and writes only from memory.
void swap(RDirectoryEntry &e1, RDirectoryEntry &e2) noexcept
static void output(int code)