Skip to content

Query diskcache server from Python bindings

Currently the LDAStools.diskCache Python subpackage seems basically empty:

>>> from LDAStools import diskCache
>>> dir(diskCache)
['BUILD__SWIG__LDAS_PYTHON_I', 'LDAS_DOC_PROTO_WITHOUT_TYPES', 'LDAS_DOC_PROTO_WITH_TYPES', 'LDAStools', '_SwigNonDynamicMeta', '__builtin__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_diskCache', '_swig_add_metaclass', '_swig_new_instance_method', '_swig_new_static_method', '_swig_python_version_info', '_swig_repr', '_swig_setattr_nondynamic_class_variable', '_swig_setattr_nondynamic_instance_variable']

It would be great to be able to directly query a diskcache server for filenames from Python, at least to reproduce this sort of result (from ldas-pcdev1.ligo.caltech.edu today):

$ diskcache --host ldr.ldas.cit --port 11300 filenames --extension .gwf --ifo-type-list H-H1_HOFT_C00
--start-time $(lal_tconvert May 16)
/archive/frames/ER15/hoft_C00/H1/H-H1_HOFT_C00-136/H-H1_HOFT_C00-1368227840-4096.gwf
/archive/frames/ER15/hoft_C00/H1/H-H1_HOFT_C00-136/H-H1_HOFT_C00-1368231936-4096.gwf
/archive/frames/ER15/hoft_C00/H1/H-H1_HOFT_C00-136/H-H1_HOFT_C00-1368236032-4096.gwf
/archive/frames/ER15/hoft_C00/H1/H-H1_HOFT_C00-136/H-H1_HOFT_C00-1368240128-4096.gwf
/archive/frames/ER15/hoft_C00/H1/H-H1_HOFT_C00-136/H-H1_HOFT_C00-1368244224-4096.gwf
/archive/frames/ER15/hoft_C00/H1/H-H1_HOFT_C00-136/H-H1_HOFT_C00-1368248320-4096.gwf
/archive/frames/ER15/hoft_C00/H1/H-H1_HOFT_C00-136/H-H1_HOFT_C00-1368252416-4096.gwf
/archive/frames/ER15/hoft_C00/H1/H-H1_HOFT_C00-136/H-H1_HOFT_C00-1368256512-4096.gwf
/archive/frames/ER15/hoft_C00/H1/H-H1_HOFT_C00-136/H-H1_HOFT_C00-1368260608-4096.gwf
/archive/frames/ER15/hoft_C00/H1/H-H1_HOFT_C00-136/H-H1_HOFT_C00-1368264704-4096.gwf
/archive/frames/ER15/hoft_C00/H1/H-H1_HOFT_C00-136/H-H1_HOFT_C00-1368268800-4096.gwf

However, if we get this far, this effectively reproduces the sort of query that the gwdatafind server can/should perform - so I am (a little) concerned about developing out the same features in two different places. This development should be coordinated with the gwdatafind server team (cc @duncan.meacher) to make sure we aren't duplicating effort.