Work and entropy production in generalised Gibbs ensembles