public void summary2(String label, Map<? extends Object, Stats1D> data, Integer norm, boolean average, FullResult reference)
        throws Exception
    {
      if ( data == null ) return;
      boolean allInt = true;
      Object[] keys = new Object[data.size()];
      int i = 0, sum = 0;
      for(Object key : data.keySet()) {
        keys[i++] = key;
        sum += data.get(key).sum();
        allInt &= (key instanceof Integer);
      }
      Arrays.sort(keys);
      out.start(prefix(label));
      String description = String.format("total=%d, norm=%d ", sum, norm);
      out.description(description);
      if ( allInt && average && sum > 1 ) {
          double hsum = 0.0, hsum2 = 0.0;
          for(Object key : keys) {
              double w = data.get(key).sum();
              hsum += w * ((Integer)key).intValue();
          }
          double avg = hsum/sum;
          for(Object key : keys) {
              double w = data.get(key).sum() - avg;
              hsum2 += w * w * ((Integer)key).intValue();
          }
          out.value("_average", avg);
          out.value("_sdev", Math.sqrt(hsum2/(sum-1)/sum));
      }
      DiscreteDistr distr = prepareDistr(label);
      for(Object key : keys) {
          out.item(key, data.get(key));
          distr.inc(key, (int) data.get(key).sum());
      }
      addTest2Out(distr, label, reference);
      out.finish(sum);
    }