Fixed a bug
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Feb 2011 15:39:22 +0000 (15:39 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Feb 2011 15:39:22 +0000 (15:39 +0000)
PWG2/FORWARD/analysis2/AliCentralMultiplicityTask.cxx

index 5b843a7..b4fa00f 100644 (file)
@@ -111,7 +111,9 @@ void AliCentralMultiplicityTask::UserExec(Option_t* /*option*/)
   // Corrections
   TH2D* hSecMap     = fManager.GetSecMapCorrection(vtxbin);
   TH1D* hAcceptance = fManager.GetAcceptanceCorrection(vtxbin);
-  
+  if (!hSecMap)     AliFatal("No secondary map!");
+  if (!hAcceptance) AliFatal("No acceptance!");
+    
   aodHist->Divide(hSecMap);
   
   for(Int_t nx = 1; nx <= aodHist->GetNbinsX(); nx++) {
@@ -205,6 +207,7 @@ AliCentralMultiplicityTask::Manager::GetFileName(UShort_t  what ,
   // this member function
   static TString fname = "";
   
+  fname = "";
   switch(what) {
   case 0:  fname.Append(fSecMapName.Data());     break;
   case 1:  fname.Append(fAcceptanceName.Data()); break;