33 Init(std::move(output));
38 if (!output || !output->IsWritable() || output->IsZombie())
39 Error(
"TBufferMerger",
"cannot write to output file");
41 fMerger.OutputFile(std::move(output));
47 if (!
f.expired())
Fatal(
"TBufferMerger",
" TBufferMergerFiles must be destroyed before the server");
60 gROOT->GetListOfFiles()->Remove(
f.get());
67 return fMerger.GetMergeOptions();
73 fMerger.SetMergeOptions(options);
int Int_t
Signed integer 4 bytes (int).
const char Option_t
Option string (const char).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
void Fatal(const char *location, const char *msgfmt,...)
Use this function in case of a fatal error. It will abort the program.
externTVirtualMutex * gROOTMutex
#define R__LOCKGUARD(mutex)
A TBufferMergerFile is similar to a TMemFile, but when data is written to it, it is appended to the T...
void Merge(TBufferMergerFile *memfile)
std::vector< std::weak_ptr< TBufferMergerFile > > fAttachedFiles
friend class TBufferMergerFile
virtual ~TBufferMerger()
Destructor.
std::shared_ptr< TBufferMergerFile > GetFile()
Returns a TBufferMergerFile to which data can be written.
const char * GetMergeOptions()
Returns the current merge options.
TBufferMerger()
TBufferMerger has no default constructor.
void SetMergeOptions(const TString &options)
Sets the merge options.
void Init(std::unique_ptr< TFile >)
TDirectory::TContext keeps track and restore the current directory.
@ kAll
Merge all type of objects (default).
@ kIncremental
Merge the input file with the content of the output file (if already existing).
@ kKeepCompression
Keep compression level unchanged for each input files.
@ kDelayWrite
Delay the TFile write (to reduce the number of write when reusing the file).
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
virtual void WriteStreamerInfo()
Write the list of TStreamerInfo as a single object in this file The class Streamer description for al...
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.
@ kOverwrite
overwrite existing object with same name
The namespace of The Lean Mean C++ Option Parser.