-Fixed bug in offline buffer that deleted event object.
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveEventBufferOffline.cxx
index 65b7404aba2694a660bf70c56b5907c7ea226ec4..2c935aa890b510649034aff80aadfba5f0e69952 100644 (file)
@@ -84,12 +84,12 @@ TObject * AliEveEventBufferOffline::GetEventFromSource() {
   }
 
   //Copy event into new event (must be deleted when no longer needed in list!!
-  AliESDEvent * event = new AliESDEvent();
-  fEvent->Copy(*event);
-  cout << event->GetNumberOfCaloClusters() << endl;
+  //AliESDEvent * event = new AliESDEvent();
+  //fEvent->Copy(*event);
+  //cout << event->GetNumberOfCaloClusters() << endl;
 
-  if (event) {
-    return dynamic_cast<TObject*>(event);
+  if (fEvent) {
+    return dynamic_cast<TObject*>(fEvent);
   } else {
     cout << "error getting event" << endl;
     return NULL;