private List<List<Civar.ElementOffset>> generateElementOffsetRecords(final List<String> haplotypes, final List<Civar> unrolledCivars, final int readCount, final int readLength, final int count) {
final List<List<Civar.ElementOffset>> result = new ArrayList<>(readCount);
for (int i = 0; i < readCount; i++) {
int hi = i % unrolledCivars.size();
final Civar c = unrolledCivars.get(hi);
final String h = haplotypes.get(hi);
int offset = h.length() <= readLength ? 0 : i % (h.length() - readLength);
int to = Math.min(h.length(),offset + readLength);
result.add(c.eventOffsets(reference,offset,to));
}
return result;
}