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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • High
    • Resolution: Fixed
    • master
    • 6.26/00
    • RDataFrame
    • None
    • 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

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

            Dates

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