  We compute analytically the distribution function P(E) for the energy E
acquired by a Fermi gas after being subjected to an arbitrary time-dependent
external potential (switching event). We relate the distribution function to a
solution of a matrix Riemann-Hilbert problem and present explicit formulae for
the low order cumulants of P(E). These general results are used to find the
distribution of dissipated energy in a biased quantum point contact.
