- const char *GetFileName();
-
-public:
- AliRawRFIODB(AliRawEvent *event, Double_t maxsize, Int_t compress);
- ~AliRawRFIODB() { Close(); }
-
- void Close();
-
- ClassDef(AliRawRFIODB,0) // Raw DB via RFIO
-};
-
-
-class AliRawCastorDB : public AliRawDB {
-
-private:
- const char *GetFileName();
-
-public:
- AliRawCastorDB(AliRawEvent *event, Double_t maxsize, Int_t compress);
- ~AliRawCastorDB() { Close(); }
-
- const char *GetOpenOption() const { return "-RECREATE"; }
- void Close();
-
- ClassDef(AliRawCastorDB,0) // Raw DB via CASTOR and rootd
-};
-
-
-class AliRawRootdDB : public AliRawDB {
-
-private:
- const char *GetFileName();
-
-public:
- AliRawRootdDB(AliRawEvent *event, Double_t maxsize, Int_t compress);
- ~AliRawRootdDB() { Close(); }
-
- void Close();
-
- ClassDef(AliRawRootdDB,0) // Raw DB via rootd
-};
-
-
-class AliRawNullDB : public AliRawDB {
-
-private:
- const char *GetFileName();
-
-public:
- AliRawNullDB(AliRawEvent *event, Double_t maxsize, Int_t compress);
- ~AliRawNullDB() { Close(); }
-
- void Close();
-
- ClassDef(AliRawNullDB,0) // Raw DB to /dev/null
-};
-
-
-class AliTagDB : public TObject {
-
-protected:
- TFile *fTagDB; // DB to store header information only (tag)
- TTree *fTree; // tree use to store header
- AliRawEventHeader *fHeader; // header via which data is stored
- Double_t fMaxSize; // maximum size in bytes of tag DB
-
- virtual const char *GetFileName();
-
-public:
- AliTagDB(AliRawEventHeader *header, Double_t maxsize, Bool_t create = kTRUE);
- ~AliTagDB() { Close(); }
-
- Bool_t Create();
- virtual void Close();
- void Fill() { fTree->Fill(); }
- Bool_t FileFull()
- { return (fTagDB->GetBytesWritten() > fMaxSize) ? kTRUE : kFALSE; }
-
- Bool_t NextFile();
-
- Double_t GetBytesWritten() const { return fTagDB->GetBytesWritten(); }
- TFile *GetDB() const { return fTagDB; }
- const char *GetDBName() const { return fTagDB->GetName(); }
- AliRawEventHeader *GetHeader() const { return fHeader; }
- Int_t GetEvents() const { return (Int_t) fTree->GetEntries(); }
- Float_t GetCompressionFactor() const;
-
- ClassDef(AliTagDB,0) // Tag DB
-};
-
-
-class AliTagNullDB : public AliTagDB {
-
-private:
- const char *GetFileName();
-
-public:
- AliTagNullDB(AliRawEventHeader *header, Double_t maxsize);
- ~AliTagNullDB() { Close(); }
-
- void Close();
-
- ClassDef(AliTagNullDB,0) // Tag DB to /dev/null
-};
-
-
-class AliRunDB : public TObject {
-
-private:
- TFile *fRunDB; // run database
-
-public:
- AliRunDB(Bool_t noLocalDB = kFALSE);
- ~AliRunDB() { Close(); }
-
- void Update(AliStats *stats);
- void UpdateRDBMS(AliStats *stats);
- void UpdateAliEn(AliStats *stats);
- void Close();
-
- ClassDef(AliRunDB,0) // Run (bookkeeping) DB
-};
-
-
-class AliMDC : public TObject {
-
-public:
- enum EWriteMode { kLOCAL, kRFIO, kROOTD, kCASTOR, kDEVNULL };
-
-private:
- Int_t fFd; // DATE input stream
- Int_t fCompress; // compression factor used for raw output DB
- Int_t fNumEvents; // number of events processed
- Int_t fDebugLevel; // controls debug print-out
- Double_t fMaxFileSize; // maximum size of raw output DB
- EWriteMode fWriteMode; // write mode (local, rfio, rootd, castor, /dev/null)
- Bool_t fUseFifo; // read from fifo, file otherwise
- Bool_t fUseEb; // use event builder API instead of fifo
- Bool_t fUseFilter; // use 3rd level trigger filter
- Bool_t fUseLoop; // loop on input source (must be file)
- Bool_t fStopLoop; // break from endless loop (triggered by SIGUSR1)
-
- static Bool_t fgDeleteFiles;
-
- Int_t Read(const char *name) { return TObject::Read(name); }
- Int_t Read(void *buffer, Int_t length);
- Int_t ReadHeader(AliRawEventHeader &header, void *eb = 0);
- Int_t ReadEquipmentHeader(AliRawEquipmentHeader &header,
- Bool_t isSwapped, void *eb = 0);
- Int_t ReadRawData(AliRawData &raw, Int_t size, void *eb = 0);
- Int_t DumpEvent(Int_t toRead);
- Int_t Filter(AliRawData &raw);
-
-public:
- AliMDC(Int_t fd, Int_t compress, Double_t maxFileSize, Bool_t useFilter,
- EWriteMode mode, Bool_t useLoop, Bool_t delFiles);
- ~AliMDC() { }
-
- Int_t Run();
- void SetStopLoop() { fStopLoop = kTRUE; }
- Bool_t StopLoop() const { return fStopLoop; }
-
- void SetDebugLevel(Int_t level) { fDebugLevel = level; }
- Int_t GetDebugLevel() const { return fDebugLevel; }