/** * Simulates a run to collect the keys the sub-resultproducer could generate. * Does some checking on the keys and determines the template key. * * @param run the run number * @return a template key (null for the field being averaged) * @throws Exception if an error occurs */ protected Object[] determineTemplate(int run) throws Exception { if (m_Instances == null) { throw new Exception("No Instances set"); } m_ResultProducer.setInstances(m_Instances); // Clear the collected results m_Keys.clear(); m_Results.clear(); m_ResultProducer.doRunKeys(run); checkForMultipleDifferences(); Object[] template = m_Keys.get(0).clone(); template[m_KeyIndex] = null; // Check for duplicate keys checkForDuplicateKeys(template); return template; }
/** * Simulates a run to collect the keys the sub-resultproducer could generate. * Does some checking on the keys and determines the template key. * * @param run the run number * @return a template key (null for the field being averaged) * @throws Exception if an error occurs */ protected Object[] determineTemplate(int run) throws Exception { if (m_Instances == null) { throw new Exception("No Instances set"); } m_ResultProducer.setInstances(m_Instances); // Clear the collected results m_Keys.clear(); m_Results.clear(); m_ResultProducer.doRunKeys(run); checkForMultipleDifferences(); Object[] template = m_Keys.get(0).clone(); template[m_KeyIndex] = null; // Check for duplicate keys checkForDuplicateKeys(template); return template; }