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 //////////////////////////////////////////////////////////////////////////
33 // Forward class declarations
35 class AliRawDataArray;
40 class AliRawDB : public TObject {
43 AliRawDB(AliRawEvent *event,
46 const char* fileName = NULL);
49 virtual const char *GetOpenOption() const { return "RECREATE"; }
50 virtual Int_t GetNetopt() const { return 0; }
51 virtual Bool_t Create(const char* fileName = NULL);
52 virtual Long64_t Close();
54 Long64_t GetTotalSize();
57 void WriteStats(AliStats* stats);
59 void SetMaxSize(Double_t maxSize) { fMaxSize = maxSize; }
60 void SetFS(const char* fs1, const char* fs2 = NULL);
61 void SetDeleteFiles(Bool_t deleteFiles = kTRUE) { fDeleteFiles = deleteFiles; }
63 Bool_t NextFile(const char* fileName = NULL);
65 Double_t GetBytesWritten() const { return fRawDB->GetBytesWritten(); }
66 TFile *GetDB() const { return fRawDB; }
67 const char *GetDBName() const { return fRawDB->GetName(); }
68 Int_t GetEvents() const { return (Int_t) fTree->GetEntries(); }
69 AliRawEvent *GetEvent() const { return fEvent; }
70 Float_t GetCompressionFactor() const;
71 Int_t GetCompressionMode() const { return fRawDB->GetCompressionLevel(); }
72 void Stop() { fStop = kTRUE; }
73 static const char *GetAliRootTag();
74 Bool_t WriteGuidFile(TString &guidFileFolder);
77 TFile *fRawDB; // DB to store raw data
78 TTree *fTree; // tree used to store raw data
79 AliRawEvent *fEvent; // AliRawEvent via which data is stored
80 AliRawDataArray **fDetRawData[AliDAQ::kNDetectors+1]; // Detectors raw-data payload
81 TTree *fESDTree; // tree for storing HLT ESD information
82 AliESDEvent *fESD; // pointer to HLT ESD object
83 Int_t fCompress; // compression mode (1 default)
84 Double_t fMaxSize; // maximum size in bytes of the raw DB
85 TString fFS1; // first raw DB file system location
86 TString fFS2; // second raw DB file system location
87 Bool_t fDeleteFiles; // flag for deletion of files
88 Bool_t fStop; // stop execution (triggered by SIGUSR1)
89 static const char *fgkAliRootTag; // string with the aliroot tag id
91 static Int_t fgkDetBranches[AliDAQ::kNDetectors+1]; // Number of branches in each detector
93 virtual const char *GetFileName() const;
94 virtual Bool_t FSHasSpace(const char *fs) const;
95 virtual void MakeTree();
98 AliRawDB(const AliRawDB& rawDB);
99 AliRawDB& operator = (const AliRawDB& rawDB);
101 ClassDef(AliRawDB,3) // Raw DB