  Inside the moduli space of curves of genus 2 with 2 marked points we consider
the loci of curves admitting a map to P^1 of degree d totally ramified over the
two marked points, for d>= 2. Such loci have codimension two. We compute the
class of their compactifications in the moduli space of stable curves. Several
results will be deduced from this computation.
