21 namespace Experimental {
24 : fName(name), fOption(option), fCompress(compress),
32 if (!
f.expired())
Fatal(
"TBufferMerger",
" TBufferMergerFiles must be destroyed before the server");
42 gROOT->GetListOfFiles()->Remove(f.get());
59 std::unique_ptr<TMemFile> memfile;
60 std::unique_ptr<TBufferFile> buffer;
74 buffer.reset(
fQueue.front());
91 merger.
AddFile(memfile.get(),
false);
void SetBufferOffset(Int_t offset=0)
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
std::vector< std::weak_ptr< TBufferMergerFile > > fAttachedFiles
Namespace for new ROOT classes and functions.
void Fatal(const char *location, const char *msgfmt,...)
R__EXTERN TVirtualMutex * gROOTMutex
void Push(TBufferFile *buffer)
A TMemFile is like a normal TFile except that it reads and writes only from memory.
std::queue< TBufferFile * > fQueue
virtual void ReadLong64(Long64_t &l)
virtual Bool_t OutputFile(const char *url, Bool_t force)
Open merger output file.
virtual Bool_t AddFile(TFile *source, Bool_t own, Bool_t cpProgress)
Add the TFile to this file merger and give ownership of the TFile to this object (unless kFALSE is re...
virtual ~TBufferMerger()
Destructor.
std::condition_variable fDataAvailable
This class provides file copy and merging services.
void SetReadMode()
Set buffer in read mode.
#define R__LOCKGUARD2(mutex)
std::unique_ptr< std::thread > fMergingThread
TBufferMerger()
TBufferMerger has no default constructor.
friend class TBufferMergerFile
std::shared_ptr< TBufferMergerFile > GetFile()
Returns a TBufferMergerFile to which data can be written.
virtual Bool_t PartialMerge(Int_t type=kAll|kIncremental)
Merge the files.
const std::string fOption
virtual void Reset()
Reset merger file list.