/usr/include/root/TDirectoryFile.h is in libroot-io-dev 5.34.30-0ubuntu8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | // @(#)root/io:$Id$
// Author: Rene Brun 22/01/2007
/*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TDirectoryFile
#define ROOT_TDirectoryFile
//////////////////////////////////////////////////////////////////////////
// //
// TDirectoryFile //
// //
// Describe directory structure in a ROOT file. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TDirectory
#include "TDirectory.h"
#endif
class TList;
class TBrowser;
class TKey;
class TFile;
class TDirectoryFile : public TDirectory {
protected:
Bool_t fModified; //true if directory has been modified
Bool_t fWritable; //true if directory is writable
TDatime fDatimeC; //Date and time when directory is created
TDatime fDatimeM; //Date and time of last modification
Int_t fNbytesKeys; //Number of bytes for the keys
Int_t fNbytesName; //Number of bytes in TNamed at creation time
Int_t fBufferSize; //Default buffer size to create new TKeys
Long64_t fSeekDir; //Location of directory on file
Long64_t fSeekParent; //Location of parent directory on file
Long64_t fSeekKeys; //Location of Keys record on file
TFile *fFile; //pointer to current file in memory
TList *fKeys; //Pointer to keys list in memory
virtual void CleanTargets();
void Init(TClass *cl = 0);
private:
TDirectoryFile(const TDirectoryFile &directory); //Directories cannot be copied
void operator=(const TDirectoryFile &); //Directories cannot be copied
public:
// TDirectory status bits
enum { kCloseDirectory = BIT(7) };
TDirectoryFile();
TDirectoryFile(const char *name, const char *title, Option_t *option="", TDirectory* motherDir = 0);
virtual ~TDirectoryFile();
virtual void Append(TObject *obj, Bool_t replace = kFALSE);
void Add(TObject *obj, Bool_t replace = kFALSE) { Append(obj,replace); }
Int_t AppendKey(TKey *key);
virtual void Browse(TBrowser *b);
void Build(TFile* motherFile = 0, TDirectory* motherDir = 0);
virtual TObject *CloneObject(const TObject *obj, Bool_t autoadd = kTRUE);
virtual void Close(Option_t *option="");
virtual void Copy(TObject &) const { MayNotUse("Copy(TObject &)"); }
virtual Bool_t cd(const char *path = 0);
virtual void Delete(const char *namecycle="");
virtual void FillBuffer(char *&buffer);
virtual TKey *FindKey(const char *keyname) const;
virtual TKey *FindKeyAny(const char *keyname) const;
virtual TObject *FindObjectAny(const char *name) const;
virtual TObject *FindObjectAnyFile(const char *name) const;
virtual TObject *Get(const char *namecycle);
virtual TDirectory *GetDirectory(const char *apath, Bool_t printError = false, const char *funcname = "GetDirectory");
template <class T> inline void GetObject(const char* namecycle, T*& ptr) // See TDirectory::Get for information
{
ptr = (T*)GetObjectChecked(namecycle,TBuffer::GetClass(typeid(T)));
}
virtual void *GetObjectChecked(const char *namecycle, const char* classname);
virtual void *GetObjectChecked(const char *namecycle, const TClass* cl);
virtual void *GetObjectUnchecked(const char *namecycle);
virtual Int_t GetBufferSize() const;
const TDatime &GetCreationDate() const { return fDatimeC; }
virtual TFile *GetFile() const { return fFile; }
virtual TKey *GetKey(const char *name, Short_t cycle=9999) const;
virtual TList *GetListOfKeys() const { return fKeys; }
const TDatime &GetModificationDate() const { return fDatimeM; }
virtual Int_t GetNbytesKeys() const { return fNbytesKeys; }
virtual Int_t GetNkeys() const { return fKeys->GetSize(); }
virtual Long64_t GetSeekDir() const { return fSeekDir; }
virtual Long64_t GetSeekParent() const { return fSeekParent; }
virtual Long64_t GetSeekKeys() const { return fSeekKeys; }
Bool_t IsModified() const { return fModified; }
Bool_t IsWritable() const { return fWritable; }
virtual void ls(Option_t *option="") const;
virtual TDirectory *mkdir(const char *name, const char *title="");
virtual TFile *OpenFile(const char *name, Option_t *option= "",
const char *ftitle = "", Int_t compress = 1,
Int_t netopt = 0);
virtual void Purge(Short_t nkeep=1);
virtual void ReadAll(Option_t *option="");
virtual Int_t ReadKeys(Bool_t forceRead=kTRUE);
virtual Int_t ReadTObject(TObject *obj, const char *keyname);
virtual void ResetAfterMerge(TFileMergeInfo *);
virtual void rmdir(const char *name);
virtual void Save();
virtual void SaveSelf(Bool_t force = kFALSE);
virtual Int_t SaveObjectAs(const TObject *obj, const char *filename="", Option_t *option="") const;
virtual void SetBufferSize(Int_t bufsize);
void SetModified() {fModified = kTRUE;}
void SetSeekDir(Long64_t v) { fSeekDir = v; }
virtual void SetTRefAction(TObject *ref, TObject *parent);
void SetWritable(Bool_t writable=kTRUE);
virtual Int_t Sizeof() const;
virtual Int_t Write(const char *name=0, Int_t opt=0, Int_t bufsize=0);
virtual Int_t Write(const char *name=0, Int_t opt=0, Int_t bufsize=0) const ;
virtual Int_t WriteTObject(const TObject *obj, const char *name=0, Option_t *option="", Int_t bufsize=0);
virtual Int_t WriteObjectAny(const void *obj, const char *classname, const char *name, Option_t *option="", Int_t bufsize=0);
virtual Int_t WriteObjectAny(const void *obj, const TClass *cl, const char *name, Option_t *option="", Int_t bufsize=0);
virtual void WriteDirHeader();
virtual void WriteKeys();
ClassDef(TDirectoryFile,5) //Describe directory structure in a ROOT file
};
#endif
|