Segmentation fault after applying TRestSignalToRawSignalProcess

REST version : v2.2.24.
REST commit : c865cb4e.

Hi,

I am trying to convert TRestSignalEvents into TRestRawSignalEvents by applying TRestSignalToRawSignalProcess on TRestSignalEvents.
Parameters for this process are as follows:

<TRestSignalToRawSignalProcess name="signalToRAWsignal" title="A process to convert a TRestSignalEvent into a TRestRawSignalEvent">
        <parameter name="sampling" value="50ns" />
        <parameter name="Npoints" value="2000" />
        <parameter name="triggerMode" value="firstDeposit" />
        <parameter name="triggerDelay" value="50" /> <!--should be in integer units-->
        <parameter name="gain" value="100" />
        <parameter name="integralThreshold" value="1229" />
    </TRestSignalToRawSignalProcess>

When I try to process 100000 events I get an error message:

Segmentation fault (core dumped)p") 0.0%[>--------------------------------------------]

Config.rml file to process events: configFile_Signal_To_RAW_To_Signal.rml (5.1 KB)

General process .rml file which stores all the events: processFile_general.rml (38.6 KB)

The problem is that if I process only ~30 events, everything goes smoothly.

Does anyone have an idea what am I doing wrong?

This needs to be debugged. Could you print out your event ID to see if that happens always at the same event ID?

If it is always connected to the same ID you may specify at your RML the corresponding entry:

<parameter name="firstEntry" value="XXX" />

and enable debugging at the corresponding process.

Could you provide the input file, and any other necessary files, i.e. at a remote HTTP, so that we can test the problem?

Hi @jgalan,

I have set the verbose level to REST_Debug and it looks like the TRestSignalToRawSignal process always crashes on the same event ID 204.

https://drive.google.com/drive/folders/1r3GzLl9VFW0lJPl5jy0sY8PZUfxTBQ4T?usp=sharing

Here I uploaded my input SignalEvents file - Xe136_0NDBD_G4Hits_To_Signal_G4_energy_cut_Nev100000.root, configuration .rml file - configFile_Signal_To_RAW_To_Signal.rml, file that contains all the required processes and defined inside the config.rml file - processFile_general.rml, TRestReadout - Panda_140kg.root and a directory with detector geometry, where Metadata file that should be defined inside the config.rml file is main.gdml.
Also, I added the output.txt file that contains output from the restManager.
If google drive is not really convenient, I can upload everything to github.

I added this line to TRestRunnerProcess but nothing has changed.

Hi Andrii, it is strange, but I downloaded your files, I compiled back v2.2.24 at commit c865cb4e, and I launched.

I didn’t get the segmentation fault, and the output generated event (ID:204) looks fine.

It happens to me that TRestGas is not properly loaded, it is the same for you? However, at v2.3.X this seems to be solved. And anyway, that particular process does not depend on TRestGas.

I see you have some local changes, for example, there is a new class TRestG4EnergyCut that it is not recognised by my installation.

What if you try with a clean installation?

Hi again,

this is really strange. I deleted all my custom libraries and recompiled REST.
Still, I have the same segmentation fault after SignalEvent ID: 204; I have updated outputNew.txt file on my google drive:
https://drive.google.com/drive/folders/1r3GzLl9VFW0lJPl5jy0sY8PZUfxTBQ4T?usp=sharing

For me it looks like everything is fine as in the output I have:

 Gas composition set to Xe/TMA (99/1)
(1 added files)
MediumMagboltz::LoadGasFile: Reading /local/home/al264242/.rest/download/xe_99.0-n(ch3)3_1.0-E_vs_P_10.0_1000.0_nodes_20-nCol_10-maxE_400.gas.
MediumMagboltz::LoadGasFile: Version 12
MediumMagboltz::LoadGasFile:
    Gas composition set to Xe/TMA (99/1)

But, indeed I have errors concerning nonexisting Key name of a process from my custom library:

-- Error : TRestRun::ReadInputFileMetadata.
-- Error : Key name : g4EnergyCut
-- Error : Hidden key? Please, report this problem.

When I apply TRestSignalToRawSignalProcess on the events that were not processed previously by the TRestG4EnergyCut I still have segmentation fault, but on the event ID : 237;
I have added my new Input .root file to the google drive in addition to the restManager output.
Those are: Xe136_0NDBD_G4Hits_To_Signal_G4_energy_UNcut_Nev100000.root and output_UNcut.txt