I apologize for my trivial question, and maybe it’s more related to C++, but I was hoping someone could help me,
I have a root file where I have stored several TH2D histograms. I have successfully extracted 15 of them as TH1D. I need to make a loop where I can call them individually by using the iterator and then project all 15 of them onto the X-axis and draw them. Can you please give me some advice/example on how to do this? I have tried this:
for(Int_t i = 0; i <= 15; i++)
TString name = Form(“Temperature_%d" , i);
TH1D *hpx = Temperature _%d->ProjectionX(“hpx");
But it doesn’t work, and I assume it is totally wrong. Any help would be deeply appreciated. Thanks!