TAlienFile.h

Go to the documentation of this file.
00001 // @(#)root/alien:$Id: TAlienFile.h 23820 2008-05-13 12:10:45Z rdm $
00002 // Author: Andreas Peters 11/09/2003
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TAlienFile
00013 #define ROOT_TAlienFile
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TAlienFile                                                           //
00018 //                                                                      //
00019 // A TAlienFile is like a normal TFile except that it reads and writes  //
00020 // it's data via TXNetFile and gets authorization and the TXNetFile     //
00021 // URL from an alien service.                                           //
00022 //                                                                      //
00023 // Filenames are standard URL format with protocol "alien".             //
00024 // The following are valid TAlienFile URL's:                            //
00025 //                                                                      //
00026 //    alien:///alice/cern.ch/user/p/peters/test.root                    //
00027 //    /alien/alice/cern.ch/user/p/peters/test.root                      //
00028 //                                                                      //
00029 //    - notice that URLs like /alien/alice... are converted internally  //
00030 //      to alien://alice...                                             //
00031 //                                                                      //
00032 //////////////////////////////////////////////////////////////////////////
00033 
00034 #ifndef ROOT_TXNetFile
00035 #include "TXNetFile.h"
00036 #endif
00037 
00038 
00039 class TUrl;
00040 
00041 class TAlienFile : public TXNetFile {
00042 
00043 private:
00044    TString fLfn;       // logical file name
00045    TString fAuthz;     // authorization envelope
00046 
00047 public:
00048    TAlienFile() : TXNetFile(), fLfn(), fAuthz() { }
00049    TAlienFile(const char *purl, Option_t *option = "",
00050               const char *ftitle = "", Int_t compress = 1,
00051               Bool_t parallelopen = kFALSE, const char *lurl = 0,
00052               const char *authz = 0);
00053    virtual ~TAlienFile();
00054 
00055    virtual void Close(const Option_t *opt = "");
00056 
00057    static TAlienFile *Open(const char *lfn, const Option_t *option = "",
00058                            const char *title = "", Int_t compress = 1,
00059                            Bool_t parallelopen = kFALSE);
00060    static TString     SUrl(const char *lfn);
00061 
00062    ClassDef(TAlienFile, 3)  //A ROOT file that reads/writes via AliEn services and TXNetFile protocol
00063 };
00064 
00065 #endif

Generated on Tue Jul 5 14:45:28 2011 for ROOT_528-00b_version by  doxygen 1.5.1