3 // @(#)alimdc:$Name$:$Id$
4 // Author: Fons Rademakers 26/11/99
6 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
9 //////////////////////////////////////////////////////////////////////////
13 //////////////////////////////////////////////////////////////////////////
28 // Forward class declarations
33 class AliRawDB : public TObject {
36 AliRawDB(AliRawEvent *event, Double_t maxsize, Int_t compress,
37 Bool_t create = kTRUE);
38 virtual ~AliRawDB() { Close(); }
40 virtual const char *GetOpenOption() const { return "RECREATE"; }
41 virtual Int_t GetNetopt() const { return 0; }
42 virtual Bool_t Create();
44 void Fill() { fTree->Fill(); }
45 Bool_t FileFull() { return (fRawDB->GetBytesWritten() > fMaxSize) ?
50 Double_t GetBytesWritten() const { return fRawDB->GetBytesWritten(); }
51 TFile *GetDB() const { return fRawDB; }
52 const char *GetDBName() const { return fRawDB->GetName(); }
53 Int_t GetEvents() const { return (Int_t) fTree->GetEntries(); }
54 AliRawEvent *GetEvent() const { return fEvent; }
55 Float_t GetCompressionFactor() const;
56 Int_t GetCompressionMode() const { return fRawDB->GetCompressionLevel(); }
59 TFile *fRawDB; // DB to store raw data
60 TTree *fTree; // tree used to store raw data
61 AliRawEvent *fEvent; // AliRawEvent via which data is stored
62 Int_t fCompress; // compression mode (1 default)
63 Double_t fMaxSize; // maximum size in bytes of the raw DB
65 virtual const char *GetFileName() const;
66 virtual Bool_t FSHasSpace(const char *fs) const;
67 virtual void MakeTree();
70 AliRawDB(const AliRawDB& rawDB);
71 AliRawDB& operator = (const AliRawDB& rawDB);
73 ClassDef(AliRawDB,0) // Raw DB