Autorange histogram

Hi all,

For test purposes I create a histogram via ;

but min and max values should be assigned at an iteration process after the definition of the histogram itself. There rises an issue because histogram range is not defined properly or not defined at all. I would like to set it automatically if such a feature exists thus I will be able to see the content in data with different offset values.

What would be the ultimate solution for this situation ?

Thank you
Regards

For some ideas see [url=https://root-forum.cern.ch/t/can-we-shift-histogram-for-several-channels/12050/2 old post[/url].

One idea is to define the histogram after initializing the value itself but it’s not that straightforward if value is assigned in cascaded loops.