Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/THbookFile.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/hbook:$Id$
0002 // Author: Rene Brun   18/02/2002
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2002, 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 
0012 #ifndef ROOT_THbookFile
0013 #define ROOT_THbookFile
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // THbookFile                                                           //
0019 //                                                                      //
0020 // ROOT interface to Hbook/PAW files                                    //
0021 //                                                                      //
0022 //////////////////////////////////////////////////////////////////////////
0023 
0024 #include "TFile.h"
0025 
0026 
0027 class TTreeFormula;
0028 
0029 class THbookFile : public TNamed {
0030 
0031 protected:
0032    Int_t         fLun;     //Fortran logical unit for this file
0033    Int_t         fLrecl;   //Record length in Hbook machine words
0034    TList        *fList;    //list of objects in memory
0035    TList        *fKeys;    //list of Hbook keys (Ids) on disk
0036    TString       fCurDir;  //name of current directory
0037 
0038    static Bool_t fgPawInit;
0039    static Int_t *fgLuns;
0040 
0041 public:
0042 
0043    THbookFile();
0044    THbookFile(const char *fname, Int_t lrecl=1024);
0045    ~THbookFile() override;
0046    void      Browse(TBrowser *b) override;
0047    virtual Bool_t    cd(const char *dirname="");
0048    virtual void      Close(Option_t *option="");
0049    virtual TFile    *Convert2root(const char *rootname="", Int_t lrecl=0, Option_t *option=""); // *MENU*
0050    virtual TObject  *ConvertCWN(Int_t id);
0051    virtual TObject  *ConvertRWN(Int_t id);
0052    virtual TObject  *ConvertProfile(Int_t id);
0053    virtual TObject  *Convert1D(Int_t id);
0054    virtual TObject  *Convert2D(Int_t id);
0055            void      DeleteID(Int_t id);
0056    TObject  *FindObject(const char *name) const override;
0057    TObject  *FindObject(const TObject *obj) const override;
0058    TObject          *Get(Int_t id);
0059    const char       *GetCurDir() const {return fCurDir.Data();}
0060    Int_t             GetEntry(Int_t entry,Int_t id, Int_t atype, Float_t *x);
0061    Int_t             GetEntryBranch(Int_t entry,Int_t id);
0062    Long64_t          GetSize() const {return 0;}
0063    TList            *GetList() const {return fList;}
0064    TList            *GetListOfKeys() const { return fKeys; }
0065    void              InitLeaves(Int_t id, Int_t var, TTreeFormula *formula);
0066    Bool_t            IsFolder() const override { return kTRUE; }
0067    virtual Bool_t    IsOpen() const;
0068    void      ls(const char *path="") const override;
0069    virtual void      SetBranchAddress(Int_t id, const char *bname, void *add);
0070 
0071    ClassDefOverride(THbookFile,1)  //ROOT interface to Hbook/PAW files
0072 };
0073 
0074 #endif