fix coding violation
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveEventBufferOffline.cxx
index 65b7404aba2694a660bf70c56b5907c7ea226ec4..1a7e95c3b477b384aa1b19cb642d22f563e92c9b 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;
@@ -105,9 +105,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_%x%016X_ESD.root", runnumber, GetEventId()), "RECREATE"); 
+  fEventBuffer->At(fBIndex[kCurrent])->Write("blockList", TObject::kSingleKey);
   file->Close();
 }