Author: [log in to unmask] Date: Mon Oct 5 15:30:55 2015 New Revision: 3761 Log: Better debug msg and new exception (yes, they will go into a single class) Added: java/trunk/evio/src/main/java/org/hps/evio/SvtEvioHeaderSyncErrorException.java Modified: java/trunk/evio/src/main/java/org/hps/evio/AugmentedSvtEvioReader.java java/trunk/evio/src/main/java/org/hps/evio/LCSimEngRunEventBuilder.java Modified: java/trunk/evio/src/main/java/org/hps/evio/AugmentedSvtEvioReader.java ============================================================================= --- java/trunk/evio/src/main/java/org/hps/evio/AugmentedSvtEvioReader.java (original) +++ java/trunk/evio/src/main/java/org/hps/evio/AugmentedSvtEvioReader.java Mon Oct 5 15:30:55 2015 @@ -47,7 +47,7 @@ logger.fine("checkSvtHeaderData skipcount " + Integer.toHexString(SvtEvioUtils.getSvtTailMultisampleSkipCount(tail))); } if( SvtEvioUtils.getSvtTailSyncErrorBit(tail) != 0) { - throw new SvtEvioHeaderApvBufferAddressException("This SVT header had a SyncError " + header.toString()); + throw new SvtEvioHeaderSyncErrorException("This SVT header had a SyncError " + header.toString()); } else if( SvtEvioUtils.getSvtTailOFErrorBit(tail) != 0) { throw new SvtEvioHeaderOFErrorException("This header had a OverFlowError " + header.toString()); @@ -142,9 +142,7 @@ logger.fine("checking header: " + headerDataInfo.toString()); - // Check the header data - this.checkSvtHeaderData(headerDataInfo); - + // Check the multisample header information int nMultisampleHeaders = headerDataInfo.getNumberOfMultisampleHeaders(); for(int iMultisampleHeader = 0; iMultisampleHeader < nMultisampleHeaders; iMultisampleHeader++) { logger.fine("iMultisampleHeader " + iMultisampleHeader); @@ -200,14 +198,18 @@ if( !Arrays.equals(bufferAddresses, bufAddresses)) { throw new SvtEvioHeaderApvBufferAddressException("The APV buffer addresses in this event do not match " + this.getMultisampleDebugString(headerDataInfo, SvtEvioUtils.getMultisampleTailWord(multisampleHeader)) + - this.getDebugString(bufAddresses, frameCounts, readError)); + this.getDebugString(bufAddresses, frameCounts, readError) + + " compared to " + + this.getDebugString(bufferAddresses, firstFrameCounts, readError)); } // Check that apv frame count match if( !Arrays.equals(firstFrameCounts, frameCounts)) { throw new SvtEvioHeaderApvFrameCountException("The APV frame counts in this event do not match " + this.getMultisampleDebugString(headerDataInfo, SvtEvioUtils.getMultisampleTailWord(multisampleHeader)) + - this.getDebugString(bufAddresses, frameCounts, readError)); + this.getDebugString(bufAddresses, frameCounts, readError) + + " compared to " + + this.getDebugString(bufferAddresses, firstFrameCounts, readError)); } } @@ -237,6 +239,15 @@ } // multisampleheaders + + + // Check the header data + // Parts of this get its input from the multisample which has already been checked + // therefore I don't expect these to happen. + this.checkSvtHeaderData(headerDataInfo); + + + } } Modified: java/trunk/evio/src/main/java/org/hps/evio/LCSimEngRunEventBuilder.java ============================================================================= --- java/trunk/evio/src/main/java/org/hps/evio/LCSimEngRunEventBuilder.java (original) +++ java/trunk/evio/src/main/java/org/hps/evio/LCSimEngRunEventBuilder.java Mon Oct 5 15:30:55 2015 @@ -171,6 +171,9 @@ } catch (final SvtEvioHeaderApvReadErrorException e) { LOGGER.log(Level.SEVERE, "Error reading header information from the SVT for run " + lcsimEvent.getRunNumber() + " event " + lcsimEvent.getEventNumber() + ". Don't stop!", e); //throw new RuntimeException(e); + } catch (final SvtEvioHeaderSyncErrorException e) { + LOGGER.log(Level.SEVERE, "Error reading header information from the SVT for run " + lcsimEvent.getRunNumber() + " event " + lcsimEvent.getEventNumber() + ". Don't stop!", e); + //throw new RuntimeException(e); } catch (final SvtEvioHeaderException e) { LOGGER.log(Level.SEVERE, "Generic error reading header information from the SVT for run " + lcsimEvent.getRunNumber() + " event " + lcsimEvent.getEventNumber() + ". Don't stop!", e); } catch (final SvtEvioReaderException e) { Added: java/trunk/evio/src/main/java/org/hps/evio/SvtEvioHeaderSyncErrorException.java ============================================================================= --- java/trunk/evio/src/main/java/org/hps/evio/SvtEvioHeaderSyncErrorException.java (added) +++ java/trunk/evio/src/main/java/org/hps/evio/SvtEvioHeaderSyncErrorException.java Mon Oct 5 15:30:55 2015 @@ -0,0 +1,22 @@ +/** + * + */ +package org.hps.evio; + +/** + * @author Per Hansson Adrian <[log in to unmask]> + * + */ +public class SvtEvioHeaderSyncErrorException extends SvtEvioHeaderException { + + public SvtEvioHeaderSyncErrorException(String message) { + super(message); + } + + public SvtEvioHeaderSyncErrorException(SvtEvioHeaderSyncErrorException e) { + super(e); + } + + + +}