Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:14

0001 <html>
0002 <body>
0003 Technical details on <font size=+2><tt>CSCFileReader</tt></font>:
0004 <br><br>
0005 To build FED buffers <tt>CSCFileReader</tt> merges DDU data streams and
0006 constructs fake DCC Headers and DCC Trailers for FED buffers.
0007 <br>
0008 <br>
0009 For every RUI stream module instantiates <tt>FileReaderDDU</tt> class inherited from our on-line software (in TriDAS).
0010 <br>
0011 <br>
0012 <tt>FileReaderDDU</tt> reads file with DDU data, searches for <b>DDU Headers</b>
0013 and <b>DDU Trailers</b>, and finally returns event buffer. It also handles data
0014 corruptions.
0015 <br><br>
0016 <tt>FileReaderDDU</tt> continuously reads DDU data in blocks of definite length.
0017 Each time it passes through block, it searches for <b>DDU Header</b> or <b>DDU
0018 Trailer</b>. In same time it composes event buffer. Once it find <b>DDU Trailer</b>
0019 it sets an ``end mark'' in current data block and returns event buffer
0020 with event <i>status flag</i>, which tells that we have <i>DDU Trailer</i> in this
0021 event. On next call it continues passing through data block starting from
0022 ``end mark''. If it finds <b>DDU Header</b> pattern in first two DDU words it
0023 sets <i>status flag</i> accordingly and goes further until it finds <b>DDU Trailer</b>
0024 or another <b>DDU Header</b>. If <b>DDU Header</b> appeared in a place anywhere after
0025 first two DDU words, program sets <i>Unknown</i> bit in <i>status flag</i> and
0026 returns buffer composed with data in front of this <b>DDU Header</b>.
0027 If program finds <b>DDU Header</b> in a right place and encounters
0028 second <b>DDU Header</b> it returns data between these <b>DDU Headers</b>, sets <i>DDU Header</i>
0029 bit in <i>status flag</i>, and starts from second <b>DDU Header</b> on next call.
0030 If buffer size reaches value of 50000 DDU words, <i>status flag</i> contains
0031 <i>DDUoversize</i> bit set.
0032 <br><br>
0033 Described scheme can be presented by following diagrams of
0034 buffer structure:
0035 <br><br>
0036 <table border=0 width=100%>
0037 <tr>
0038 <td valign=top>1)</td><td valign=top><nobr>[H-T]</nobr></td><td valign=top><nobr>// Normal event</nobr></td>
0039 </tr><tr>
0040 <td valign=top>2)</td><td valign=top><nobr>[H-?]H</nobr></td><td valign=top><nobr>// More likely event with corrupted trailer</nobr></td>
0041 </tr><tr>
0042 <td valign=top>3)</td><td valign=top><nobr>[H-max]</nobr></td><td valign=top><nobr>// <i>DDUoversize</i> condition</nobr></td>
0043 </tr><tr>
0044 <td valign=top>4)</td><td valign=top><nobr>[?-T]</nobr></td><td valign=top><nobr>// Could be anything</nobr></td>
0045 </tr><tr>
0046 <td valign=top>5)</td><td valign=top><nobr>[?-?]H</nobr></td><td valign=top><nobr>// Could be anything (depends on previous event)</nobr></td>
0047 </tr><tr>
0048 <td valign=top>6)</td><td valign=top><nobr>[?-max]</nobr></td><td valign=top><nobr>// Could be anything</nobr></td>
0049 </tr><tr>
0050 <td valign=top>7)</td><td valign=top><nobr>[FFFF]</nobr></td><td valign=top><nobr>// Some standard sequence to complete ethernet package</nobr></td>
0051 </tr>
0052 </table>
0053 <br><br>
0054 One remark to be made here is that <b>DDU Header</b> (as well as <b>DDU Trailer</b>)
0055 consists of three words with identifying pattern in second word.
0056 If two consecutive <b>DDU Headers</b> were found, first word of second
0057 <b>Header</b> goes to both events.
0058 <br><br>
0059 In <tt>FileReaderDDU</tt> for user convenience additional to <tt>read</tt> function <tt>next</tt> was
0060 implemented. Together with <tt>select</tt>, <tt>accept</tt>, and <tt>reject</tt>
0061 functions it allows user to get events of specified type. Function
0062 <tt>reject</tt> helps to filter out events with any of <i>status flag</i>
0063 bits matches defined criteria. Function <tt>accept</tt> forces <tt>next</tt>
0064 to return events with any of <i>status flag</i> bits matches its
0065 criteria. Function <tt>select</tt> requires events exactly match its
0066 criteria. In <tt>CSCFileReader</tt> module selection/rejection criteria
0067 are set to default (safe) values and cannot be changed.
0068 </body>
0069 </html>