Logo ROOT  
Reference Guide
TParallelMergingFile.h
Go to the documentation of this file.
1// @(#)root/net:$Id$
2// Author: Philippe Canal October 2011.
3
4/*************************************************************************
5 * Copyright (C) 1995-2011, Rene Brun, Fons Rademakers and al. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TParallelMergingFile
13#define ROOT_TParallelMergingFile
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TParallelMergingFile //
19// //
20// Specialization of TMemFile to connect to a parallel file merger. //
21// Upon a call to UploadAndReset, the content already written to the //
22// file is upload to the server and the object implementing the function//
23// ResetAfterMerge (like TTree) are reset. //
24// The parallel file merger will then collate the information coming //
25// from this client and any other client in to the file described by //
26// the filename of this object. //
27// //
28//////////////////////////////////////////////////////////////////////////
29
30#include "TMemFile.h"
31#include "TMessage.h"
32#include "TUrl.h"
33
34
35class TSocket;
36class TArrayC;
37
39{
40private:
41 TSocket *fSocket; // Socket to the parallel file merger server.
42 TUrl fServerLocation; // Url of the server.
43 Int_t fServerIdx; // Index of this socket/file on the server.
44 Int_t fServerVersion; // Protocol version used by the server.
45 TArrayC *fClassSent; // Record which StreamerInfo we already sent.
47
48public:
51
52 void Close(Option_t *option="") override;
54 Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) override;
55 Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) const override;
56 void WriteStreamerInfo() override;
57
58 ClassDefOverride(TParallelMergingFile, 0); // TFile specialization that will semi-automatically upload its content to a merging server.
59};
60
61#endif // ROOT_TParallelMergingFile
const char Option_t
Definition: RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
char name[80]
Definition: TGX11.cxx:110
Array of chars or bytes (8 bits per element).
Definition: TArrayC.h:27
A TMemFile is like a normal TFile except that it reads and writes only from memory.
Definition: TMemFile.h:19
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.
Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) override
Write memory objects to this file and upload them to the parallel merge server.
Bool_t UploadAndReset()
Upload the current file data to the merging server.
This class represents a WWW compatible URL.
Definition: TUrl.h:33
@ kUseCompiledDefault
Use the compile-time default setting.
Definition: Compression.h:50