75 if (clientCount > 100) {
76 printf(
"only accept 100 clients connections\n");
81 client->
Send(clientCount, kStartConnection);
82 client->
Send(kProtocolVersion, kProtocol);
85 printf(
"Accept %d connections\n",clientCount);
93 Error(
"fastMergeServer",
"The client did not send a message\n");
97 printf(
"Client %d: %s\n", clientCount, str);
99 printf(
"Client %d: bytes recv = %d, bytes sent = %d\n", clientCount, s->
GetBytesRecv(),
103 if (mon->
GetActive() == 0 || clientCount == 0) {
104 printf(
"No more active clients... stopping\n");
116 Info(
"fastMergeServer",
"Receive input from client %d for %s",clientId,filename.
Data());
129 printf(
"*** Unexpected message ***\n");
Merge incrementally all type of objects.
void SetBufferOffset(Int_t offset=0)
virtual void Remove(TSocket *sock)
Remove a socket from the monitor.
virtual Bool_t IsValid() const
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
virtual void ReadTString(TString &s)
Read TString from TBuffer.
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
void fastMergeServer(bool cache=false)
static const char * filename()
virtual void Add(TSocket *sock, Int_t interest=kRead)
Add socket to the monitor's active list.
A TMemFile is like a normal TFile except that it reads and writes only from memory.
UInt_t GetBytesSent() const
UInt_t GetBytesRecv() const
const char * Data() const
virtual void ReadLong64(Long64_t &l)
virtual void ReadInt(Int_t &i)
virtual char * ReadString(char *s, Int_t max)
Read string from I/O buffer.
void Info(const char *location, const char *msgfmt,...)
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...
virtual Bool_t OutputFile(const char *url, Bool_t force)
Open merger output file.
void Error(const char *location, const char *msgfmt,...)
TSocket * Select()
Return pointer to socket for which an event is waiting.
TFile * GetOutputFile() const
virtual void Close(Option_t *opt="")
Close the socket.
Double_t length(const TVector2 &v)
This class provides file copy and merging services.
void SetPrintLevel(Int_t level)
virtual const char * GetName() const
Returns name of object.
Int_t GetActive(Long_t timeout=-1) const
Return number of sockets in the active list.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
virtual Bool_t PartialMerge(Int_t type=kAll|kIncremental)
Merge the files.
TClass * GetClass() const
A cache when writing files over the network.