Print

Print


Author: [log in to unmask]
Date: Mon Nov 17 13:32:04 2014
New Revision: 1540

Log:
Fix up files to reference new class locations.

Modified:
    java/trunk/record-util/src/main/java/org/hps/record/composite/CompositeLoopConfiguration.java
    java/trunk/record-util/src/main/java/org/hps/record/composite/EvioEventAdapter.java
    java/trunk/record-util/src/main/java/org/hps/record/composite/LcioEventAdapter.java
    java/trunk/record-util/src/main/java/org/hps/record/evio/EvioFileProducer.java

Modified: java/trunk/record-util/src/main/java/org/hps/record/composite/CompositeLoopConfiguration.java
 =============================================================================
--- java/trunk/record-util/src/main/java/org/hps/record/composite/CompositeLoopConfiguration.java	(original)
+++ java/trunk/record-util/src/main/java/org/hps/record/composite/CompositeLoopConfiguration.java	Mon Nov 17 13:32:04 2014
@@ -4,7 +4,7 @@
 import java.util.List;
 
 import org.freehep.record.source.RecordSource;
-import org.hps.evio.LCSimEventBuilder;
+import org.hps.record.LCSimEventBuilder;
 import org.hps.record.enums.DataSourceType;
 import org.hps.record.enums.ProcessingStage;
 import org.hps.record.et.EtConnection;

Modified: java/trunk/record-util/src/main/java/org/hps/record/composite/EvioEventAdapter.java
 =============================================================================
--- java/trunk/record-util/src/main/java/org/hps/record/composite/EvioEventAdapter.java	(original)
+++ java/trunk/record-util/src/main/java/org/hps/record/composite/EvioEventAdapter.java	Mon Nov 17 13:32:04 2014
@@ -6,9 +6,10 @@
 import org.freehep.record.loop.RecordEvent;
 import org.freehep.record.source.AbstractRecordSource;
 import org.freehep.record.source.NoSuchRecordException;
-import org.hps.evio.EventConstants;
 import org.hps.record.EndRunException;
 import org.hps.record.RecordProcessingException;
+import org.hps.record.evio.EvioEventConstants;
+import org.hps.record.evio.EvioEventUtilities;
 import org.jlab.coda.et.EtEvent;
 import org.jlab.coda.jevio.BaseStructure;
 import org.jlab.coda.jevio.EvioEvent;
@@ -77,11 +78,11 @@
             setEventNumber(evioEvent);
             
             // Is pre start event?
-            if (EventConstants.isPreStartEvent(evioEvent)) {
+            if (EvioEventUtilities.isPreStartEvent(evioEvent)) {
                 // Activate start of run hook on processors.
                 startRun(evioEvent);
             // Is end run event?
-            } else if (EventConstants.isEndEvent(evioEvent)) {
+            } else if (EvioEventUtilities.isEndEvent(evioEvent)) {
                 // Activate end of run hook on processors.
                 endRun(evioEvent);
                 
@@ -91,7 +92,7 @@
                     throw new EndRunException("EVIO end event received.", evioEvent.getIntData()[1]);
                 }             
             // Is physics event?
-            } else if (EventConstants.isPhysicsEvent(evioEvent)) {
+            } else if (EvioEventUtilities.isPhysicsEvent(evioEvent)) {
                 // Process a single physics EvioEvent.
                 process(evioEvent);
             }
@@ -124,7 +125,7 @@
         int eventNumber = -1;
         if (evioEvent.getChildren() != null) {
             for (BaseStructure bank : evioEvent.getChildren()) {
-                if (bank.getHeader().getTag() == EventConstants.EVENTID_BANK_TAG) {
+                if (bank.getHeader().getTag() == EvioEventConstants.EVENTID_BANK_TAG) {
                     eventNumber = bank.getIntData()[0];
                     break;
                 }

Modified: java/trunk/record-util/src/main/java/org/hps/record/composite/LcioEventAdapter.java
 =============================================================================
--- java/trunk/record-util/src/main/java/org/hps/record/composite/LcioEventAdapter.java	(original)
+++ java/trunk/record-util/src/main/java/org/hps/record/composite/LcioEventAdapter.java	Mon Nov 17 13:32:04 2014
@@ -6,9 +6,9 @@
 import org.freehep.record.loop.RecordEvent;
 import org.freehep.record.source.AbstractRecordSource;
 import org.freehep.record.source.NoSuchRecordException;
-import org.hps.evio.EventConstants;
-import org.hps.evio.LCSimEventBuilder;
+import org.hps.record.LCSimEventBuilder;
 import org.hps.record.RecordProcessingException;
+import org.hps.record.evio.EvioEventUtilities;
 import org.jlab.coda.jevio.EvioEvent;
 import org.lcsim.event.EventHeader;
 import org.lcsim.util.Driver;
@@ -77,7 +77,7 @@
                 builder.readEvioEvent(evioEvent);
                 
                 // Is this a physics EvioEvent?
-                if (EventConstants.isPhysicsEvent(evioEvent)) {
+                if (EvioEventUtilities.isPhysicsEvent(evioEvent)) {
                     // Use the builder to create the LCIO event.
                     lcioEvent = builder.makeLCSimEvent(compositeRecord.getEvioEvent());
                 } else {

Modified: java/trunk/record-util/src/main/java/org/hps/record/evio/EvioFileProducer.java
 =============================================================================
--- java/trunk/record-util/src/main/java/org/hps/record/evio/EvioFileProducer.java	(original)
+++ java/trunk/record-util/src/main/java/org/hps/record/evio/EvioFileProducer.java	Mon Nov 17 13:32:04 2014
@@ -203,7 +203,7 @@
                 while (true) {
 
                     // Get next event.
-                    event = reader.nextEvent();
+                    event = reader.nextEvent();                   
                     ++eventCount;
                     if (eventCount % 1000 == 0) {
                         System.out.println("EvioFileProducer - event <" + eventCount + ">");
@@ -215,6 +215,9 @@
                     // Try to parse the next event.  
                     try {
                         reader.parseEvent(event);
+                        if (debug) {
+                            System.out.println("event #" + event.getEventNumber() + " is " + event.getTotalBytes() + " bytes");
+                        }
                     } catch (Exception e) {
                         e.printStackTrace();
                         System.out.println("Error making EVIO event with sequence number <" + eventCount + "> in file <" + evioFile.getPath() + ">.");