File indexing completed on 2024-04-06 12:01:55
0001 #include <iostream>
0002 #include <sstream>
0003 #include "CondCore/Utilities/interface/PayloadInspector.h"
0004
0005 int main() {
0006 std::cout << "## Histo1D" << std::endl;
0007 cond::payloadInspector::Histogram1D<float> histo1("histo1", "x", 7, 5., 15.);
0008 for (size_t i = 0; i < 20; i++)
0009 histo1.fillWithValue((float)i);
0010 std::cout << histo1.serializeData() << std::endl;
0011 std::cout << "## Histo2D" << std::endl;
0012 cond::payloadInspector::Histogram2D<float> histo2("histo2", "x", 7, 5., 15., "y", 10, 1, 20);
0013 for (size_t i = 0; i < 20; i++) {
0014 for (size_t j = 0; j < 25; j++)
0015 histo2.fillWithValue((float)i, j);
0016 }
0017 std::cout << histo2.serializeData() << std::endl;
0018 }