<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:14pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Dear friends,</p>
<p><br>
</p>
<p>we have (most probably fixed) the issue by modifying the parser a bit. See attachment.</p>
<p><br>
</p>
<p>Unfortunately, before doing the changes, I did not open a new branch. Am I allowed to commit our changes to the master branch? Or do  you want to implement the new parser (if you think it is fine this way)?</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Best greetings</p>
<p>Günter<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Weber, Guenter Dr.<br>
<b>Gesendet:</b> Dienstag, 16. April 2024 07:11:32<br>
<b>An:</b> Discuss use of Nurdlib, TRLO II, drasi and UCESB.<br>
<b>Betreff:</b> NURDLIB - Problem in parser of caen_v1n90</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 14pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p>Dear friends,</p>
<p><br>
</p>
<p>yesterday I managed to get the DAQ starting (using the updated software and howto instructions). However, the readout of the TDC module V1190A failed:</p>
<p><br>
</p>
<p></p>
<div><span style="font-size: 10pt;">2024-04-15 14:29:36.979260 i  RIO4L-2/MAIN    crate_init(POLARIMETER) }</span></div>
<div><span style="font-size: 10pt;">+0200 CEST :f_user.c:1257:</span></div>
<div><span style="font-size: 10pt;">2024-04-15 14:29:36.979280 E  RIO4L-2/MAIN    had readout error, ret=0x2, trigger=1, prev=1</span></div>
<div><span style="font-size: 10pt;">+0200 CEST :module/caen_v1n90/caen_v1n90.c:651:</span></div>
<div><span style="font-size: 10pt;">2024-04-15 14:29:36.979684 E  RIO4L-2/MAIN    Trailer corrupt (ofs=0x00000010,u8[4]=0x0900032f).</span></div>
<div><span style="font-size: 10pt;">+0200 CEST :crate/crate.c:2074:</span></div>
<div><span style="font-size: 10pt;">2024-04-15 14:29:36.979712 E  RIO4L-2/MAIN    POLARIMETER[3]=CAEN_V1190 parse error=0x00000002, dumping data:</span></div>
<div><span style="font-size: 10pt;">+0200 CEST :crate/crate.c:2083:</span></div>
<div><span style="font-size: 10pt;">2024-04-15 14:29:36.979724 i  RIO4L-2/MAIN    ---[ Dump begin ]---</span></div>
<div><span style="font-size: 10pt;">+0200 CEST :crate/crate.c:2083:</span></div>
<div><span style="font-size: 10pt;">2024-04-15 14:29:36.979734 i  RIO4L-2/MAIN    Start=0x3005ef08  Bytes=44=0x2c</span></div>
<div><span style="font-size: 10pt;">+0200 CEST :crate/crate.c:2083:</span></div>
<div><span style="font-size: 10pt;">2024-04-15 14:29:36.979755 i  RIO4L-2/MAIN        0: 40000003 0800032f 00702106 18000003 0900032f 19000002 0a00032f 1a000002</span></div>
<div><span style="font-size: 10pt;">+0200 CEST :crate/crate.c:2083:</span></div>
<div><span style="font-size: 10pt;">2024-04-15 14:29:36.979770 i  RIO4L-2/MAIN       20: 0b00032f 1b000002 80000163</span></div>
<div><span style="font-size: 10pt;">+0200 CEST :crate/crate.c:2083:</span></div>
<div><span style="font-size: 10pt;">2024-04-15 14:29:36.979780 i  RIO4L-2/MAIN    ---[  Dump end  ]---</span></div>
<div><span style="font-size: 10pt;">+0200 CEST :crate/crate.c:1554:</span></div>
<div><span style="font-size: 10pt;">2024-04-15 14:29:36.979810 E  RIO4L-2/MAIN    POLARIMETER: readout failed!</span></div>
<div><span style="font-size: 10pt;">+0200 CEST :crate/crate.c:1598:</span></div>
<div><span style="font-size: 10pt;">2024-04-15 14:29:36.979823 E  RIO4L-2/MAIN    POLARIMETER: had problems, re-initializing.</span></div>
<p></p>
<p><br>
</p>
<p>To us it looks like the parser does not account for the fact that the module contains several individual TDC units which each will produce a TDC header plus payload. And only after all TDC units were readout, finally the trailer will appear.</p>
<p><br>
</p>
<p>(As I can see, the 1n90 series ranges from 16 channels to 128 channels with the high channel number modules having several individual TDC units. Maybe, this whole issue was overlooked when writing the parser code?)</p>
<p><br>
</p>
<p>In the attachment, I send a modified version of the parser where for testing purposes it is assumed that the module has four TDC units (as should be the case for our module). Compilation of this code works, but it fails in the unit test with the following
 errors:</p>
<p><br>
</p>
<p></p>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">make: Warning: File `build_cc_ppc-linux_4.2.2_debug/module/caen_v1n90/caen_v1n90.d' has modification time 45 s in the future</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">CC    build_cc_ppc-linux_4.2.2_debug/module/caen_v1n90/caen_v1n90.o</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">LD    build_cc_ppc-linux_4.2.2_debug/test</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">TEST  build_cc_ppc-linux_4.2.2_debug/test_ok</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">[tests/argmatch.c:127: Shorts]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">[tests/argmatch.c:128: Longs]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">[tests/argmatch.c:129: Combos]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">[tests/argmatch.c:130: ShortsWithValues]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">[tests/argmatch.c:131: LongsWithValues]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">[tests/argmatch.c:132: MissingValue]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">[tests/base.c:110: MemoryCheck]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">[tests/base.c:111: EventBufferAdvance]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Invalid pointer to advance event buffer. [tests/base.c:47]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Calling abort()... [tests/base.c:47]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Invalid pointer to advance event buffer. [tests/base.c:56]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Calling abort()... [tests/base.c:56]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Tried to advance outside event buffer. [tests/base.c:72]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Calling abort()... [tests/base.c:72]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">[tests/base.c:112: EventBufferInvariant]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Event-buffer inconsistent (0x103ae008:11 != 0x103ae008:10). [tests/base.c:87]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Calling abort()... [tests/base.c:87]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Event-buffer inconsistent (0x103ae008:9 != 0x103ae008:10). [tests/base.c:91]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Calling abort()... [tests/base.c:91]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Event-buffer inconsistent (0x103ae009:10 != 0x103ae008:10). [tests/base.c:95]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Calling abort()... [tests/base.c:95]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Event-buffer inconsistent (0x103ae007:10 != 0x103ae008:10). [tests/base.c:99]</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 18.6667px;">
<font size="2"><span style="font-size: 10pt;">2024-04-15,20:11:37:ERRR: Calling abort()... [tests/base.c:99]</span></font></div>
<br>
<p></p>
<p>For comparison, I also send the parser from the NURDLIB version that Bastian had set up for us.</p>
<p><br>
</p>
<p><br>
</p>
<p>It would be really great if you could have a look into this. Most probably this is the last issue that we are facing, before the DAQ is fine again.</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Thank you very much!</p>
<p><br>
</p>
<p><br>
</p>
<p>Best greetings</p>
<p>Günter</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div style="font-family:Tahoma; font-size:13px"></div>
</div>
</div>
</div>
</body>
</html>