<html>
<body>
<font size=+2><tt>CSCCommissioning</tt></font> package operates with local DAQ data of the
<a href="http://cms-emu-slicetest.web.cern.ch/cms-emu-slicetest/">CSC SliceTest</a>.
Two modules of this package are <tt>CSCFileReader</tt> and <tt>CSCFileDumper</tt>.
First is capable of reading CSC local data and populating CMSSW data stream
(<tt><a href="https://twiki.cern.ch/twiki/bin/view/CMS/WorkBookCMSSWFramework#ProcModel">edm::Event</a></tt>)
with raw CSC data. Second module does an opposite job of selecting CSC data from the
<tt><a href="https://twiki.cern.ch/twiki/bin/view/CMS/WorkBookCMSSWFramework#ProcModel">edm::Event</a></tt>
and dumping them into local DAQ files.
<br>
<br>
CSC DAQ data are composed of up to 40 data streams from independent sources &#151; Readout Units (RUIs).
These streams are gathered in 4 FED crates (FED stands for Front End Driver) and travel
downstream of global DAQ via 4 S-Links. Each FED is assigned with its own FED ID (750-759).
Unlike global data taking, in local mode RUIs log data independently each in a separate set of files.
<br>
<br>
<font color=red>If you are working with plain local DAQ data format (one set of files per each RUI; see
for EmuRUI?? in file name), than you may find this paragraph useful.</font><br>
If you work in CMSSW_1_3_0 or later (package revision V00-04-04 and higher) you should
instruct <tt>CSCFileReader</tt> module to build FED buffers from selected RUIs (see
<a href="http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/IORawData/CSCCommissioning/test/readFile.cfg?rev=1.6&cvsroot=CMSSW&content-type=text/vnd.viewcvs-markup">
test/readFile.cfg</a> for example). To do that you need to specify parameter set (<tt>PSet</tt>)
which defines RUI file sets (<i>RUI00</i>, <i>RUI01</i>, ... <i>RUI09</i>) and then assign each
RUI to the appropriate FED (<i>FED750</i>, <i>FED751</i>, <i>FED752</i>, <i>FED753</i>). The module builds FED buffers
from RUI buffers with the same L1A. Therefore, you should always maintain order of files in
RUI file sets (module expects only incrementing L1A from file to file).
In CMSSW prior to CMSSW_1_3_0 (package revision prior to V00-04-04) you are
able to handle 1 FED with 1 RUI in it. Just specify <i>fileNames</i> as it is done in
<a href="http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/IORawData/CSCCommissioning/test/readFile.cfg?rev=1.4&cvsroot=CMSSW&content-type=text/vnd.viewcvs-markup">
test/readFile.cfg</a>.
<br>
<br>
Module also supports alternative data format, produced by local Event Builder emulator (see FU in
file name). In this case you need to assign <i>FU1</i>, <i>FU2</i>, ... with corresponding
file names and remove FED parameters (though, having them in configuration doesn't affect
anything). Set <i>tfDDUnumber=0</i> if Track-Finder records present in readout or
<i>tfDDUnumber=-1</i> if not. See 
<a href="http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/IORawData/CSCCommissioning/test/readFile.cfg?view=markup">test/readFile.cfg</a> for example.

<br>
<br>
Special trigger RUI should not be mixed with DAQ RUIs which were described above (such
configuration is not forbidden, but doesn't make much sense). Instead, trigger RUI solely
goes to FED with ID=760.
<br>
<br>
<tt>CSCFileDumper</tt> module selects CSC FED buffers from CMSSW data stream and
logs them into files specified in <i>output</i> parameter. It automatically appends _FEDID
(_750, _751, ... _760) to the end of every FED file. Be careful: one FED file may contain
several RUIs, while in true local DAQ mode every RUI logs separate file.
<br>
<br>

<hr>
Technical details on <a href="./details.html"><tt>CSCFileReader</tt></a>
</body>
</html>
