lcsim/src/org/lcsim/plugin/browser
diff -u -r1.4 -r1.5
--- EventHeaderPanel.java 10 Jun 2007 04:46:51 -0000 1.4
+++ EventHeaderPanel.java 18 Sep 2008 20:10:55 -0000 1.5
@@ -1,9 +1,12 @@
package org.lcsim.plugin.browser;
-import javax.swing.table.DefaultTableModel;
import java.util.Date;
import java.util.List;
+import java.util.Map;
+
import javax.swing.JPanel;
+import javax.swing.table.DefaultTableModel;
+
import org.lcsim.event.EventHeader;
import org.lcsim.event.EventHeader.LCMetaData;
import org.lcsim.plugin.browser.sort.DefaultSortableTableModel;
@@ -35,8 +38,34 @@
if (ts > 1e15) model.setValueAt(new Date(ts/1000000),2,1);
else model.setValueAt(String.valueOf(ts),2,1);
model.setValueAt(event.getDetectorName(),3,1);
+
+ // Add additional event parameters for Norman. --JM
+ Map<String,String[]> sparams = event.getStringParameters();
+ Map<String,int[]> iparams = event.getIntegerParameters();
+ Map<String,float[]> fparams = event.getFloatParameters();
+
+ float weight = 1.0f;
+ if (fparams.containsKey("_weight"))
+ weight = fparams.get("_weight")[0];
+
+ int idrup = 0;
+ if (iparams.containsKey("idrup"))
+ idrup = iparams.get("idrup")[0];
+
+ String slicVersion = "";
+ if (sparams.containsKey("SLIC_VERSION"))
+ slicVersion = sparams.get("SLIC_VERSION")[0];
+
+ String geantVersion = "";
+ if (sparams.containsKey("GEANT4_VERSION"))
+ geantVersion = sparams.get("GEANT4_VERSION")[0];
+
+ model.setValueAt(weight, 4, 1);
+ model.setValueAt(idrup, 5, 1);
+ model.setValueAt(slicVersion, 6, 1);
+ model.setValueAt(geantVersion, 7, 1);
}
- else for (int i=0; i<4; i++) model.setValueAt("",i,1);
+ else for (int i=0; i<8; i++) model.setValueAt("",i,1);
blockModel.setRowCount(0);
if (event != null)
@@ -79,7 +108,11 @@
{"Run", null},
{"Event", null},
{"Time Stamp", null},
- {"Detector Name", null}
+ {"Detector Name", null},
+ {"Event Weight", null},
+ {"IDRUP", null},
+ {"SLIC Version", null},
+ {"Geant4 Version", null}
},
new String []
{