<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Dave,<div><br></div><div>We do have a class like that in the clas-io package. I thought all IO related things should be in that one jar.</div><div>We can either migrate your classes, if they have more functionality, or add functionality to the ones we have.</div><div><br></div><div>Gagik</div><div><br><div><div>On May 20, 2014, at 10:58 AM, David Heddle <<a href="mailto:david.heddle@cnu.edu">david.heddle@cnu.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div><div><div>As an alternative to the evio dictionary (which may or may no be present) I built a little library (called  BankDictionary in svn--at least for a little while) that creates a dictionary from the bankdef xml files. It works off a jar file of the clas12 xml files. You can make that jar yourself or get it from the clasJlib checkout. <br>
<br></div>The main program in the BankDictionary class serves as an example of how to use it:<br><br> <b><font size="1">   // main program for testing<br>    public static void main(String arg[]) {<br>
        BankDictionary bd = new BankDictionary();  //create a dictionary<br>        try {<br>            bd.buildDictionary(); //build the dictionary<br>        } catch (IOException e) {<br>            e.printStackTrace();<br>
        }<br>        <br></font></b></div><div><b><font size="1">//use the dictionary<br></font></b></div><div><b><font size="1">        DictionaryEntry entry = bd.getEntry(400, 5);<br>
        System.out.println("Tag: " + entry.getTag());<br>        System.out.println("Bank name: " + entry.getBankName());<br>        System.out.println("Bank info: " + entry.getBankInfo());<br>
        System.out.println("Num: " + entry.getNum());<br>        System.out.println("Column name: " + entry.getColumnName());<br>        System.out.println("Data type: " +entry.getType());<br>
        System.out.println("Column info: " + entry.getColumnInfo());</font></b><br>    }<br><br></div><div>output:<br><font size="1"><br>
Tag: 400<br>Bank name: BST<br>Bank info: Simulated BST Hit Information<br>Num: 5<br>Column name: lx_avg<br>Data type: float64<br>Column info: Average local x position</font><br></div><div><br></div>So you build the dictionary and then look up entries by tag and num. The returned DictionaryEntry has getters as shown in the print statements.<br>
<br></div><div><div>I assume the evio dictionary is also made from the bankdef xml's, so consistency should be more or less guaranteed.<br><br></div><div>cheers,<br></div><div>dph<br></div><div>-- <br>
<div dir="ltr">David P. Heddle, Ph.D.<br>
Associate Professor of Physics<br>
Christopher Newport University<br>
Newport News, VA 23606<div><br></div><div>757.594.8434 (CNU)</div></div>
</div></div></div>
_______________________________________________<br>Clas12_software mailing list<br><a href="mailto:Clas12_software@jlab.org">Clas12_software@jlab.org</a><br>https://mailman.jlab.org/mailman/listinfo/clas12_software</blockquote></div><br></div></body></html>