diff --git a/script/setup/Layout.py b/script/setup/Layout.py index d88f375..c232a5b 100644 --- a/script/setup/Layout.py +++ b/script/setup/Layout.py @@ -159,6 +159,25 @@ def clear_detection(block_id=None): for puck in get_pucks(block_id): puck.detect = DET_ERROR + +def get_puck_detection(det_type, block_id=None): + ret = [] + for puck in get_pucks(block_id): + if puck.detect == det_type: + ret.append(puck.id) + return ret + +def get_unipucks(block_id=None): + return get_puck_detection(DET_UNIPUCK, block_id) + +def get_minispines(block_id=None): + return get_puck_detection(DET_MINISPINE, block_id) + +def get_empties(block_id=None): + return get_puck_detection(DET_EMPTY, block_id) + +def get_det_errors(block_id=None): + return get_puck_detection(DET_ErrorK, block_id) ################################################################################################### #Plotting ###################################################################################################