No need to liknk with lhapdf, pythia6 and microcern libraries
[u/mrichter/AliRoot.git] / RAW / AliRawEvent.cxx
index e5fa3cf..06d97fc 100644 (file)
@@ -1,4 +1,4 @@
-// @(#)alimdc:$Name$:$Id$
+// @(#) $Id$
 // Author: Fons Rademakers  26/11/99
 
 /**************************************************************************
@@ -30,8 +30,6 @@
 // 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.                //
@@ -42,7 +40,9 @@
 
 #include <TObjArray.h>
 
-#include "AliRawEventHeader.h"
+#include "AliLog.h"
+
+#include "AliRawEventHeaderBase.h"
 #include "AliRawEquipment.h"
 
 #include "AliRawEvent.h"
@@ -52,44 +52,41 @@ ClassImp(AliRawEvent)
 
 
 //______________________________________________________________________________
-AliRawEvent::AliRawEvent()
+AliRawEvent::AliRawEvent():
+fNEquipments(0),
+fNSubEvents(0),
+fEvtHdr(NULL),
+fEquipments(NULL),
+fSubEvents(NULL)
 {
    // Create ALICE event object. If ownData is kFALSE we will use a static
    // raw data object, otherwise a private copy will be made.
 
-   fNEquipments = 0;
-   fNSubEvents  = 0;
-   fEvtHdr      = 0;
-   fEquipments  = 0;
-   fSubEvents   = 0;
 }
 
 //______________________________________________________________________________
-AliRawEvent::AliRawEvent(const AliRawEvent& rawEvent): TObject(rawEvent)
+AliRawEventHeaderBase *AliRawEvent::GetHeader(char*& data)
 {
-// copy constructor
-
-  Fatal("AliRawEvent", "copy constructor not implemented");
+  // Get event header part of AliRawEvent.
+  // First the DATE version is identified and then the
+  // corresponding event header version object is created
+  
+  if (!fEvtHdr) {
+    fEvtHdr = AliRawEventHeaderBase::Create(data);
+  }
+
+  return fEvtHdr;
 }
 
 //______________________________________________________________________________
-AliRawEvent& AliRawEvent::operator = (const AliRawEvent& /*rawEvent*/)
+AliRawEventHeaderBase *AliRawEvent::GetHeader()
 {
-// assignment operator
-
-  Fatal("operator =", "assignment operator not implemented");
-  return *this;
-}
-
-//______________________________________________________________________________
-AliRawEventHeader *AliRawEvent::GetHeader()
-{
-   // Get event header part of AliRawEvent.
-
-   if (!fEvtHdr)
-      fEvtHdr = new AliRawEventHeader;
+  if (!fEvtHdr) {
+      AliFatal("Header version not yet initialized!");
+      return 0x0;
+    }
 
-   return fEvtHdr;
+  return fEvtHdr;
 }
 
 //______________________________________________________________________________