Total cross sections of π±, K±, p and p on protons and deuterons between 200 and 370 GeV/c