framework icon indicating copy to clipboard operation
framework copied to clipboard

Create a better unified drawing methods

Open jgalan opened this issue 3 years ago • 0 comments

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

jgalan avatar Mar 16 '22 10:03 jgalan