Put the sugar in a bowl, add the egg and mix well. Into this mixture, add the chopped tomatoes and the oil; stir to combine well. Sift the flour with the baking powder and cocoa, then add to the other ingredients, stirring until it is a smooth cream. When smooth, add the chocolate chips, and if using, the cinnamon and ground ginger. Butter a baking pan approximately 8 inches by 8 inches—square or round. Pour the mixture into the pan, sprinkle the surface with the almond flakes. Bake in a moderate, 350°F oven, for about 30 minutes (if using fan assisted, low the heat to about 320°F or 300°F, and check slightly earlier to see if cooked through).