message: Add protection for raw data case
diff: @@ -106,6 +106,9 @@ void PlotESDtrackQA(TString filename="QAresults.root", TString suffix="QA", Int_
  TH1F* hNTracksEmbed=(TH1F*)l->FindObject("hNTracksEmbed");
  TH1F* hNTracksOOBPil=(TH1F*)l->FindObject("hNTracksOOBPileup");
  + TH3F* h3dFake4setting=(TH3F*)l->FindObject("hEtaPhiPtTPCselITSrefFake");
  + if(h3dFake4setting->GetEntries()>0) isMC=kTRUE;
  +
  Int_t lastFilled=hNEvents->GetNbinsX();
  for(Int_t jBin=hNEvents->GetNbinsX(); jBin>1; jBin--){
  if(hNEvents->GetBinContent(jBin)>0) break;
  @@ -120,12 +123,13 @@ void PlotESDtrackQA(TString filename="QAresults.root", TString suffix="QA", Int_
  }
  hNTracks->GetXaxis()->SetRange(1,lastFilled);
  + if(isMC){
  Double_t maxTr=hNTracks->GetBinContent(hNTracks->GetMaximumBin());
  if(hNTracksBackg && hNTracksBackg->GetBinContent(hNTracksBackg->GetMaximumBin())>maxTr) maxTr=hNTracksBackg->GetBinContent(hNTracksBackg->GetMaximumBin());
  if(hNTracksEmbed && hNTracksEmbed->GetBinContent(hNTracksEmbed->GetMaximumBin())>maxTr) maxTr=hNTracksEmbed->GetBinContent(hNTracksEmbed->GetMaximumBin());
  if(hNTracksOOBPil && hNTracksOOBPil->GetBinContent(hNTracksOOBPil->GetMaximumBin())>maxTr) maxTr=hNTracksOOBPil->GetBinContent(hNTracksOOBPil->GetMaximumBin());
  hNTracks->SetMaximum(1.05*maxTr);
  -
  + }
  TCanvas* cevt=new TCanvas("cevt","",1500,700);
  cevt->Divide(2,1);
  @@ -161,6 +165,7 @@ void PlotESDtrackQA(TString filename="QAresults.root", TString suffix="QA", Int_
  stpa->SetY1NDC(0.76);
  stpa->SetY2NDC(0.95);
  }
  + if(isMC){
  if(hNTracksBackg){
  hNTracksBackg->SetFillStyle(3001);
  hNTracksBackg->SetFillColor(kGray+1);
  @@ -207,6 +212,7 @@ void PlotESDtrackQA(TString filename="QAresults.root", TString suffix="QA", Int_
  hNTracks->Draw("same");
  legtrabe->Draw();
  }
  + }
  gPad->Modified();
  cevt->SaveAs("EventsAndTracks.png");
  