Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • nptool nptool
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Now running Gitlab v15.9.3. More info.

  • np
  • nptoolnptool
  • Issues
  • #47
Closed
Open
Issue created Oct 27, 2017 by Greg Christian@gchristianDeveloper

Limiting the range of events for npanalysis

Currently you can specify the -L <arg> flag to npanalysis to limit the range of analyzed events from 0 -> <arg>. I am interested in also being able to specify the starting event too, i.e. allowing the analysis to start with some event other than event zero.

I've made a simple change to the NPOptionManager code (and npanalysis.cxx) adding a -F flag that specifies the beginning of the event loop (default is zero). Using this, the analysis goes from F -> F+L (with a check to not go past the end of the chain). This should fully maintain backward compatibility.

Before pushing I wanted to make sure it's an acceptable change to make, since it modifies the core parts of the package. Any thoughts?

I also changed the event loop variable to unsigned long, to minimize the chance that it overflows. It was unsigned int before, which is 32 bit on most systems (~4e9 event maximum), but could conceivably be 16 bit (~65k maximum).

Here's the relevant changes in case anyone wants to inspect.

  unsigned long first_entry = myOptionManager->GetFirstEntryToAnalyse(); // defaults to zero
  unsigned long nentries = Chain->GetEntries();
  if(nentries> myOptionManager->GetNumberOfEntryToAnalyse() && myOptionManager->GetNumberOfEntryToAnalyse()>0)
    nentries = myOptionManager->GetNumberOfEntryToAnalyse() ;
  if(nentries + first_entry > Chain->GetEntries()) {nentries = first_entry+Chain->GetEntries();}

(event loop):

 for (unsigned long i = first_entry ; i < nentries + first_entry; i++) {
Assignee
Assign to
Time tracking