THbookFile.h

Go to the documentation of this file.
00001 // @(#)root/hbook:$Id: THbookFile.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Rene Brun   18/02/2002
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2002, 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_THbookFile
00013 #define ROOT_THbookFile
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // THbookFile                                                           //
00019 //                                                                      //
00020 // ROOT interface to Hbook/PAW files                                    //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TFile
00025 #include "TFile.h"
00026 #endif
00027 
00028 
00029 class TTreeFormula;
00030 
00031 class THbookFile : public TNamed {
00032 
00033 protected:
00034    Int_t         fLun;     //Fortran logical unit for this file
00035    Int_t         fLrecl;   //Record length in Hbook machine words
00036    TList        *fList;    //list of objects in memory
00037    TList        *fKeys;    //list of Hbook keys (Ids) on disk
00038    TString       fCurDir;  //name of current directory
00039    
00040    static Bool_t fgPawInit;
00041    static Int_t *fgLuns;
00042 
00043 public:
00044 
00045    THbookFile();
00046    THbookFile(const char *fname, Int_t lrecl=1024);
00047    virtual ~THbookFile();
00048    virtual void      Browse(TBrowser *b);
00049    virtual Bool_t    cd(const char *dirname="");
00050    virtual void      Close(Option_t *option="");
00051    virtual TFile    *Convert2root(const char *rootname="", Int_t lrecl=0, Option_t *option=""); // *MENU*
00052    virtual TObject  *ConvertCWN(Int_t id);
00053    virtual TObject  *ConvertRWN(Int_t id);
00054    virtual TObject  *ConvertProfile(Int_t id);
00055    virtual TObject  *Convert1D(Int_t id);
00056    virtual TObject  *Convert2D(Int_t id);
00057            void      DeleteID(Int_t id);
00058    virtual TObject  *FindObject(const char *name) const;
00059    virtual TObject  *FindObject(const TObject *obj) const;
00060    TObject          *Get(Int_t id);
00061    const char       *GetCurDir() const {return fCurDir.Data();}
00062    Int_t             GetEntry(Int_t entry,Int_t id, Int_t atype, Float_t *x);
00063    Int_t             GetEntryBranch(Int_t entry,Int_t id);
00064    Long64_t          GetSize() const {return 0;}
00065    TList            *GetList() const {return fList;}
00066    TList            *GetListOfKeys() const { return fKeys; }
00067    void              InitLeaves(Int_t id, Int_t var, TTreeFormula *formula);
00068    Bool_t            IsFolder() const { return kTRUE; }
00069    virtual Bool_t    IsOpen() const;
00070    virtual void      ls(const char *path="") const;
00071    virtual void      SetBranchAddress(Int_t id, const char *bname, void *add);
00072 
00073    ClassDef(THbookFile,1)  //ROOT interface to Hbook/PAW files
00074 };
00075 
00076 #endif

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