36 const char *ftitle ,
Int_t compress ) :
37 TMemFile(filename,option,ftitle,compress)
39 TString serverurl = strstr(
fUrl.GetOptions(),
"pmerge=");
62 if (0==
fSocket->Send(
"Finished")) {
79 if (path && strlen(path) > 0 && path[0] ==
'/') {
83 Error(
"UploadAndReset",
"Could not contact the server %s\n", path);
91 if (host == 0 || host[0] ==
'\0') {
99 Error(
"UploadAndReset",
"Could not contact the server %s:%d\n", host, port);
109 if (
n < 0 && kind != 0 )
111 Error(
"UploadAndReset",
"Unexpected server message: kind=%d idx=%d\n",kind,
fServerIdx);
116 if (
n < 0 && kind != 1 )
118 Fatal(
"UploadAndReset",
"Unexpected server message: kind=%d status=%d\n",kind,
fServerVersion);
142 Error(
"UploadAndReset",
"Upload to the merging server failed with %d\n",error);
187 if (newSize > prevSize) {
198 Error(
"Write const",
"A const TFile object should not be saved. We try to proceed anyway.");
218 for(
Int_t c = 0;
c < isize &&
c < ssize; ++
c) {
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
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 Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
void Fatal(const char *location, const char *msgfmt,...)
Use this function in case of a fatal error. It will abort the program.
Array of chars or bytes (8 bits per element).
Bool_t fWritable
True if directory is writable.
virtual void Close(Option_t *option="")
Delete all objects from memory and directory structure itself.
virtual Int_t Write(const char *=nullptr, Int_t=0, Int_t=0) override
Write this object to the current directory.
TArrayC * fClassIndex
!Index of TStreamerInfo classes written to this file
virtual Long64_t GetEND() const
virtual void WriteStreamerInfo()
Write the list of TStreamerInfo as a single object in this file The class Streamer description for al...
virtual Long64_t GetBytesWritten() const
Return the total number of bytes written so far to the file.
TMemFile(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Long64_t defBlockSize=0LL)
Usual Constructor.
virtual Long64_t CopyTo(void *to, Long64_t maxsize) const
Copy the binary representation of the TMemFile into the memory area starting at 'to' and of length at...
void ResetAfterMerge(TFileMergeInfo *) override
Wipe all the data from the permanent buffer but keep, the in-memory object alive.
static void EnableSchemaEvolutionForAll(Bool_t enable=kTRUE)
Static function enabling or disabling the automatic schema evolution.
const char * GetName() const override
Returns name of object.
~TParallelMergingFile()
Destructor.
std::unique_ptr< TArrayC > fClassSent
std::unique_ptr< TSocket > fSocket
Bool_t OpenConnection()
Attempts to connect to the server.
Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsize=0) override
Write memory objects to this file and upload them to the parallel merge server.
TParallelMergingFile(const char *filename, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault)
Constructor.
void WriteStreamerInfo() override
Write the list of TStreamerInfo as a single object in this file The class Streamer description for al...
void Close(Option_t *option="") override
Close a file.
Bool_t UploadAndReset()
Upload the current file data to the merging server.
This class implements client sockets.
TString & ReplaceAll(const TString &s1, const TString &s2)
This class represents a WWW compatible URL.