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

[DF] Cannot use fill if the object is not an histogram

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: master
    • Fix Version/s: 6.26/00
    • Component/s: RDataFrame
    • Labels:
      None
    • Environment:

      all

      Description

      As reported here https://root-forum.cern.ch/t/rdataframe-fill-action/31211 this code does not compile. The static assert has to be removed.

      #include <TROOT.h>
      #include <ROOT/RDataFrame.hxx>
      #include <ROOT/RVec.hxx>
      #include <TH1F.h>
       
      class Test
      {
          TH1F hist;
      public:
          void Fill(const int val)
          {   
              hist.Fill(val);
          }   
      };
       
      int main()
      {
          const std::string file = "myfile.root";
          auto df = ROOT::RDataFrame("Events", file);
       
          auto something = df.Fill(Test(), {"nMuon"});
       
          return 0;
      }
      

        Attachments

          Activity

            People

            Assignee:
            eguiraud Enrico Guiraud
            Reporter:
            dpiparo Danilo Piparo
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Actual Start:
              Actual End: