Histograms as function parameter and returning their ratio plots

I need to write a function such that it will take 2 histogram as its parameter and return their plots alongside with their ratio plot.

Is this possible?

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


So silly of me!
It’s so simple.

void hist_function(TH1F* h1, TH1F* h2)
  h1 -> Fill(5);
  h1 -> Draw();

  h2 -> Fill(7);
  h2 -> Draw("Same");


void sf()

  TH1F *hist1 = new TH1F("hist", "hist", 100, 0, 10);
  TH1F *hist2 = new TH1F("hist", "hist", 100, 0, 10);

  hist_function(hist1, hist2);