Generic particle-physics software trigger with flash ADCs