Delayed initialization of counter based histograms
There are uses cases where the title, the number of bins or the bin ranges depend on properties of an algorithm. An example can be found in this MR: lhcb/Rec!2582 (merged) .
What is the recommended way to accomplish this? I found an example of a list of histograms created in initialize
in
https://gitlab.cern.ch/gaudi/Gaudi/-/blob/master/GaudiExamples/src/Histograms/CounterHistos.cpp#L57 but did not find the example of an individual histogram.
Is there a recommended way and would it be worth adding this to the examples? In the MR linked above it is solved with the use of std::optional
.
In addition, it would be great if algorithms could automatically get a property which allows to change the number of bins and the range of a histogram, see #206 (comment 4874158) for more details.