Revised interface of event_processor to make CastType inferred if possible.