]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliRawEvent.h
strdup replaced by malloc and strcpy
[u/mrichter/AliRoot.git] / RAW / AliRawEvent.h
index 56723b89062b6c20d4cc4053a834a0bef89c2cfa..dff55a20cebc98942cb3e9007e692b085152660c 100644 (file)
@@ -4,6 +4,32 @@
 // Author: Fons Rademakers  26/11/99
 // Updated: Dario Favretto  15/04/2003
 
+/* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+//////////////////////////////////////////////////////////////////////////
+//                                                                      //
+// AliRawEvent                                                          //
+//                                                                      //
+// Set of classes defining the ALICE RAW event format. The AliRawEvent  //
+// class defines a RAW event. It consists of an AliEventHeader object   //
+// an AliEquipmentHeader object, an AliRawData object and an array of   //
+// sub-events, themselves also being AliRawEvents. The number of        //
+// sub-events depends on the number of DATE LDC's.                      //
+// The AliRawEvent objects are written to a ROOT file using different   //
+// technologies, i.e. to local disk via AliRawDB or via rfiod using     //
+// AliRawRFIODB or via rootd using AliRawRootdDB or to CASTOR via       //
+// rootd using AliRawCastorDB (and for performance testing there is     //
+// also AliRawNullDB).                                                  //
+// The AliRunDB class provides the interface to the run and file        //
+// catalogues (AliEn or plain MySQL).                                   //
+// The AliStats class provides statics information that is added as     //
+// a single keyed object to each raw file.                              //
+// The AliTagDB provides an interface to a TAG database.                //
+// The AliMDC class is usid by the "alimdc" stand-alone program         //
+// that reads data directly from DATE.                                  //
+//                                                                      //
+//////////////////////////////////////////////////////////////////////////
 
 #ifndef ROOT_TObject
 #include <TObject.h>
 #include <TTree.h>
 #endif
 
-#ifndef ROOT_TH1
-#include <TH1.h>
-#endif
-
 
 // Forward class declarations
+class TH1F;
 class AliRawDB;
 
 
@@ -138,18 +161,12 @@ class AliRawData : public TObject {
 
 public:
    AliRawData() { fSize = fBufSize = 0; fRawData = 0; fOwner = kTRUE; }
-   AliRawData(const AliRawData& rawData): TObject(rawData) 
-     {Fatal("AliRawData", "copy constructor not implemented");};
-   AliRawData& operator = (const AliRawData& /*rawData*/) {
-     Fatal("operator =", "assignment operator not implemented"); 
-     return *this;
-   };
    virtual ~AliRawData() { if (fOwner) delete [] fRawData; }
 
    inline void SetSize(Int_t size);
-   inline void  SetBuffer(void *buf, Int_t size);
-   Int_t    GetSize() const { return fSize; }
-   void    *GetBuffer() { return fRawData; }
+   inline void SetBuffer(void *buf, Int_t size);
+   Int_t       GetSize() const { return fSize; }
+   void       *GetBuffer() { return fRawData; }
 
 private:
    Int_t   fSize;         // number of raw data bytes
@@ -157,27 +174,30 @@ private:
    char   *fRawData;      //[fSize] raw event data
    Bool_t  fOwner;        //!if true object owns fRawData buffer
 
+   AliRawData(const AliRawData &);      // not implemented, usage causes
+   AliRawData &operator=(const AliRawData &);  // link time error
+
    ClassDef(AliRawData,1)  // Alice raw event buffer
 };
 
-void AliRawData::SetSize(Int_t size) 
+void AliRawData::SetSize(Int_t size)
 {
-  if (size > fBufSize) {
-    if (fOwner) delete [] fRawData;
-    fRawData = new char [size];
-    fBufSize = size;
-    fOwner   = kTRUE;
-  }
-  fSize = size;
+   if (size > fBufSize) {
+      if (fOwner) delete [] fRawData;
+      fRawData = new char [size];
+      fBufSize = size;
+      fOwner   = kTRUE;
+   }
+   fSize = size;
 }
 
-void AliRawData::SetBuffer(void *buf, Int_t size) 
+void AliRawData::SetBuffer(void *buf, Int_t size)
 {
-  if (fOwner) delete [] fRawData;
-  fRawData = (char *) buf;
-  fBufSize = size;
-  fSize    = size;
-  fOwner   = kFALSE;
+   if (fOwner) delete [] fRawData;
+   fRawData = (char *) buf;
+   fBufSize = size;
+   fSize    = size;
+   fOwner   = kFALSE;
 }
 
 
