add CDF menu
cast to correct before calling event_detector

if too slow specialized loop has to be implemented in C
add preliminary .bdat support