Logo ROOT   6.16/01
Reference Guide
TCastorFile.h
Go to the documentation of this file.
1// @(#)root/castor:$Id$
2// Author: Fons Rademakers 17/09/2003 + Giulia Taurelli 29/06/2006
3
4/*************************************************************************
5 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
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_TCastorFile
13#define ROOT_TCastorFile
14
15#include "TNetFile.h"
16
17
18class TCastorFile : public TNetFile {
19
20private:
21 TString fDiskServer; ///< CASTOR remote disk server
22 TString fInternalPath; ///< CASTOR internal path
23 Bool_t fIsCastor; ///< true if internal path is valid
24 Bool_t fWrittenTo; ///< true if data has been written to file
25
26 TString fAuthProto; ///< Used to specific the auth protocol
27
28 void FindServerAndPath();
29 void ConnectServer(Int_t *stat, EMessageTypes *kind, Int_t netopt,
30 Int_t tcpwindowsize, Bool_t forceOpen,
31 Bool_t forceRead);
33
34public:
35 TCastorFile(const char *url, Option_t *option = "", const char *ftitle = "",
38 virtual ~TCastorFile() { }
39
40 Bool_t WriteBuffer(const char *buf, Int_t len);
41
42 ClassDef(TCastorFile,1) //TFile reading/writing via rootd to a CASTOR server
43};
44
45#endif
EMessageTypes
Definition: MessageTypes.h:27
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
A TNetFile interfaced to the Castor storage backend.
Definition: TCastorFile.h:18
Bool_t fWrittenTo
true if data has been written to file
Definition: TCastorFile.h:24
Bool_t WriteBuffer(const char *buf, Int_t len)
Write specified byte range to remote file via rootd daemon.
Bool_t fIsCastor
true if internal path is valid
Definition: TCastorFile.h:23
Int_t SysClose(Int_t fd)
Close currently open file.
TString fInternalPath
CASTOR internal path.
Definition: TCastorFile.h:22
virtual ~TCastorFile()
Definition: TCastorFile.h:38
void ConnectServer(Int_t *stat, EMessageTypes *kind, Int_t netopt, Int_t tcpwindowsize, Bool_t forceOpen, Bool_t forceRead)
Connect to remote rootd server on CASTOR disk server.
TString fDiskServer
CASTOR remote disk server.
Definition: TCastorFile.h:21
void FindServerAndPath()
Find the CASTOR disk server and internal file path.
TString fAuthProto
Used to specific the auth protocol.
Definition: TCastorFile.h:26
Basic string class.
Definition: TString.h:131
@ kUseGeneralPurpose
Use the recommended general-purpose setting; moderate read / write speed and compression ratio.
Definition: Compression.h:53