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
36 class AliRawDB : public TObject {
39 AliRawDB(AliRawEvent *event,
43 Double_t maxsize, Int_t compress,
44 Bool_t create = kTRUE);
45 virtual ~AliRawDB() { Close(); }
47 virtual const char *GetOpenOption() const { return "RECREATE"; }
48 virtual Int_t GetNetopt() const { return 0; }
49 virtual Bool_t Create();
51 void Fill() { fTree->Fill(); fESDTree->Fill(); }
52 Bool_t FileFull() { return (fRawDB->GetBytesWritten() > fMaxSize) ?
57 Double_t GetBytesWritten() const { return fRawDB->GetBytesWritten(); }
58 TFile *GetDB() const { return fRawDB; }
59 const char *GetDBName() const { return fRawDB->GetName(); }
60 Int_t GetEvents() const { return (Int_t) fTree->GetEntries(); }
61 AliRawEvent *GetEvent() const { return fEvent; }
62 Float_t GetCompressionFactor() const;
63 Int_t GetCompressionMode() const { return fRawDB->GetCompressionLevel(); }
66 TFile *fRawDB; // DB to store raw data
67 TTree *fTree; // tree used to store raw data
68 AliRawEvent *fEvent; // AliRawEvent via which data is stored
70 TTree *fESDTree; // tree for storing HLT ESD information
71 AliESD *fESD; // pointer to HLT ESD object
73 Int_t fCompress; // compression mode (1 default)
74 Double_t fMaxSize; // maximum size in bytes of the raw DB
76 virtual const char *GetFileName() const;
77 virtual Bool_t FSHasSpace(const char *fs) const;
78 virtual void MakeTree();
81 AliRawDB(const AliRawDB& rawDB);
82 AliRawDB& operator = (const AliRawDB& rawDB);
84 ClassDef(AliRawDB,0) // Raw DB