void avy(TH2 *h){
  TProfile *h_pfx = h->ProfileX();
  h_pfx->SetMinimum(h->GetYaxis()->GetXmin());
  h_pfx->SetMaximum(h->GetYaxis()->GetXmax());
  h_pfx->Draw();
}

void avy(TH2 *h,TString s){
  cout<<"avy g"<<endl;

  TString name = h->GetName();
  name += "_1";

  if (s=="g") {
    h->FitSlicesY();
  }

  string comline = name;
  comline += "->Draw()";
  cout<<comline<<endl;
  gROOT->ProcessLine(comline.c_str());
}
