rivet is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" (Repository path '/hepforge/hg/rivet/public/rivet' does not exist.). Look in the Trac log for more information.

Opened 11 years ago

Last modified 8 years ago

#393 assigned task

Improvements to projection interface

Reported by: Andy Buckley Owned by: Andy Buckley
Priority: blocker Milestone: Perfection
Component: Projections Version: HEAD
Keywords: Cc: Frank Siegert, hoeth


Projections should be usable without needing to use the caching system, and it should be possible to clear them and check whether they are in a state where asking questions of them makes sense.

Ideally all projections should be automatically cleared (i.e. projection results removed, but construction parameters retained) between events.

I propose that

  • The Projection interface be extended to require clear() and calc(...) methods -- several already do. Whether a common signature is reasonably possible for the calc-type method requires a bit of thought: perhaps this can't be a requirement from the Projection interface but should be a conventional aspect of concrete projection class design.
  • The ProjectionHandler should call clear() on all projections at the start of each event, so that the individual project(Event&) methods don't have to.
  • A method to determine whether a projection has been applied could usefully be added, e.g. Projection::valid() or Projection::hasProjected()

Change History (4)

comment:1 Changed 11 years ago by Andy Buckley

Milestone: Release 1.3.0Release 1.2.2

Not really intending to get all this done for 1.2.2, but let's put it there to encourage some of these improvements.

comment:2 Changed 10 years ago by Andy Buckley

Milestone: Release release
Status: newassigned

comment:3 Changed 10 years ago by hoeth


comment:4 Changed 8 years ago by Andy Buckley

Cc: fsiegert,hoethfsiegert, hoeth
Milestone: 2.0.0Perfection
Note: See TracTickets for help on using tickets.