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

[RDF] Cannot snapshot a vector of bools

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Not a Bug
    • Affects Version/s: 6.13/04
    • Fix Version/s: None
    • Component/s: I/O
    • Labels:
      None
    • Environment:

      all

    • Development:

      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

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

                Dates

                Created:
                Updated:
                Resolved:
                Actual End: