#ifndef ROOT_TFAsroIO
#define ROOT_TFAsroIO
#include <map>
#ifndef ROOT_TFVirtualIO
#include "TFVirtualIO.h"
#endif
#ifndef ROOT_TFAsroFile
#include "TFAsroFile.h"
#endif
class TFAsroFileItem
{
public:
TFAsroFileItem() {fasroFile = NULL; fNumOpen = 0;}
TFAsroFileItem(TFAsroFile * asroFile, Bool_t readOnly)
{fasroFile = asroFile; fNumOpen = 1; fReadOnly = readOnly;}
TFAsroFile * fasroFile;
Int_t fNumOpen;
Bool_t fReadOnly;
ClassDef(TFAsroFileItem,0)
};
class TFAsroFiles
{
private:
static std::map<Long_t, TFAsroFileItem> fFiles;
protected:
static TFAsroFile * OpenFile(const char * fileName, Bool_t readOnly);
static void CloseFile(TFAsroFile * asroFile);
ClassDef(TFAsroFiles,0)
};
class TFAsroIO : public TFVirtualIO, protected TFAsroFiles
{
protected:
TFAsroFile * fFile;
Int_t fCycle;
Int_t fCompLevel;
public:
TFAsroIO();
TFAsroIO(TFIOElement * element, const char * fileName);
TFAsroIO(TFIOElement * element, TFAsroFile * file, Int_t cycle);
~TFAsroIO();
static TFIOElement * TFRead(const char * fileName, const char * name,
Int_t cycle = 0, FMode mode = kFRead,
TClass * classType= NULL);
virtual Bool_t IsOpen() {return fFile != NULL && fFile->IsOpen(); }
virtual const char * GetFileName() {return fFile == NULL ? NULL : fFile->GetFileName();}
virtual Int_t GetCycle() {return fCycle;}
virtual void SetCompressionLevel(Int_t level) {fCompLevel = level;}
virtual Int_t GetCompressionLevel() {return fCompLevel;}
virtual void CreateElement() {}
virtual Int_t DeleteElement();
virtual Int_t SaveElement(Int_t compLevel = -1);
virtual UInt_t GetNumColumns();
virtual TFBaseCol * ReadCol(const char * name);
virtual void ReadAllCol(ColList & columns);
virtual Int_t SaveColumns(ColList & columns, Int_t compLevel = -1);
virtual Int_t DeleteColumn(const char * name);
virtual void GetColNames(std::map<TString, TNamed> & columns);
private:
ClassDef(TFAsroIO,0)
};
class TFAsroFileIter : public TFVirtualFileIter, protected TFAsroFiles
{
protected:
TFAsroFile * fFile;
TFAsroElementIter * fAsroIter;
FMode fMode;
public:
TFAsroFileIter(const char * fileName, FMode mode = kFRead);
~TFAsroFileIter();
virtual Bool_t IsOpen() {return fFile != NULL && fAsroIter != NULL;}
virtual Bool_t Next();
virtual void Reset();
ClassDef(TFAsroFileIter,0)
};
#endif // ROOT_TFAsroIO
Last update: Fri Mar 14 13:55:06 2008
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.