A man is in hospital after being struck by a car in a crowded cemetery in Dundalk during the annual blessing of the graves.