Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
THbookFile.h
Go to the documentation of this file.
1 // @(#)root/hbook:$Id$
2 // Author: Rene Brun 18/02/2002
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2002, 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 
12 #ifndef ROOT_THbookFile
13 #define ROOT_THbookFile
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // THbookFile //
19 // //
20 // ROOT interface to Hbook/PAW files //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TFile.h"
25 
26 
27 class TTreeFormula;
28 
29 class THbookFile : public TNamed {
30 
31 protected:
32  Int_t fLun; //Fortran logical unit for this file
33  Int_t fLrecl; //Record length in Hbook machine words
34  TList *fList; //list of objects in memory
35  TList *fKeys; //list of Hbook keys (Ids) on disk
36  TString fCurDir; //name of current directory
37 
38  static Bool_t fgPawInit;
39  static Int_t *fgLuns;
40 
41 public:
42 
43  THbookFile();
44  THbookFile(const char *fname, Int_t lrecl=1024);
45  virtual ~THbookFile();
46  virtual void Browse(TBrowser *b);
47  virtual Bool_t cd(const char *dirname="");
48  virtual void Close(Option_t *option="");
49  virtual TFile *Convert2root(const char *rootname="", Int_t lrecl=0, Option_t *option=""); // *MENU*
50  virtual TObject *ConvertCWN(Int_t id);
51  virtual TObject *ConvertRWN(Int_t id);
52  virtual TObject *ConvertProfile(Int_t id);
53  virtual TObject *Convert1D(Int_t id);
54  virtual TObject *Convert2D(Int_t id);
55  void DeleteID(Int_t id);
56  virtual TObject *FindObject(const char *name) const;
57  virtual TObject *FindObject(const TObject *obj) const;
58  TObject *Get(Int_t id);
59  const char *GetCurDir() const {return fCurDir.Data();}
60  Int_t GetEntry(Int_t entry,Int_t id, Int_t atype, Float_t *x);
61  Int_t GetEntryBranch(Int_t entry,Int_t id);
62  Long64_t GetSize() const {return 0;}
63  TList *GetList() const {return fList;}
64  TList *GetListOfKeys() const { return fKeys; }
65  void InitLeaves(Int_t id, Int_t var, TTreeFormula *formula);
66  Bool_t IsFolder() const { return kTRUE; }
67  virtual Bool_t IsOpen() const;
68  virtual void ls(const char *path="") const;
69  virtual void SetBranchAddress(Int_t id, const char *bname, void *add);
70 
71  ClassDef(THbookFile,1) //ROOT interface to Hbook/PAW files
72 };
73 
74 #endif