@@ -185,12 +205,6 @@ class AliRawEvent : public TObject {
 
 public:
    AliRawEvent();
-   AliRawEvent(const AliRawEvent& rawEvent): TObject(rawEvent) 
-     {Fatal("AliRawEvent", "copy constructor not implemented");};
-   AliRawEvent& operator = (const AliRawEvent& /*rawEvent*/) {
-     Fatal("operator =", "assignment operator not implemented"); 
-     return *this;
-   };
    virtual ~AliRawEvent();
 
    AliRawEventHeader     *GetHeader();
@@ -208,6 +222,9 @@ private:
    AliRawData            *fRawData;     // raw data container
    TObjArray             *fSubEvents;   // sub AliRawEvent's
 
+   AliRawEvent(const AliRawEvent &);    // not implemented, usage causes
+   AliRawEvent &operator=(const AliRawEvent &); // link time error
+
    ClassDef(AliRawEvent,1)  // ALICE raw event object
 };
 
@@ -216,8 +233,6 @@ class AliStats : public TObject {
 
 public:
    AliStats(const char *filename = "", Int_t compmode = 0, Bool_t filter = kFALSE);
-   AliStats(const AliStats& stats): TObject(stats) 
-     {Fatal("AliStats", "copy constructor not implemented");};
    virtual ~AliStats();
    AliStats &operator=(const AliStats &rhs);
 
@@ -261,6 +276,8 @@ private:
    TH1F    *fRTHist;     // histogram of real-time to process chunck of data
    Float_t  fChunk;      //!chunk to be histogrammed
 
+   AliStats(const AliStats &);  // not implemented
+
    ClassDef(AliStats,1)  // Statistics object
 };
 
@@ -270,15 +287,10 @@ class AliRawDB : public TObject {
 public:
    AliRawDB(AliRawEvent *event, Double_t maxsize, Int_t compress,
             Bool_t create = kTRUE);
-   AliRawDB(const AliRawDB& rawDB): TObject(rawDB) 
-     {Fatal("AliRawDB", "copy constructor not implemented");};
-   AliRawDB& operator = (const AliRawDB& /*rawDB*/) {
-     Fatal("operator =", "assignment operator not implemented"); 
-     return *this;
-   };
    virtual ~AliRawDB() { Close(); }
 
    virtual const char *GetOpenOption() const { return "RECREATE"; }
+   virtual Int_t       GetNetopt() const { return 0; }
    virtual Bool_t      Create();
    virtual void        Close();
    void                Fill() { fTree->Fill(); }
@@ -306,6 +318,10 @@ protected:
    virtual Bool_t      FSHasSpace(const char *fs) const;
    virtual void        MakeTree();
 
+private:
+   AliRawDB(const AliRawDB &);       // not implemented, usage causes
+   AliRawDB &operator=(const AliRawDB &); // link time error
+
    ClassDef(AliRawDB,0)  // Raw DB
 };
 
@@ -332,6 +348,7 @@ public:
    ~AliRawCastorDB() { Close(); }
 
    const char *GetOpenOption() const { return "-RECREATE"; }
+   Int_t       GetNetopt() const { return 0; }
    void        Close();
 
 private:
@@ -375,12 +392,6 @@ class AliTagDB : public TObject {
 
 public:
    AliTagDB(AliRawEventHeader *header, Double_t maxsize, Bool_t create = kTRUE);
-   AliTagDB(const AliTagDB& tagDB): TObject(tagDB) 
-     {Fatal("AliTagDB", "copy constructor not implemented");};
-   AliTagDB& operator = (const AliTagDB& /*tagDB*/) {
-     Fatal("operator =", "assignment operator not implemented"); 
-     return *this;
-   };
    virtual ~AliTagDB() { Close(); }
 
    Bool_t          Create();
@@ -406,6 +417,10 @@ protected:
 
    virtual const char *GetFileName() const;
 
+private:
+   AliTagDB(const AliTagDB &);       // not implemented, usage causes
+   AliTagDB &operator=(const AliTagDB &); // link time error
+
    ClassDef(AliTagDB,0)  // Tag DB
 };
 
@@ -429,12 +444,6 @@ class AliRunDB : public TObject {
 
 public:
    AliRunDB(Bool_t noLocalDB = kFALSE);
-   AliRunDB(const AliRunDB& runDB): TObject(runDB) 
-     {Fatal("AliRunDB", "copy constructor not implemented");};
-   AliRunDB& operator = (const AliRunDB& /*runDB*/) {
-     Fatal("operator =", "assignment operator not implemented"); 
-     return *this;
-   };
    ~AliRunDB() { Close(); }
 
    void Update(AliStats *stats);
@@ -445,6 +454,9 @@ public:
 private:
    TFile  *fRunDB;     // run database
 
+   AliRunDB(const AliRunDB &);       // not implemented, usage causes
+   AliRunDB &operator=(const AliRunDB &); // link time error
+
    ClassDef(AliRunDB,0)  // Run (bookkeeping) DB
 };