A hierarchically pipelined data acquisition system for single-photon avalanche diode array