Use boost dynamic casting to determine primary events.