auto rdfb = ROOT::RDF::FromSqlite("http://root.cern/files/root_download_stats.sqlite", "SELECT * FROM accesslog;"); auto minTimeStr = *rdfb.Reduce([](std::string a, std::string b) {return std::min(a, b);}, "Time", std::string("Z")); std::cout << "Minimum time is '" << minTimeStr << "'" << std::endl; double minTime = TDatime(minTimeStr.c_str()).Convert(); double now = TDatime().Convert(); auto rdf = rdfb.Define("datime", [](const std::string &time){return TDatime(time.c_str()).Convert();}, {"Time"}); auto h614 = rdf.Filter([](const std::string &v){ return 0 == v.find("6.14");}, {"Version"}) .Histo1D({"h614", "Download time for version 6.14", 16, minTime, now}, {"datime"}); auto h616 = rdf.Filter([](const std::string &v){ return 0 == v.find("6.16");}, {"Version"}) .Histo1D({"h616", "Download time for version 6.16", 16, minTime, now}, {"datime"}); auto h618 = rdf.Filter([](const std::string &v){ return 0 == v.find("6.18");}, {"Version"}) .Histo1D({"h618", "Download time for version 6.18", 16, minTime, now}, {"datime"}); auto histoList = {h614, h616, h618}; auto canvases = new std::vector(histoList.size()); gStyle->SetTimeOffset(0); gStyle->SetOptStat(0); auto histoIdx = 0U; for (auto histo : histoList) { canvases->at(histoIdx) = new TCanvas(); histo->GetXaxis()->LabelsOption("v"); histo->GetXaxis()->SetTimeDisplay(1); histo->GetXaxis()->SetLabelSize(0.02); histo->GetXaxis()->SetNdivisions(512, kFALSE); histo->GetXaxis()->SetTimeFormat("%Y-%m-%d"); histo->DrawClone(); histoIdx++; } %jsroot on gROOT->GetListOfCanvases()->Draw()