<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
And that limit is because apparently the bank number is encoded in 16 bits.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I have a super simple analyzer (based on Dave Abbott's work) that prints out <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
data from a bank <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
adaq1: ~adaq/quickAna/quickAna.c  (see README)<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
banknum = (bankhead>>16)&0xffff; // bank number; where bankhead is a data buffer location<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
This is the way we usually think of banks.  (but I think there are other kinds of "banks" in CODA</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
and EVIO, it's a little confusing).  The banks I'm talking about are created in the readout with
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 BANKOPEN(250,BT_UI4,blockLevel);<br>
<span>         // insert code here that does the readout ...<br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span> BANKCLOSE;</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The example above is for bank 250 which, following Alexandre's rule, is for the</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
FADC model 250.   A typical DAQ system has around ~10 crates with ~5 banks in them.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The bank numbers should be unique within a crate.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Bob</div>
<div id="appendonsend"></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>From:</b> Sbs_daq <sbs_daq-bounces@jlab.org> on behalf of David Flay <flay@jlab.org><br>
<b>Sent:</b> Tuesday, July 6, 2021 10:54 AM<br>
<b>To:</b> Alexandre Camsonne <camsonne@jlab.org>; sbs_daq@jlab.org <sbs_daq@jlab.org><br>
<b>Subject:</b> Re: [Sbs_daq] [EXTERNAL] Bank numbering guideline for SBS</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
Hi Alex,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
In the analyzer, ~/hana_decode/Decoder.h, we have:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<span style="font-family:Consolas,Courier,monospace">namespace Decoder { </span></div>
<div style="font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<font face="Consolas, Courier, monospace"><span style="font-family:Consolas,Courier,monospace">...</span></font></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<span style="font-family:Consolas,Courier,monospace">static const int MAXBANK = (1<<16)-1; // = 65535</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<span style="font-family:Consolas,Courier,monospace">...</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<span style="font-family:Consolas,Courier,monospace">}</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div>
<div id="x_Signature">
<div>
<div></div>
<div></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Best regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
David </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
</div>
<div style="margin:0px; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; background-color:rgb(255,255,255)">
<span style="margin:0px">----------------------------------------------------------------</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
David Flay, Ph. D.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hall A/C Staff Scientist</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thomas Jefferson National Accelerator Facility</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">----------------------------------------------------------------</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important"><br>
<br>
</span></div>
</div>
</div>
</div>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Sbs_daq <sbs_daq-bounces@jlab.org> on behalf of Alexandre Camsonne <camsonne@jlab.org><br>
<b>Sent:</b> Tuesday, July 6, 2021 9:43 AM<br>
<b>To:</b> sbs_daq@jlab.org <sbs_daq@jlab.org><br>
<b>Subject:</b> [Sbs_daq] [EXTERNAL] Bank numbering guideline for SBS</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText">Hi all,<br>
<br>
the bank number can be a random number, for simplification I would<br>
like people use the same number for bank number as the model number in<br>
the analyzer database, so by default the decoder would first try to<br>
look for the model corresponding to the bank number and if it does not<br>
seem to correspond it could use a model number from the cratemap.<br>
<br>
So if you read out list has a random bank number, could you make sure<br>
it is changed to match the model number so when we start taking data<br>
it will be consistent for all the detector subsystems.<br>
<br>
Does anyone know what is maximum limit on bank number value ?<br>
<br>
Thank you,<br>
<br>
Alexandre<br>
_______________________________________________<br>
Sbs_daq mailing list<br>
Sbs_daq@jlab.org<br>
<a href="https://mailman.jlab.org/mailman/listinfo/sbs_daq">https://mailman.jlab.org/mailman/listinfo/sbs_daq</a><br>
</div>
</span></font></div>
</div>
</body>
</html>