Seg.fault when trying to visualise a TRestHitsEvent using macro

When trying to visualise an event using the REST_ViewHitsEvent macro I am running into troubles.

It seems that it tries to open an TEve session:

root [0] REST_ViewHitsEvent("quickAnalysis/data/R01138_00000_Hits_CalibrationRadonCd_usertrex_V2.2.12.root")

libGL error: No matching fbConfigs or visuals found

libGL error: failed to load driver: swrast

Error in <RootX11ErrorHandler>: GLXBadContext (XID: 6292477, XREQ: 149)

The file/event opens/displays properly if I just do:

restRoot HitsFile.root
run0->GetEntry(10)
TCanvas c
ev0->DrawEvent()

Do we have the option to chose between Eve and TRestEvent::DrawEvent?

This could be your driver’s problem. It works fine for me, no libGL error message

If you want to draw with TRestEvent::DrawEvent, use

REST_ViewEvents("XXX.root","TRestHitsEvent")

or equivalently, in bash command line

restViewEvents XXX.root TRestHitsEvent

1 Like