    001    package calhoun.analysis.crf.io;
    002
    003    import java.io.IOException;
    004
    005    import org.apache.commons.logging.Log;
    006    import org.apache.commons.logging.LogFactory;
    007
    008    import calhoun.util.Assert;
    009
    010    public class OutputHandlerGeneCallStatsInterval29 extends OutputHandlerGeneCallStats {
    011            private static final long serialVersionUID = 5955650475684210702L;
    012            private static final Log log = LogFactory.getLog(OutputHandlerGeneCallStatsInterval29.class);
    013
    014            public void writeTestOutput(InputSequence<?> sequence, int[] truePath, int[] hiddenStates) throws IOException {
    015                    truePath = SequenceConverter.convertSeqFromInterval29ToInterval13(truePath);
    016                    hiddenStates = SequenceConverter.convertSeqFromInterval29ToInterval13(hiddenStates);
    017                    //log.info("Checking hidden state validity");
    018                    for (int i = 0; i < hiddenStates.length; i++) {
    019                            Assert.a(hiddenStates[i] <= 12, "hiddenState[" + i + "] is " + hiddenStates[i]);
    020                    }
    021                    super.writeTestOutput(sequence, truePath, hiddenStates);
    022            }
    023    }