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

TTree::GetEntries(const char*selection) cannot handle more than 1e9 events

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 6.04/02
    • Fix Version/s: None
    • Component/s: Core Libraries
    • Labels:
      None
    • Environment:

      Ubuntu 14.10

      Description

      TTree::GetEntries with a selection string has an implicit cut of at 1e9 events, due to the default value of TTree::Process.
      Since the data type of the parameter is a Long64_t one could easily adjust this default value to a reasonable high value, so that we won't hit this limit again in the next 50 years, until we're all retired.

      Here's some code which shows the problem using a root file containing a single tree with a single branch containing 5e9 events:

      ekplx34(0):/local/ssd-scratch/tkeck/$ ls -ltrh
      total 98M
      rw-rr- 1 tkeck belle 98M Sep 9 00:34 test.root
      ekplx34(0):/local/ssd-scratch/tkeck/$ root -l test.root
      root [0]
      Attaching file test.root as _file0...
      (class TFile *) 0x31b3b70
      root [1] .ls
      TFile** test.root
      TFile* test.root
      KEY: TTree mytree;6 mytree
      KEY: TTree mytree;5 mytree
      root [2] mytree->GetEntries()
      (Long64_t) 5000000000
      root [3] mytree->GetListOfBranches()>At(0)>GetName()
      (const char *) "branch"
      root [4] mytree->GetEntries("branch == 0")
      (Long64_t) 1000000000
      root [5] mytree->GetEntries("branch != 0")
      (Long64_t) 0

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pcanal Philippe Canal
                Reporter:
                36a01c4fb474609c5fa6 Thomas Keck
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: