]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliReconstruction.cxx
New base for all classes in HLT/PHOS
[u/mrichter/AliRoot.git] / STEER / AliReconstruction.cxx
index 95cc72da82c7754e208e3357cc7bdb11493f136e..d1ffddb9669fce13fc4434d7c6ed597bb95dcd71 100644 (file)
@@ -596,6 +596,9 @@ Bool_t AliReconstruction::Run(const char* input)
   esd = NULL; hltesd = NULL;
   */
   // create the branch with ESD additions
+
+
+
   AliESDfriend *esdf = 0; 
   if (fWriteESDfriend) {
     esdf = new AliESDfriend();
@@ -603,6 +606,7 @@ Bool_t AliReconstruction::Run(const char* input)
     br->SetFile("AliESDfriends.root");
     esd->AddObject(esdf);
   }
+
   
   // Get the diamond profile from OCDB
   AliCDBEntry* entry = AliCDBManager::Instance()
@@ -778,11 +782,16 @@ Bool_t AliReconstruction::Run(const char* input)
     if (fCheckPointLevel > 0)  WriteESD(esd, "final"); 
     esd->Reset();
     hltesd->Reset();
+    if (fWriteESDfriend) {
+      new (esdf) AliESDfriend(); // Reset...
+    }
     // esdf->Reset();
     // delete esdf; esdf = 0;
   } 
 
 
+
+
   tree->GetUserInfo()->Add(esd);
   hlttree->GetUserInfo()->Add(hltesd);
 
@@ -808,11 +817,12 @@ Bool_t AliReconstruction::Run(const char* input)
   }
 
   gROOT->cd();
+  CleanUp(file, fileOld);
+  
   // Create tags for the events in the ESD tree (the ESD tree is always present)
   // In case of empty events the tags will contain dummy values
-  CreateTag(file);
+  CreateTag("AliESDs.root");
 
- CleanUp(file, fileOld);
 
   return kTRUE;
 }
@@ -1711,7 +1721,7 @@ void AliReconstruction::WriteESD(AliESDEvent* esd, const char* recStep) const
 
 
 //_____________________________________________________________________________
-void AliReconstruction::CreateTag(TFile* file)
+void AliReconstruction::CreateTag(const char* fESDfilename)
 {
   //GRP
   Float_t lhcLuminosity = 0.0;
@@ -1759,7 +1769,8 @@ void AliReconstruction::CreateTag(TFile* file)
   btag->SetCompressionLevel(9);
   
   AliInfo(Form("Creating the tags......."));   
-  
+
+  TFile *file = TFile::Open(fESDfilename);
   if (!file || !file->IsOpen()) {
     AliError(Form("opening failed"));
     delete file;