rest-for-physics / rest-for-physics/framework

Create a better unified drawing methods

Open
#155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
19
Forks
14
PR merge metrics
No merged PRs in 30d

Description

There are some features that could be shared between the DrawEvent methods.

For example, option arguments retrieval could be common. We could implement a common Drawing for event types using TRestHits.

Perhaps, it could be implemented at TRestEvent::DrawHitsEvent level the retrieval of options. Then, at TRestDetectorHitsEvent and TRestGeant4Event we could do:

TRestDetectorHitsEvent::DrawEvent( opt )
{
         TRestEvent::DrawHitsEvent( opt );

         // Write now specific drawing 
}

Another option is to create a new class TRestEventDrawer, that contains dedicated methods and the common drawing routines. Then TRestEvent could inherit from TRestEvent::TRestEventDrawer

This was discussed at rest-for-physics/detectorlib#33

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the DrawEvent methods in TRestEvent, TRestDetectorHitsEvent, and TRestGeant4Event, then read the related discussion in rest-for-physics/detectorlib#33. Compare the proposed TRestEvent::DrawHitsEvent and TRestEventDrawer designs. Done means shared option retrieval and drawing routines are consolidated without losing event-specific drawing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.