Cut butter into cubes. Mix flour, 1/2 tsp salt, butter and 5-6 tbsp cold water with your fingers to a smooth dough. Press dough flat, wrap in foil and chill for about 30 minutes.
Wash the rosemary, shake dry and pluck roughly. Wash the tomatoes, cut in half lengthwise and remove the stalk. Season cut surfaces with salt and pepper, place tomatoes with the cut surface facing down on a baking tray lined with baking paper, sprinkle with rosemary, except for a little to garnish.
Drizzle oil over it and bake in a preheated oven (electric cooker: 200°C/ convection oven: 175 °C/ gas: see manufacturer) for 15-20 minutes. Take out and drain on kitchen paper.
Meanwhile grate cheese. Roll out the dough on a floured work surface until round (approx. 30 cm Ø). Grease a tart mould with lift-off base (approx. 26 cm Ø). Place the dough inside and press the protruding edges firmly inwards.
Whisk eggs, milk and cheese together. Season with salt and pepper. Pour cheese cream on the bottom. Spread tomatoes on top and bake in the preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: see manufacturer) for 20-30 minutes.
Take out, let it cool down a little and remove from the mould. Garnish with rosemary and serve hot or cold.