Easy way to convert an int to a string?


I would like to know if there are any easy ways to convert an Int_t into a TString or a string in ROOT ?

In my case :

for(Int_t i = 1; i <= 84; i++) {
		h[i] = (TH1F*)f->Get("h"+TString(i));

I would like to convert my i variable in the “for” loop into a string so that I can get the histogram called “h”+string(67) → “h67” for example.

Thanks for reading me !

...->Get(TString::Format("h%d", i));

Works nicely ! Thanks for your response ! :wink: