message: Protections for missing files and TDirectories
diff: @@ -426,11 +426,28 @@ void ProjectCombinHFAndFit(){
  }
  }
  + if(gSystem->Exec(Form("ls -l %s > /dev/null 2>&1",fileName.Data())) !=0){
  + printf("File %s with raw data results does not exist -> exiting\n",fileName.Data());
  + return;
  + }
  TFile* fil=new TFile(fileName.Data());
  + if(!fil){
  + printf("File %s with raw data not opened -> exiting\n",fileName.Data());
  + return;
  + }
  TDirectoryFile* df=(TDirectoryFile*)fil->Get(dirName.Data());
  + if(!df){
  + printf("TDirectoryFile %s not found in TFile\n",dirName.Data());
  + fil->ls();
  + return;
  + }
  AliNormalizationCounter *nC=(AliNormalizationCounter*)df->Get("NormalizationCounter");
  + if(!nC){
  + printf("AliNormalizationCounter object missing -> exiting\n");
  + return;
  + }
  TH1F* hnEv=new TH1F("hEvForNorm","events for normalization",1,0,1);
  printf("Number of Ev. for norm=%d\n",(Int_t)nC->GetNEventsForNorm());
  hnEv->SetBinContent(1,nC->GetNEventsForNorm());
  @@ -455,9 +472,20 @@ void ProjectCombinHFAndFit(){
  TH3F* h3drefl=0x0;
  TH3F* h3dmcsig=0x0;
  TH1F* hSigmaMC=0x0;
  +
  + if(gSystem->Exec(Form("ls -l %s > /dev/null 2>&1",fileNameMC.Data())) !=0){
  + printf("File %s with MC results does not exist -> exiting\n",fileNameMC.Data());
  + return;
  + }
  TFile* filMC=new TFile(fileNameMC.Data());
  if(filMC && filMC->IsOpen()){
  TDirectoryFile* dfMC=(TDirectoryFile*)filMC->Get(dirNameMC.Data());
  + if(!dfMC){
  + printf("TDirectoryFile %s not found in TFile for MC\n",dirNameMC.Data());
  + filMC->ls();
  + return;
  + }
  +
  TList* lMC=(TList*)dfMC->Get(lstNameMC.Data());
  hSigmaMC=FitMCInvMassSpectra(lMC);
  if(nBinsWithFixSig>0 && !hSigmaMC){
  