<div dir="ltr">If you are writing java you may be in the same situation as me--you are creating arrays that correspond to the columns in the bankdef xmls. For every column in every xml I have to <div>1) declare the array with the correct type (I make them public)</div>
<div>2) get the array from clas-io</div><div>3) nullify (clear) the array when a new event arrives.</div><div><br></div><div>Since many/most of the xmls already have ~100 columns, this is ripe for the possibility of cut&paste and typo errors. (Also the xmls will evolve). This should not be a manual process, so I wrote a small utility that reads the bankdef xml and spits out text that is in java form and can be pasted into a source file.</div>
<div><br></div><div>I used a naming convention that every array name is section_column, all lower case. Also, I assumed I am getting the arrays from a clas-io EvioDataEvent named event. For example, when I run this on DC.xml (which presently has 136 columns) I get 3*136 = 408 lines of java code (plus java doc generated from the xml info attribute) which I can cut and paste rather than type in, with no worries for typos. It looks like this (for a few of the 136 columns)<div>
<br></div><div><br></div><div><font color="#ff0000">//declaration section</font></div><div>







<p class=""><font size="1">/** ID of the first particle entering the sensitive volume */</font></p>
<p class=""><font size="1">public int[] true_pid;</font></p>
<p class=""><font size="1">/** ID of the mother of the first particle entering the sensitive volume */</font></p>
<p class=""><font size="1">public int[] true_mpid;</font></p>
<p class=""><font size="1">/** Track ID of the first particle entering the sensitive volume */</font></p>
<p class=""><font size="1">public int[] true_tid;</font></p></div><div>







<p class=""><font size="1">/** superlayer */</font></p>
<p class=""><font size="1">public int[] hbsegments_superlayer;</font></p>
<p class=""><span style="font-size:x-small">/** associated cross ID */</span><br></p>
<p class=""><font size="1">public int[] hbsegments_crossid;</font></p>
<p class=""><font size="1">/** associated track ID */</font></p>
<p class=""><font size="1">public int[] hbsegments_trackid;</font></p><p class=""><span style="color:rgb(255,0,0)">//get from clas-io event bank</span><font size="1"><br></font></p><p class=""><font size="1">hbclusters_id = event.getInt("HitBasedTrkg::HBClusters.ID");</font></p>
<p class=""><font size="1">hbclusters_sector = event.getInt("HitBasedTrkg::HBClusters.sector");</font></p><p class=""><font size="1">hbclusters_superlayer = event.getInt("HitBasedTrkg::HBClusters.superlayer");</font></p>
<p class=""><font size="1">hbclusters_segmentid = event.getInt("HitBasedTrkg::HBClusters.segmentID");</font></p><p class=""><font size="1">hbclusters_crossid = event.getInt("HitBasedTrkg::HBClusters.crossID");</font></p>
<p class=""><font size="1">hbclusters_trackid = event.getInt("HitBasedTrkg::HBClusters.trackID");</font></p><p class=""><font size="1">hbsegments_id = event.getInt("HitBasedTrkg::HBSegments.ID");</font></p>
<p class=""><font size="1">hbsegments_sector = event.getInt("HitBasedTrkg::HBSegments.sector");</font></p><p class=""><font size="1">hbsegments_superlayer = event.getInt("HitBasedTrkg::HBSegments.superlayer");</font></p>
<p class="">
















</p><p class=""><font size="1">hbsegments_crossid = event.getInt("HitBasedTrkg::HBSegments.crossID");</font></p></div><div><font size="1"><br></font></div><div><span style="color:rgb(255,0,0)">//nullify</span><br>
</div><div><font size="1"><br></font></div><div>







<p class=""><font size="1">true_mtid = null;</font></p>
<p class=""><font size="1">true_otid = null;</font></p>
<p class=""><font size="1">true_tracke = null;</font></p>
<p class=""><font size="1">true_totedep = null;</font></p>
<p class=""><font size="1">true_avgx = null;</font></p>
<p class=""><font size="1">true_avgy = null;</font></p>
<p class=""><font size="1">true_avgz = null;</font></p>
<p class=""><font size="1">true_avglx = null;</font></p>
<p class=""><font size="1">true_avgly = null;</font></p><p class=""><span style="font-size:x-small">true_avglz = null;</span></p>
<div>If this is potentially useful but you have a different naming convention for the arrays (or don't want them to be public) we can handle that with command line options.</div></div><div><br></div><div><br></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>