Commit in hps-java/src/main/java/org/lcsim/hps on MAIN | |||
monitoring/MonitoringApplication.java | +1 | 1.40 -> 1.41 | |
/ConnectionPanel.java | +4 | -4 | 1.21 -> 1.22 |
evio/TestRunEvioToLcio.java | +17 | -14 | 1.8 -> 1.9 |
/SVTEvioReader.java | +8 | -7 | 1.6 -> 1.7 |
recon/tracking/SVTDataToRawTrackerHitDriver.java | +11 | -4 | 1.8 -> 1.9 |
+41 | -29 |
make stuff quieter, set better defaults for monitoring?
diff -u -r1.40 -r1.41 --- MonitoringApplication.java 6 May 2012 00:01:13 -0000 1.40 +++ MonitoringApplication.java 8 May 2012 15:52:52 -0000 1.41 @@ -501,6 +501,7 @@
if (cl.hasOption("s")) { app.jobPanel.disconnectOnErrorCheckBox.setSelected(false);
+ app.jobPanel.disconnectWarningCheckBox.setSelected(true);
} // Set job parameters.
diff -u -r1.21 -r1.22 --- ConnectionPanel.java 4 May 2012 21:49:30 -0000 1.21 +++ ConnectionPanel.java 8 May 2012 15:52:52 -0000 1.22 @@ -19,7 +19,7 @@
/** * @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: ConnectionPanel.java,v 1.21 2012/05/04 21:49:30 meeg Exp $
+ * @version $Id: ConnectionPanel.java,v 1.22 2012/05/08 15:52:52 meeg Exp $
*/ class ConnectionPanel extends FieldsPanel {
@@ -191,11 +191,11 @@
} private void setWaitMode(String waitMode) {
- if (Mode.SLEEP.toString().equals(waitMode.toLowerCase())) {
+ if (Mode.SLEEP.toString().equalsIgnoreCase(waitMode)) {
waitComboBox.setSelectedIndex(0);
- } else if (Mode.TIMED.toString().equals(waitMode.toLowerCase())) {
+ } else if (Mode.TIMED.toString().equalsIgnoreCase(waitMode)) {
waitComboBox.setSelectedIndex(1);
- } else if (Mode.ASYNC.toString().equals(waitMode.toLowerCase())) {
+ } else if (Mode.ASYNC.toString().equalsIgnoreCase(waitMode)) {
waitComboBox.setSelectedIndex(2); } }
diff -u -r1.8 -r1.9 --- TestRunEvioToLcio.java 5 May 2012 19:05:25 -0000 1.8 +++ TestRunEvioToLcio.java 8 May 2012 15:52:52 -0000 1.9 @@ -10,7 +10,6 @@
import org.apache.commons.cli.ParseException; import org.apache.commons.cli.PosixParser; import org.jlab.coda.jevio.EvioEvent;
-import org.jlab.coda.jevio.EvioException;
import org.jlab.coda.jevio.EvioReader; import org.lcsim.event.EventHeader; import org.lcsim.job.JobControlManager;
@@ -41,17 +40,11 @@
private static Options createCommandLineOptions() { Options options = new Options();
- //Option evioFileOpt = new Option("e", false, "Deprecated: The input EVIO file containing Test Run data."); - Option lcioFileOpt = new Option("l", true, "The name of the output LCIO file."); - Option detectorNameOpt = new Option("d", true, "The name of the detector to use for LCSim conditions."); - Option lcsimXmlOpt = new Option("x", true, "The LCSim XML file to process the LCIO events."); - Option sleepOpt = new Option("s", true, "Sleep duration between events (in ms)"); - - //options.addOption(evioFileOpt); - options.addOption(lcioFileOpt); - options.addOption(detectorNameOpt); - options.addOption(lcsimXmlOpt); - options.addOption(sleepOpt);
+ options.addOption(new Option("l", true, "The name of the output LCIO file.")); + options.addOption(new Option("d", true, "The name of the detector to use for LCSim conditions.")); + options.addOption(new Option("x", true, "The LCSim XML file to process the LCIO events.")); + options.addOption(new Option("s", true, "Sleep duration between events (in ms)")); + options.addOption(new Option("e", true, "Stop after N events"));
return options; }
@@ -64,6 +57,8 @@
* @param args The command line arguments. */ public static void main(String[] args) {
+ int maxEvents = 0; + int nEvents = 0;
// Set up command line parsing. Options options = createCommandLineOptions();
@@ -123,6 +118,11 @@
sleepTime = Integer.valueOf(cl.getOptionValue("s")); }
+ // Sleep time. + if (cl.hasOption("e")) { + maxEvents = Integer.valueOf(cl.getOptionValue("e")); + } +
// LCIO writer. if (lcioFileName != null) { try {
@@ -144,7 +144,7 @@
for (String evioFileName : cl.getArgs()) { // EVIO input file. File evioFile = new File(evioFileName);
-
+ System.out.println("Opening file " + evioFileName);
// EVIO reader. EvioReader reader = null; try {
@@ -156,7 +156,7 @@
// Loop over EVIO events, build LCSim events, process them, and then // write events to disk. fileLoop:
- while (true) {
+ while (maxEvents == 0 || nEvents < maxEvents) {
EvioEvent evioEvent = null; try { eventLoop:
@@ -191,8 +191,11 @@
throw new RuntimeException(e); } }
+ nEvents++;
}
+ reader.close();
}
+ System.out.println("Exiting");
jobManager.finish(); if (writer != null) {
diff -u -r1.6 -r1.7 --- SVTEvioReader.java 29 Apr 2012 23:06:58 -0000 1.6 +++ SVTEvioReader.java 8 May 2012 15:52:52 -0000 1.7 @@ -3,7 +3,6 @@
//--- java ---// import java.util.ArrayList; import java.util.List;
-import java.util.Vector;
//--- Coda ---// import org.jlab.coda.jevio.BaseStructure;
@@ -25,7 +24,7 @@
/** * * @author Omar Moreno <[log in to unmask]>
- * @version $Id: SVTEvioReader.java,v 1.6 2012/04/29 23:06:58 meeg Exp $
+ * @version $Id: SVTEvioReader.java,v 1.7 2012/05/08 15:52:52 meeg Exp $
*/ public class SVTEvioReader extends EvioReader {
@@ -40,10 +39,10 @@
debug = false; }
- /** - * - */ - public boolean makeHits(EvioEvent event, EventHeader lcsimEvent) {
+ /** + * + */ + public boolean makeHits(EvioEvent event, EventHeader lcsimEvent) {
// Create a list of HPSSVTData to extract the List<HPSSVTData> svtData = new ArrayList<HPSSVTData>();
@@ -141,7 +140,9 @@
} } }
- System.out.println("Adding SVTData Collection of Size " + svtDataCollection.size());
+ if (debug) { + System.out.println("Adding SVTData Collection of Size " + svtDataCollection.size()); + }
return foundBank; } }
diff -u -r1.8 -r1.9 --- SVTDataToRawTrackerHitDriver.java 2 May 2012 02:21:55 -0000 1.8 +++ SVTDataToRawTrackerHitDriver.java 8 May 2012 15:52:52 -0000 1.9 @@ -17,10 +17,15 @@
String svtDataCollectionName = "SVTData"; String rawTrackerHitOutputCollectionName = "SVTRawTrackerHits"; String readoutName = "TrackerHits";
+ boolean debug = false;
public SVTDataToRawTrackerHitDriver() { }
+ public void setDebug(boolean debug) { + this.debug = debug; + } +
public void setReadoutName(String readoutName) { this.readoutName = readoutName; }
@@ -74,13 +79,15 @@
} long cell_id = sensor.makeStripId(sensorChannel, sideNumber).getValue();
- RawTrackerHit myHit=new BaseRawTrackerHit(hitTime, cell_id, data, null, sensor);
+ RawTrackerHit myHit = new BaseRawTrackerHit(hitTime, cell_id, data, null, sensor);
myHit.getDetectorElement().getReadout().addHit((myHit));
- hits.add(new BaseRawTrackerHit(hitTime, cell_id, data, null, sensor));
+ hits.add(new BaseRawTrackerHit(hitTime, cell_id, data, null, sensor));
}
- System.out.println(this.getClass().getSimpleName() + " made " + hits.size() - + " RawTrackerHits with readoutName " + readoutName + " in collection " + rawTrackerHitOutputCollectionName);
+ if (debug) { + System.out.println(this.getClass().getSimpleName() + " made " + hits.size() + + " RawTrackerHits with readoutName " + readoutName + " in collection " + rawTrackerHitOutputCollectionName); + }
int flag = LCIOUtil.bitSet(0, 31, true); // Turn on 64-bit cell ID. event.put(rawTrackerHitOutputCollectionName, hits, RawTrackerHit.class, flag, readoutName);
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1