At what point in the process of becoming president is the nominee of a party generally known?

Before the primary election

Before the convention

During the convention

During the general election