Rinse and dry the tomatoes. Peel the garlic, remove the green core and slice it into chunks. Bring to the boil a pan with plenty of salted water, toss the spaghetti and cook them al dente.While the pasta is cooking place over a medium heat, add the oil and garlic and as soon as si oil is warm add the whole tomatoes, season with a pinch of salt and higher the heat.After a a short while the tomatoes will broken up. Tip them over with a wooden spoon to allow them to break them up completely, then season with salt and pepper.Once the spaghetti are al dente, drain them, add them to the basil and the tomato sauce and pour them in the same pan, off the heat stirring well. Toss them in the tureen with a sprinkle of grated pecorino.