4 modified files
java/trunk/record-util/src/main/java/org/hps/record
--- java/trunk/record-util/src/main/java/org/hps/record/EndRunException.java 2014-08-28 23:25:26 UTC (rev 923)
+++ java/trunk/record-util/src/main/java/org/hps/record/EndRunException.java 2014-08-28 23:26:58 UTC (rev 924)
@@ -7,7 +7,16 @@
*/
// TODO: Add run number to this class.
public class EndRunException extends IOException {
- public EndRunException(String message) {
+
+ int runNumber;
+
+ public EndRunException(String message, int runNumber) {
super(message);
+ this.runNumber = runNumber;
}
+
+ public int getRunNumber() {
+ return runNumber;
+ }
+
}
java/trunk/record-util/src/main/java/org/hps/record/chain
--- java/trunk/record-util/src/main/java/org/hps/record/chain/EventProcessingChain.java 2014-08-28 23:25:26 UTC (rev 923)
+++ java/trunk/record-util/src/main/java/org/hps/record/chain/EventProcessingChain.java 2014-08-28 23:26:58 UTC (rev 924)
@@ -5,12 +5,10 @@
import org.freehep.record.loop.AbstractLoopListener;
import org.freehep.record.loop.LoopEvent;
-import org.freehep.record.loop.LoopListener;
-import org.freehep.record.loop.RecordLoop;
import org.freehep.record.loop.RecordLoop.Command;
import org.hps.record.DataSourceType;
+import org.hps.record.chain.EventProcessingConfiguration.ProcessingStage;
import org.hps.record.composite.CompositeRecordLoop;
-import org.hps.record.composite.CompositeRecordLoopAdapter;
import org.hps.record.composite.CompositeRecordProcessor;
import org.hps.record.etevent.EtEventProcessor;
import org.hps.record.etevent.EtEventSource;
@@ -37,16 +35,7 @@
* record types, in order to plot, update a GUI component, or analyze the events.
*/
public class EventProcessingChain extends AbstractLoopListener {
-
- /**
- * Processing stages to execute.
- */
- public enum ProcessingStage {
- ET,
- EVIO,
- LCIO
- }
-
+
protected int totalEventsProcessed;
protected Throwable lastError;
protected boolean done;
java/trunk/record-util/src/main/java/org/hps/record/chain
--- java/trunk/record-util/src/main/java/org/hps/record/chain/EventProcessingConfiguration.java 2014-08-28 23:25:26 UTC (rev 923)
+++ java/trunk/record-util/src/main/java/org/hps/record/chain/EventProcessingConfiguration.java 2014-08-28 23:26:58 UTC (rev 924)
@@ -6,7 +6,6 @@
import org.freehep.record.source.RecordSource;
import org.hps.evio.LCSimEventBuilder;
import org.hps.record.DataSourceType;
-import org.hps.record.chain.EventProcessingChain.ProcessingStage;
import org.hps.record.composite.CompositeRecordProcessor;
import org.hps.record.etevent.EtConnection;
import org.hps.record.etevent.EtEventProcessor;
@@ -23,7 +22,16 @@
boolean stopOnErrors = true;
boolean stopOnEndRun = true;
-
+
+ /**
+ * Processing stages to execute.
+ */
+ public enum ProcessingStage {
+ ET,
+ EVIO,
+ LCIO
+ }
+
DataSourceType sourceType = DataSourceType.ET_SERVER;
ProcessingStage processingStage = ProcessingStage.LCIO;
java/trunk/record-util/src/main/java/org/hps/record/evio
--- java/trunk/record-util/src/main/java/org/hps/record/evio/EndRunProcessor.java 2014-08-28 23:25:26 UTC (rev 923)
+++ java/trunk/record-util/src/main/java/org/hps/record/evio/EndRunProcessor.java 2014-08-28 23:26:58 UTC (rev 924)
@@ -17,6 +17,9 @@
public void processEvent(CompositeRecord event) throws EndRunException {
if (event.getEvioEvent() != null)
if (EventConstants.isEndEvent(event.getEvioEvent()))
- throw new EndRunException("EVIO end event received.");
+ throw new EndRunException(
+ "EVIO end run event received.",
+ event.getEvioEvent().getIntData()[1]); // FIXME: Is this right?
+
}
}
SVNspam 0.1