New method to resolve the TRefs and clone the raw-data itself. Will be used in order...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Sep 2009 21:55:03 +0000 (21:55 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Sep 2009 21:55:03 +0000 (21:55 +0000)
RAW/AliRawEquipment.cxx
RAW/AliRawEquipment.h
RAW/AliRawEquipmentV2.cxx
RAW/AliRawEquipmentV2.h
RAW/AliRawVEquipment.h

index 2674758..e9291c0 100644 (file)
@@ -95,6 +95,20 @@ AliRawEquipment::~AliRawEquipment()
 }
 
 //______________________________________________________________________________
+void AliRawEquipment::CloneRawData()
+{
+  // Load raw-data part of the object via the TRef
+  // flush the Tref and clone the raw data
+
+  if (!fRawData) {
+    if (fRawDataRef.IsValid())
+      fRawData = (AliRawData*)fRawDataRef.GetObject();
+  }
+  fRawDataRef = NULL;
+  if (fRawData) fRawData = (AliRawData*)fRawData->Clone();
+}
+
+//______________________________________________________________________________
 void AliRawEquipment::Streamer(TBuffer &R__b)
 {
    // Stream an object of class AliRawEquipment.
index f429242..a4c51a6 100644 (file)
@@ -52,7 +52,9 @@ public:
    virtual AliRawEquipmentHeader *GetEquipmentHeader();
    virtual AliRawData            *GetRawData();
 
-private:
+   virtual void                   CloneRawData();
+
+ private:
    AliRawEquipmentHeader *fEqpHdr;      // equipment header
    AliRawData            *fRawData;     // raw data container
    TRef                   fRawDataRef;  // reference to raw data container
index 10991d5..f03bfe1 100644 (file)
@@ -115,3 +115,14 @@ AliRawData *AliRawEquipmentV2::NextRawData(AliRawDataArrayV2 *array)
 
   return raw;
 }
+
+//______________________________________________________________________________
+void AliRawEquipmentV2::CloneRawData()
+{
+  // Load raw-data part of the object via the TRef
+  // flush the Tref and clone the raw data
+
+  GetRawData();
+  fRawDataRef = NULL;
+  if (fRawData) fRawData = (AliRawData*)fRawData->Clone();
+}
index b250aaf..cbd311f 100644 (file)
@@ -51,6 +51,8 @@ public:
    void                           Reset();
    AliRawData                    *NextRawData(AliRawDataArrayV2 *array);
 
+   virtual void                   CloneRawData();
+
 private:
    AliRawEquipmentHeader  fEqpHdr;      // equipment header
    AliRawData            *fRawData;     //! raw data container
index 9846584..6cfad5f 100644 (file)
@@ -46,6 +46,8 @@ public:
    virtual AliRawEquipmentHeader *GetEquipmentHeader() = 0;
    virtual AliRawData            *GetRawData() = 0;
 
+   virtual void                   CloneRawData() = 0;
+
 private:
 
    AliRawVEquipment(const AliRawVEquipment& eq);