Filling many histograms

I’m trying to get many histograms with a cycle. Here’s the code:

for (unsigned int icry=0;icry<25>Get(“h_mapx_[icry]”);

But I get an error message about “hx[icry]”, saying that icry is not a static - constant variable. Does anyone know the solution?

The error message is correct. By Get("h_mapx_[icry]") you probably meant either Get(Form("h_mapx_;%d",icry)or