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,
47 Int_t basketsize = 32000);
50 virtual const char *GetOpenOption() const { return "RECREATE"; }
51 virtual Int_t GetNetopt() const { return 0; }
52 virtual Bool_t Create(const char* fileName = NULL);
53 virtual Long64_t Close();
55 Long64_t GetTotalSize();
58 void WriteStats(AliStats* stats);
60 void SetMaxSize(Double_t maxSize) { fMaxSize = maxSize; }
61 void SetFS(const char* fs1, const char* fs2 = NULL);
62 void SetDeleteFiles(Bool_t deleteFiles = kTRUE) { fDeleteFiles = deleteFiles; }
64 Bool_t NextFile(const char* fileName = NULL);
66 Double_t GetBytesWritten() const { return fRawDB->GetBytesWritten(); }
67 TFile *GetDB() const { return fRawDB; }
68 const char *GetDBName() const { return fRawDB->GetName(); }
69 Int_t GetEvents() const { return (Int_t) fTree->GetEntries(); }
70 AliRawEvent *GetEvent() const { return fEvent; }
71 Float_t GetCompressionFactor() const;
72 Int_t GetCompressionMode() const { return fRawDB->GetCompressionLevel(); }
73 Int_t GetBasketSize() const { return fBasketSize; }
74 void Stop() { fStop = kTRUE; }
75 static const char *GetAliRootTag();
76 Bool_t WriteGuidFile(TString &guidFileFolder);
79 TFile *fRawDB; // DB to store raw data
80 TTree *fTree; // tree used to store raw data
81 AliRawEvent *fEvent; // AliRawEvent via which data is stored
82 AliRawDataArray **fDetRawData[AliDAQ::kNDetectors+1]; // Detectors raw-data payload
83 TTree *fESDTree; // tree for storing HLT ESD information
84 AliESDEvent *fESD; // pointer to HLT ESD object
85 Int_t fCompress; // compression mode (1 default)
86 Int_t fBasketSize; // root i/o basket size (default = 32000)
87 Double_t fMaxSize; // maximum size in bytes of the raw DB
88 TString fFS1; // first raw DB file system location
89 TString fFS2; // second raw DB file system location
90 Bool_t fDeleteFiles; // flag for deletion of files
91 Bool_t fStop; // stop execution (triggered by SIGUSR1)
92 static const char *fgkAliRootTag; // string with the aliroot tag id
94 static Int_t fgkDetBranches[AliDAQ::kNDetectors+1]; // Number of branches in each detector
96 virtual const char *GetFileName() const;
97 virtual Bool_t FSHasSpace(const char *fs) const;
98 virtual void MakeTree();
101 AliRawDB(const AliRawDB& rawDB);
102 AliRawDB& operator = (const AliRawDB& rawDB);
104 ClassDef(AliRawDB,4) // Raw DB