]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliMDC.h
Bug fix. Sorting out the issue with the ownership of the DATE event in the memory...
[u/mrichter/AliRoot.git] / RAW / AliMDC.h
index ee7815bced7a764a38a02cc1c9de91222dc28447..d5f5fb9703273673004b3a56a70ee48450f062a0 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef ALIMDC_H
 #define ALIMDC_H
-// @(#)alimdc:$Name$:$Id$
+// @(#)alimdc:$Name:  $:$Id$
 // Author: Fons Rademakers  26/11/99
 
 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
 #endif
 
 // Forward class declarations
-class AliRawEvent;
-class AliRawEventHeader;
+class AliRawEventHeaderBase;
 class AliRawEquipmentHeader;
 class AliRawData;
 class AliRawDB;
-class AliRunDB;
 class AliTagDB;
-class AliStats;
-class AliESD;
+class AliRawEventTag;
+class AliESDEvent;
+
+#include "AliRawEventV2.h"
+#include "AliESDEvent.h"
+#include "AliRawDB.h"
+#include "AliTagDB.h"
+#include "AliRawData.h"
+#include "AliRawEventTag.h"
 
 class AliMDC : public TObject {
 
 public:
    enum EWriteMode { kLOCAL, kRFIO, kROOTD, kCASTOR, kDEVNULL };
    enum EFilterMode { kFilterOff, kFilterTransparent, kFilterOn };
-   enum EErrorCode { kFilterReject = 0, 
-                    kErrStartEndRun = -1, 
+   enum EErrorCode { kErrStartEndRun = -1, 
                     kErrHeader = -2, 
                     kErrHeaderSize = -3, 
                     kErrSubHeader = -4, 
                     kErrDataSize = -5, 
                     kErrEquipmentHeader = -6, 
-                    kErrEquipment = -7 };
+                    kErrEquipment = -7,
+                     kErrFileSize = -8,
+                    kFilterReject = -9,
+                     kErrWriting = -10,
+                    kErrTagFile = -11};
 
    AliMDC(Int_t compress, Bool_t deleteFiles, 
          EFilterMode filterMode = kFilterTransparent, 
-         const char* localRunDB = NULL, Bool_t rdbmsRunDB = kFALSE,
-         const char* alienHostRunDB = NULL, const char* alienDirRunDB = NULL,
-         Double_t maxSizeTagDB = -1, const char* fileNameTagDB = NULL);
+         Double_t maxSizeTagDB = -1, const char* fileNameTagDB = NULL,
+         const char* guidFileFolder = NULL,
+         Int_t basketsize = 32000);
    virtual ~AliMDC();
 
-   Int_t      Open(EWriteMode mode, const char* fileName);
+   Int_t      Open(EWriteMode mode, const char* fileName,
+                  Double_t maxFileSize = 0,
+                  const char* fs1 = NULL, const char* fs2 = NULL);
    Int_t      ProcessEvent(void* event, Bool_t isIovecArray = kFALSE);
-   Int_t      Close();
+   Long64_t   GetTotalSize();
+   Long64_t   Close();
+   Long64_t   AutoSave();
 
    Int_t      Run(const char* inputFile, Bool_t loop,
                  EWriteMode mode, Double_t maxFileSize, 
@@ -77,21 +89,25 @@ private:
    private:
      AliMDC *fMDC;   // alimdc to signal
 
-     AliMDCInterruptHandler(const AliMDCInterruptHandler& handler);
-     AliMDCInterruptHandler& operator=(const AliMDCInterruptHandler& handler);
+     AliMDCInterruptHandler(const AliMDCInterruptHandler& handler); // Not implemented
+     AliMDCInterruptHandler& operator=(const AliMDCInterruptHandler& handler); // Not implemented
    };
 
-   AliRawEvent *fEvent;       // produced AliRawEvent
-   AliESD      *fESD;         // pointer to HLT ESD object
-   AliStats    *fStats;       // statistics
+   AliRawEventV2 *fEvent;       // produced AliRawEvent
+   AliESDEvent      *fESD;         // pointer to HLT ESD object
    AliRawDB    *fRawDB;       // raw data DB
-   AliRunDB    *fRunDB;       // run DB
    AliTagDB    *fTagDB;       // tag DB
+   AliRawEventTag *fEventTag; // raw-data event tag object
    Int_t        fCompress;    // compression factor used for raw output DB
+   Int_t        fBasketSize;  // root i/o basket size (default = 32000)
    Bool_t       fDeleteFiles; // flag for deletion of files
    EFilterMode  fFilterMode;  // high level filter mode
    TObjArray    fFilters;     // filter algorithms
    Bool_t       fStop;        // stop execution (triggered by SIGUSR1)
+   Bool_t       fIsTagDBCreated; // is tag db already created
+   Double_t     fMaxSizeTagDB;// max size of the tag DB
+   TString      fFileNameTagDB;// tag DB file name
+   TString      fGuidFileFolder; // guid files folder
 
    // Filter names
    enum {kNFilters = 1};
@@ -102,12 +118,11 @@ private:
 
    Int_t     Read(const char *name) { return TObject::Read(name); }
    Int_t     Read(Int_t fd, void *buffer, Int_t length);
-   Int_t     ReadHeader(AliRawEventHeader &header, char*& data);
    Int_t     ReadEquipmentHeader(AliRawEquipmentHeader &header,
                                  Bool_t isSwapped, char*& data);
    Int_t     ReadRawData(AliRawData &raw, Int_t size, char*& data);
 
-   ClassDef(AliMDC,0)  // MDC processor
+   ClassDef(AliMDC,3)  // MDC processor
 };
 
 #endif