Logo ROOT  
Reference Guide
TRemoteObject.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Bertrand Bellenot 19/06/2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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 #ifndef ROOT_TRemoteObject
12 #define ROOT_TRemoteObject
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TRemoteObject //
17 // //
18 // The TRemoteObject class provides protocol for browsing ROOT objects //
19 // from a remote ROOT session. //
20 // It contains information on the real remote object as: //
21 // - Object Properties (i.e. file stat if the object is a TSystemFile) //
22 // - Object Name //
23 // - Class Name //
24 // - TKey Object Name (if the remote object is a TKey) //
25 // - TKey Class Name (if the remote object is a TKey) //
26 // - Remote object address //
27 // //
28 //////////////////////////////////////////////////////////////////////////
29 
30 #include "TSystem.h"
31 
32 class TList;
33 
34 class TRemoteObject : public TNamed {
35 
36 protected:
37  FileStat_t fFileStat; // file status
38  Bool_t fIsFolder; // is folder flag
39  Long64_t fRemoteAddress; // remote address
40  TString fClassName; // real object class name
41  TString fKeyObjectName; // key object name
42  TString fKeyClassName; // key object class name
43 
44 public:
45  TRemoteObject();
46  TRemoteObject(const char *name, const char *title, const char *classname);
47 
48  virtual ~TRemoteObject();
49 
50  virtual void Browse(TBrowser *b);
51  Bool_t IsFolder() const { return fIsFolder; }
52  TList *Browse();
54  const char *GetClassName() const { return fClassName.Data(); }
55  const char *GetKeyObjectName() const { return fKeyObjectName.Data(); }
56  const char *GetKeyClassName() const { return fKeyClassName.Data(); }
57  void SetFolder(Bool_t isFolder) { fIsFolder = isFolder; }
58  void SetKeyObjectName(const char *name) { fKeyObjectName = name; }
59  void SetKeyClassName(const char *name) { fKeyClassName = name; }
60  void SetRemoteAddress(Long_t addr) { fRemoteAddress = addr; }
61 
62  ClassDef(TRemoteObject,0) //A remote object
63 };
64 
65 #endif
66 
TBrowser
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
TRemoteObject::fFileStat
FileStat_t fFileStat
Definition: TRemoteObject.h:37
TString::Data
const char * Data() const
Definition: TString.h:369
TRemoteObject::fKeyObjectName
TString fKeyObjectName
Definition: TRemoteObject.h:41
FileStat_t
Definition: TSystem.h:124
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TRemoteObject::SetFolder
void SetFolder(Bool_t isFolder)
Definition: TRemoteObject.h:57
TRemoteObject::fKeyClassName
TString fKeyClassName
Definition: TRemoteObject.h:42
TString
Basic string class.
Definition: TString.h:136
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TRemoteObject::GetKeyObjectName
const char * GetKeyObjectName() const
Definition: TRemoteObject.h:55
b
#define b(i)
Definition: RSha256.hxx:100
bool
TRemoteObject
The TRemoteObject class provides protocol for browsing ROOT objects from a remote ROOT session.
Definition: TRemoteObject.h:34
TSystem.h
TRemoteObject::SetKeyClassName
void SetKeyClassName(const char *name)
Definition: TRemoteObject.h:59
TRemoteObject::IsFolder
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition: TRemoteObject.h:51
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
TRemoteObject::fClassName
TString fClassName
Definition: TRemoteObject.h:40
Long_t
long Long_t
Definition: RtypesCore.h:54
TRemoteObject::~TRemoteObject
virtual ~TRemoteObject()
Delete remote object.
Definition: TRemoteObject.cxx:70
TRemoteObject::GetKeyClassName
const char * GetKeyClassName() const
Definition: TRemoteObject.h:56
TRemoteObject::fIsFolder
Bool_t fIsFolder
Definition: TRemoteObject.h:38
TRemoteObject::SetKeyObjectName
void SetKeyObjectName(const char *name)
Definition: TRemoteObject.h:58
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
TRemoteObject::GetClassName
const char * GetClassName() const
Definition: TRemoteObject.h:54
TRemoteObject::fRemoteAddress
Long64_t fRemoteAddress
Definition: TRemoteObject.h:39
TRemoteObject::Browse
TList * Browse()
Browse OS system directories.
Definition: TRemoteObject.cxx:135
TRemoteObject::TRemoteObject
TRemoteObject()
Create a remote object.
Definition: TRemoteObject.cxx:42
TList
A doubly linked list.
Definition: TList.h:44
TRemoteObject::SetRemoteAddress
void SetRemoteAddress(Long_t addr)
Definition: TRemoteObject.h:60
TRemoteObject::GetFileStat
Bool_t GetFileStat(FileStat_t *sbuf)
Get remote file status.
Definition: TRemoteObject.cxx:194