Fixing warnings
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveEventBufferOffline.cxx
index 65b7404..df1adda 100644 (file)
@@ -5,6 +5,8 @@
 #include "AliEveEventBufferOffline.h"
 
 #include "AliESDEvent.h"
+#include "AliEveEventBufferOffline.h"
+#include "AliEveEventBuffer.h"
 
 #include "TTimer.h"
 #include "TFile.h"
@@ -84,12 +86,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;
@@ -105,9 +107,9 @@ void AliEveEventBufferOffline::ConnectToSource() {
 
 
 ///_____________________________________________________________________
-void AliEveEventBufferOffline::WriteToFile(){
+void AliEveEventBufferOffline::WriteToFile(Int_t runnumber){
   //Inherited from AliEveEventBuffer
-  TFile * file = TFile::Open(Form("Event_%d_ITS.root", 100), "RECREATE"); 
-  fEventBuffer->At(fBIndex[kTop])->Write("blockList", TObject::kSingleKey);
+  TFile * file = TFile::Open(Form("%d_0x%016LX_ESD.root", runnumber, GetEventId()), "RECREATE"); 
+  fEventBuffer->At(fBIndex[kCurrent])->Write("blockList", TObject::kSingleKey);
   file->Close();
 }