Seg. fault in "REST_ViewReadoutEvent"

Hello,

I have the following crash record:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
||                           TRestReadout content                           ||
||                    Config file : template/config.rml                     ||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
||                             Name : Readout0                              ||
||    Title : A basic pixel readout. 10x10 channels. Pixel size : 20 mm     ||
||                             Version : 2.2.10                             ||
------------------------------------------------------------------------------
||                       Number of readout planes : 1                       ||
||                        Decoding was defined : NO                         ||
------------------------------------------------------------------------------
||                           -- Readout plane : 0                           ||
------------------------------------------------------------------------------
||             -- Position : X = 0 mm,  Y : 0 mm, Z : 463.02 mm             ||
||                -- Vector : X = 0 mm,  Y : 0 mm, Z : -1 mm                ||
||        -- Cathode Position : X = 0 mm,  Y : 0 mm, Z : 241.177 mm         ||
||                   -- Total drift distance : 221.843 mm                   ||
||                         -- Charge collection : 1                         ||
||                           -- Total modules : 1                           ||
||                         -- Total channels : 100                          ||
------------------------------------------------------------------------------
******************************************************************************


Warning in <TCanvas::Constructor>: Deleting canvas with same name: Event Viewer

 *** Break *** segmentation violation

The traceback indicates that the seg. fault takes place in:

#5  0x00007fa5c50b2fe3 in TRestBrowser::addFrame (this=0x5242b00, f=0x6699a20) at /local/home/ybedfer/REST/REST_v2.2.10_new/source/restcore/src/TRestBrowser.cxx:177
#6  0x00007fa5c710bf3f in TRestGenericEventViewer::Initialize (this=0x1dc8190) at /local/home/ybedfer/REST/REST_v2.2.10_new/source/events/viewers/src/TRestGenericEventViewer.cxx:76
#7  0x00007fa5c711227d in TRestReadoutEventViewer::Initialize (this=0x1dc8190) at /local/home/ybedfer/REST/REST_v2.2.10_new/source/events/viewers/src/TRestReadoutEventViewer.cxx:42

This is when I execute “REST_ViewReadoutEvent” on a root file resulting from a basic
processing of G4 events, down to “TRestHitsToSignalProcess”.

I am at loss on how to debug this. Because in the first place, I’m not sure I’m proceeding correctly:

  • The input root file seems to have all required pieces in place in AnalyisTree.
  • I have to make so though, that a “./template/config.rml” is available from the PWD (rquested by the viewer macro):
-- Error : Filename : template/config.rml                                     
-- Error : REST ERROR. Config File does not exist. Right path/filename?       
  • I could not find any example in the tutorials on the subject, which would have specified
    examples rml files for restG4 and restManager allowing me to check my installation.

I would appreciate some feedback…

I made my files available at ccin2p3: “~ybedfer/public/mup”.

Yann

REST version : v2.2.10

Hi Yann,

the script you are trying to use REST_ViewReadoutEvent, and the related REST class TRestReadoutEventViewer are quite old, and it is probably not used right now.

The reason why TRestReadoutEventViewer is requesting an RML file it is because the constructor of this class will initialise the readout defined in that RML file. This macro and class date from an epoch where we were loading the TRestReadout structure directly from an RML file.

Therefore, I would say this class and macro are now obsolete. Perhaps, this could be easily bring back to life by reading the readout from a ROOT file inside the macro, and passing it to TRestReadoutEventViewer?

This process visualises somehow a coloured histogram in the readout plane. All what this viewer needs is a TRestSignalEvent type stored in the ROOT in combination with a TRestReadout description. Then TRestReadoutEventViewer::DrawReadoutPulses seems to be doing the job.