Logo ROOT   6.14/05
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 
18 class TCastorFile : public TNetFile {
19 
20 private:
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);
32  Int_t SysClose(Int_t fd);
33 
34 public:
35  TCastorFile(const char *url, Option_t *option = "", const char *ftitle = "",
36  Int_t compress = 1, Int_t netopt = 0);
37  TCastorFile() : TNetFile() { fIsCastor = fWrittenTo = kFALSE; }
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
Bool_t WriteBuffer(const char *buf, Int_t len)
Write specified byte range to remote file via rootd daemon.
const char Option_t
Definition: RtypesCore.h:62
Basic string class.
Definition: TString.h:131
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Bool_t fIsCastor
true if internal path is valid
Definition: TCastorFile.h:23
Int_t SysClose(Int_t fd)
Close currently open file.
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.
#define ClassDef(name, id)
Definition: Rtypes.h:320
void FindServerAndPath()
Find the CASTOR disk server and internal file path.
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
TString fAuthProto
Used to specific the auth protocol.
Definition: TCastorFile.h:26
EMessageTypes
Definition: MessageTypes.h:27
const Bool_t kFALSE
Definition: RtypesCore.h:88
TString fDiskServer
CASTOR remote disk server.
Definition: TCastorFile.h:21
TString fInternalPath
CASTOR internal path.
Definition: TCastorFile.h:22
virtual ~TCastorFile()
Definition: TCastorFile.h:38