]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDTagCreator.cxx
Fixes for bug #61369: Patch to fix some warnings in STEER
[u/mrichter/AliRoot.git] / STEER / AliESDTagCreator.cxx
index 150e21f9b910335b6d1f619ba18cb8af0cd63a8b..4a429ee25cdac8866479821eb9cc91a990fccd4d 100644 (file)
@@ -104,8 +104,14 @@ Bool_t AliESDTagCreator::ReadGridCollection(TGridResult *fresult) {
     counter += 1;
   }//grid result loop
   
-  AliInfo(Form("ESD chain created......."));   
-  AliInfo(Form("Chain entries: %d",fChain->GetEntries()));     
+  if (fChain->GetEntries() > 0) {
+    AliInfo(Form("ESD chain created.......")); 
+    AliInfo(Form("Chain entries: %d",fChain->GetEntries()));   
+  } else {
+    AliWarning(Form("No ESD files found !"));
+    return kFALSE;
+  }
+    
   // Switch of branches on user request
   SwitchOffBranches();
   CreateTag(fChain,"grid");
@@ -209,9 +215,6 @@ void AliESDTagCreator::CreateTag(TChain* chain, const char *type) {
   Int_t fCharge;
   TLorentzVector fEPvector;
 
-  Float_t fZVertexCut    = 40.0; 
-  Float_t fRhoVertexCut  = 600.0; 
-
   Float_t fLowPtCut      =  1.0;
   Float_t fHighPtCut     =  3.0;
   Float_t fVeryHighPtCut = 10.0;
@@ -587,9 +590,6 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *guid, const char *md5,
   Int_t fCharge;
   TLorentzVector fEPvector;
 
-  Float_t fZVertexCut = 40.0; 
-  Float_t fRhoVertexCut = 600.0; 
-
   Float_t fLowPtCut = 1.0;
   Float_t fHighPtCut = 3.0;
   Float_t fVeryHighPtCut = 10.0;
@@ -946,9 +946,6 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *filepath, Int_t Counte
   Int_t fCharge;
   TLorentzVector fEPvector;
 
-  Float_t fZVertexCut = 40.0; 
-  Float_t fRhoVertexCut = 600.0; 
-
   Float_t fLowPtCut = 1.0;
   Float_t fHighPtCut = 3.0;
   Float_t fVeryHighPtCut = 10.0;
@@ -1279,9 +1276,9 @@ void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRP
 
   detectorMask = grpData->GetDetectorMask();
   time_t startTime = grpData->GetTimeStart();
-  TTimeStamp *t1 = new TTimeStamp(startTime);
+  TTimeStamp t1(startTime);
   time_t endTime = grpData->GetTimeEnd();
-  TTimeStamp *t2 = new TTimeStamp(endTime);
+  TTimeStamp t2(endTime);
   const char* beamtype = grpData->GetBeamType();
   Float_t beamenergy = grpData->GetBeamEnergy();
 
@@ -1297,9 +1294,6 @@ void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRP
   Int_t fCharge;
   TLorentzVector fEPvector;
 
-  Float_t fZVertexCut = 40.0; 
-  Float_t fRhoVertexCut = 600.0; 
-
   Float_t fLowPtCut = 1.0;
   Float_t fHighPtCut = 3.0;
   Float_t fVeryHighPtCut = 10.0;
@@ -1597,8 +1591,8 @@ void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRP
     tag->SetDetectorTag(detectorMask);
 
     tag->SetRunId(iInitRunNumber);
-    tag->SetRunStartTime(t1->GetDate());
-    tag->SetRunStopTime(t2->GetDate());
+    tag->SetRunStartTime(t1.GetDate());
+    tag->SetRunStopTime(t2.GetDate());
     tag->SetBeamEnergy(beamenergy);
     tag->SetBeamType(beamtype);
     
@@ -1616,6 +1610,7 @@ void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRP
   ftag->Close();
   file->cd();
   delete file;
+  delete ftag;
   delete esd;
   delete tag;
   delete evTag;