Skip to content

RDF Progress bar seems to ignore Range() calls #15323

Open
@TomasDado

Description

@TomasDado

Check duplicate issues.

  • Checked for duplicates

Description

When Range() is called on a RDF object with a progress bar, the progress bar seems to show all the events instead of reducing the events to the values provided in the Range() call.

Reproducer

void test() {

  ROOT::RDataFrame df(100);
  ROOT::RDF::Experimental::AddProgressBar(df);
  auto def = df.Define("x", [](){ return gRandom->Rndm(); });
  auto max = def.Range(0, 10);
  auto hist = max.Histo1D("x");
  std::cout << hist->Integral() << "\n";
}

The following code shows:

root [0] 
Processing test.cxx...
[Total elapsed time: 0:00m  processed files: 0 / 0  processed evts: 100 / 100]                                                                                                                      
10

While the progress bar should ideally show 10/10

ROOT version

Recent master branch

Installation method

git clone + local compilation

Operating system

Ubuntu 23.10

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions