Open out the pastry on a lightly floured surface. Overlap the ham on one half, then spread with the fresh pesto. Arrange the Boursin cheese and tomatoes on top. Brush the pastry edge with beaten egg, fold over the other half of pastry and seal well. Crimp the edges and make slashes across the top of the pastry.
Brush with more egg and bake at 200°C/fan180°C/gas 6 for 20-25 minutes, until risen and golden.