a pastry that he shaped like a three-cornered hat. It had a filling of raisins or some other dried fruit. I cannot remember either the name of the pastry or the historical story associated with the baking of these little hats.

Dub-dub, you're probably thinking of the hamentashen traditional served for the jewish Purim holiday. Purim, a time for heavy-duty revelry and partying, celebrates the events told in the biblical book of Esther. (By the way, is any other book of the bible named for a woman?)

recipies: http://jewishappleseed.org/apple/hamnrecp.htm
Purim overview: http://www.jewfaq.org/holiday9.htm