Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9455

[RDF] Cannot snapshot a vector of bools

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • High
    • Resolution: Not a Bug
    • 6.13/04
    • None
    • I/O
    • None
    • all

    Description

      It is not possible to snapshot a column which holds a `vector<bool>`:

      void a() {
        using namespace ROOT::VecOps;
        using namespace ROOT;
        const auto fname = "rdfandvecops.root";
        const auto treename = "t";
        const auto nEntries = 5u;
        // write out a small file with std::vector columns
        auto makeStdVecInt = []() { return std::vector<int>({1, 2, 3}); };
        auto makeStdVecBool = []() {
          return std::vector<bool>({true, false, false});
        };
        RDataFrame(nEntries)
            .Define("vi", makeStdVecInt)
            .Define("vb", makeStdVecBool)
            .Snapshot<std::vector<int>, std::vector<bool>>(treename, fname, {"vi", "vb"});
      }
      

      Attachments

        Issue Links

          Activity

            People

              dpiparo Danilo Piparo
              dpiparo Danilo Piparo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Actual End: