From gapon@slac.stanford.edu Wed Aug 14 17:28:32 2013 Date: Wed, 14 Aug 2013 17:28:31 -0700 From: "Gaponenko, Igor" To: "Dubrovin, Mikhail" Cc: "Gaponenko, Igor" Subject: Fetching detector names from the database (instead of scanning XTC files) Bring the following tag into your release: addpkg RegDB V00-01-14 Then do: scons And you can see a simple test by running: python arch/x86_64-rhel5-gcc41-opt/python/RegDB/experiment_info.pyc From your Python code do: from RegDB import experiment_info detectors = experiment_info.detectors('XPP','xppa4513',1) print detectors ['BldEb-0|NoDevice-0', 'EpicsArch-0|NoDevice-0', 'NoDetector-0|Evr-0', 'XppEndstation-0|Opal1000-2', 'XppGon-0|Cspad-0', 'XppSb4Pim-1|Tm6740-1'] If you want to know which runs (and WHAT kind of runs) exist for the specified experiment do: runs = experiment_info.experiment_runs('XPP','xppa4513') print runs [{'begin_time': 1375417636042155759L, 'begin_time_unix': 1375417636, 'end_time': 1375417646535192694L, 'end_time_unix': 1375417646, 'exper_id': 329L, 'id': 69762L, 'num': 1L, 'type': 'DATA'}, {'begin_time': 1375437784068608263L, 'begin_time_unix': 1375437784, 'end_time': 1375437816700510685L, 'end_time_unix': 1375437816, 'exper_id': 329L, 'id': 69763L, 'num': 2L, 'type': 'DATA'}, .. {'begin_time': 1375806447772306081L, 'begin_time_unix': 1375806447, 'end_time': 1375806491980944918L, 'end_time_unix': 1375806491, 'exper_id': 329L, 'id': 70074L, 'num': 189L, 'type': 'DATA'}] The run number is given by key: 'num': 189L Also note the last key of the dictionary: 'type': 'DATA' That is for normal data runs. A guess the idea is that people were able to change that to specify: 'type': 'CALIB' This is already supported by I don't think we have any experiment where they're using it. Regards, Igor