00001 // @(#)root/base:$Id: TRemoteObject.h 20877 2007-11-19 11:17:07Z rdm $ 00002 // Author: Bertrand Bellenot 19/06/2007 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2007, 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 #ifndef ROOT_TObjectRemote 00012 #define ROOT_TObjectRemote 00013 00014 ////////////////////////////////////////////////////////////////////////// 00015 // // 00016 // TRemoteObject // 00017 // // 00018 // The TRemoteObject class provides protocol for browsing ROOT objects // 00019 // from a remote ROOT session. // 00020 // It contains informations on the real remote object as: // 00021 // - Object Properties (i.e. file stat if the object is a TSystemFile) // 00022 // - Object Name // 00023 // - Class Name // 00024 // - TKey Object Name (if the remote object is a TKey) // 00025 // - TKey Class Name (if the remote object is a TKey) // 00026 // - Remote object address // 00027 // // 00028 ////////////////////////////////////////////////////////////////////////// 00029 00030 #ifndef ROOT_TSystemDirectory 00031 #include "TSystemDirectory.h" 00032 #endif 00033 00034 #ifndef ROOT_TList 00035 #include "TList.h" 00036 #endif 00037 00038 #ifndef ROOT_TSystem 00039 #include "TSystem.h" 00040 #endif 00041 00042 class TRemoteObject : public TNamed { 00043 00044 protected: 00045 FileStat_t fFileStat; // file status 00046 Bool_t fIsFolder; // is folder flag 00047 Long64_t fRemoteAddress; // remote address 00048 TString fClassName; // real object class name 00049 TString fKeyObjectName; // key object name 00050 TString fKeyClassName; // key object class name 00051 00052 public: 00053 TRemoteObject(); 00054 TRemoteObject(const char *name, const char *title, const char *classname); 00055 00056 virtual ~TRemoteObject(); 00057 00058 virtual void Browse(TBrowser *b); 00059 Bool_t IsFolder() const { return fIsFolder; } 00060 TList *Browse(); 00061 Bool_t GetFileStat(FileStat_t *sbuf); 00062 const char *GetClassName() const { return fClassName.Data(); } 00063 const char *GetKeyObjectName() const { return fKeyObjectName.Data(); } 00064 const char *GetKeyClassName() const { return fKeyClassName.Data(); } 00065 void SetFolder(Bool_t isFolder) { fIsFolder = isFolder; } 00066 void SetKeyObjectName(const char *name) { fKeyObjectName = name; } 00067 void SetKeyClassName(const char *name) { fKeyClassName = name; } 00068 void SetRemoteAddress(Long_t addr) { fRemoteAddress = addr; } 00069 00070 ClassDef(TRemoteObject,0) //A remote object 00071 }; 00072 00073 #endif 00074