I am currently working onto a project where I need to work with a std::vector of boost histograms.
The problem I encountered is that I am not able to find the right type of a boost histogram. I let my last attempt in the code below.
Here is an example code of the situation:
#include <boost/format.hpp>
#include <boost/histogram.hpp>
#include <boost/histogram/serialization.hpp> // includes serialization code
int main() {
using namespace boost::histogram;
// Creation of the histogram.
auto h = make_histogram(axis::regular<double> {3, 0.0, 1.0, "x"},
axis::regular<double> {3, 0.0, 1.0, "y"},
axis::regular<double> {3, 0.0, 1.0, "z"},
axis::regular<double, axis::transform::log> {3, 1.0, 230.0, "Energy_log"});
h(0.1,0.1,0.1,70);
h(0.1,0.1,0.1,100);
h(0.1,0.1,0.1,200);
//std::vector<*Boost_histogram_TYPE*> histograms4D;
std::vector<boost::histogram::histogram<boost::histogram::axis::variant, boost::histogram::unlimited_storage>> histograms4D;
histograms4D.push_back(h);
}
Does anyone has already encountered such a situation ?
I already thank you for your help,
Eliott