Hi rooters
I’m creating this method:
void RootImprove::SetTitles(TH1 * h , const char * title , const char * titlex ,const char * titley)
{
h->SetTitle(title);
h->GetYaxis()->SetTitle(titley);
h->GetYaxis()->CenterTitle();
h->GetXaxis()->SetTitle(titlex);
h->GetXaxis()->CenterTitle();
But I’d like that this method works as well for TH2, TGraph, TGraphErrors and TF1 but I don’t want to define five same structured methods, so that what kind of argument should be “h”, I’ve tried with a TObject, but is not working.
Any idea?
Thanks in advance