Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:23

0001 // @(#)root/base:$Id$
0002 // Author: Bertrand Bellenot   19/06/2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 #ifndef ROOT_TRemoteObject
0012 #define ROOT_TRemoteObject
0013 
0014 //////////////////////////////////////////////////////////////////////////
0015 //                                                                      //
0016 // TRemoteObject                                                        //
0017 //                                                                      //
0018 // The TRemoteObject class provides protocol for browsing ROOT objects  //
0019 // from a remote ROOT session.                                          //
0020 // It contains information on the real remote object as:               //
0021 //  - Object Properties (i.e. file stat if the object is a TSystemFile) //
0022 //  - Object Name                                                       //
0023 //  - Class Name                                                        //
0024 //  - TKey Object Name (if the remote object is a TKey)                 //
0025 //  - TKey Class Name (if the remote object is a TKey)                  //
0026 //  - Remote object address                                             //
0027 //                                                                      //
0028 //////////////////////////////////////////////////////////////////////////
0029 
0030 #include "TSystem.h"
0031 
0032 class TList;
0033 
0034 class TRemoteObject : public TNamed {
0035 
0036 protected:
0037    FileStat_t  fFileStat;        // file status
0038    Bool_t      fIsFolder;        // is folder flag
0039    Long64_t    fRemoteAddress;   // remote address
0040    TString     fClassName;       // real object class name
0041    TString     fKeyObjectName;   // key object name
0042    TString     fKeyClassName;    // key object class name
0043 
0044 public:
0045    TRemoteObject();
0046    TRemoteObject(const char *name, const char *title, const char *classname);
0047 
0048    virtual ~TRemoteObject();
0049 
0050    void                    Browse(TBrowser *b) override;
0051    Bool_t                  IsFolder() const override { return fIsFolder; }
0052    TList                  *Browse();
0053    Bool_t                  GetFileStat(FileStat_t *sbuf);
0054    const char             *GetClassName() const { return fClassName.Data(); }
0055    const char             *GetKeyObjectName() const { return fKeyObjectName.Data(); }
0056    const char             *GetKeyClassName() const { return fKeyClassName.Data(); }
0057    void                    SetFolder(Bool_t isFolder) { fIsFolder = isFolder; }
0058    void                    SetKeyObjectName(const char *name) { fKeyObjectName = name; }
0059    void                    SetKeyClassName(const char *name) { fKeyClassName = name; }
0060    void                    SetRemoteAddress(Longptr_t addr) { fRemoteAddress = addr; }
0061 
0062    ClassDefOverride(TRemoteObject,0)  //A remote object
0063 };
0064 
0065 #endif
0066