Multi thread porting

Function storeBadEvents removed because it asks for the get and book of a ME in step1.
please remove the endRun in the clients