-// @(#)alimdc:$Name$:$Id$
+// @(#) $Id$
// Author: Fons Rademakers 26/11/99
/**************************************************************************
// 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. //
// //
//////////////////////////////////////////////////////////////////////////
+#include <AliRawDataArray.h>
+
#include "AliRawEquipmentHeader.h"
#include "AliRawData.h"
//______________________________________________________________________________
-AliRawEquipment::AliRawEquipment()
+AliRawEquipment::AliRawEquipment():
+fEqpHdr(NULL),
+fRawData(NULL),
+fRawDataRef(NULL)
{
// Create ALICE equipment object.
- fEqpHdr = 0;
- fRawData = 0;
-}
-
-//______________________________________________________________________________
-AliRawEquipment::AliRawEquipment(const AliRawEquipment& rawEquipment): TObject(rawEquipment)
-{
-// copy constructor
-
- Fatal("AliRawEquipment", "copy constructor not implemented");
-}
-
-//______________________________________________________________________________
-AliRawEquipment& AliRawEquipment::operator = (const AliRawEquipment& /*rawEquipment*/)
-{
-// assignment operator
-
- Fatal("operator =", "assignment operator not implemented");
- return *this;
}
//______________________________________________________________________________
{
// Get raw data part of AliRawEquipment.
- if (!fRawData)
+ if (!fRawData) {
+ if (!fRawDataRef.IsValid())
fRawData = new AliRawData;
-
- return fRawData;
+ else {
+ fRawData = (AliRawData*)fRawDataRef.GetObject();
+ }
+ }
+ return fRawData;
}
//______________________________________________________________________________
if (fEqpHdr) fEqpHdr->Reset();
GetRawData()->SetSize(0);
+ fRawDataRef = NULL;
}
//______________________________________________________________________________
delete fEqpHdr;
delete fRawData;
}
+
+//______________________________________________________________________________
+void AliRawEquipment::SetRawDataRef(AliRawDataArray *array)
+{
+ // Set the TRef to the raw-data container
+ // before writing it to the branch
+ if (fRawData) {
+ fRawDataRef = fRawData;
+ array->Add(fRawData);
+ fRawData = NULL;
+ return;
+ }
+ else {
+ Error("SetRawDataRef", "Raw-data payload does not exist! Can not set a reference to it!");
+ fRawDataRef = NULL;
+ return;
+ }
+}