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());
93 std::queue<TBufferFile *> queue;
100 while (!queue.empty()) {
101 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)
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 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
static TFilePtr Open(std::string_view name, const Options_t &opts=Options_t())
Open a file with name for reading.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
virtual Bool_t OutputFile(const char *url, Bool_t force)
Open merger output file.
const char * GetOutputFileName() const
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...
A TMemFile is like a normal TFile except that it reads and writes only from memory.
Namespace for new ROOT classes and functions.
void swap(nlohmann::json &j1, nlohmann::json &j2) noexcept(is_nothrow_move_constructible< nlohmann::json >::value and is_nothrow_move_assignable< nlohmann::json >::value)
exchanges the values of two JSON objects