Package glue :: Package segmentdb :: Module segmentdb_utils
[hide private]
[frames] | no frames]

Module segmentdb_utils

source code

Functions [hide private]
 
add_segment_info(doc, proc_id, segdefs, segments, segment_summaries) source code
 
add_to_segment(xmldoc, proc_id, seg_def_id, sgmtlist) source code
 
add_to_segment_definer(xmldoc, proc_id, ifo, name, version, comment='') source code
 
add_to_segment_summary(xmldoc, proc_id, seg_def_id, sgmtlist, comment='') source code
 
build_segment_list(engine, gps_start_time, gps_end_time, ifo, segment_name, version=None, start_pad=0, end_pad=0)
Optains a list of segments for the given ifo, name and version between the specified times.
source code
 
build_segment_list_one(engine, gps_start_time, gps_end_time, ifo, segment_name, version=None, start_pad=0, end_pad=0)
Builds a list of segments satisfying the given criteria
source code
 
ensure_segment_table(connection)
Ensures that the DB represented by connection posses a segment table.
source code
 
expand_version_number(engine, segdef) source code
 
find_segments(doc, key, use_segment_table=True) source code
 
get_all_files_in_range(dirname, starttime, endtime, pad=64)
Returns all files in dirname and all its subdirectories whose names indicate that they contain segments in the range starttime to endtime
source code
 
query_segments(engine, table, segdefs) source code
 
run_query_segments(doc, proc_id, engine, gps_start_time, gps_end_time, included_segments_string, excluded_segments_string=None, write_segments=True, start_pad=0, end_pad=0)
Runs a segment query.
source code
 
setup_database(database_location)
Determine protocol
source code
 
split_segment_ids(segment_ids)
Given an array of strings of the form ifo:name and ifo:name:version, returns an array of tuples of the form (ifo, name, version) where version may be None
source code
Variables [hide private]
  __package__ = 'glue.segmentdb'
Function Details [hide private]

build_segment_list(engine, gps_start_time, gps_end_time, ifo, segment_name, version=None, start_pad=0, end_pad=0)

source code 

Optains a list of segments for the given ifo, name and version between the specified times. If a version is given the request is straightforward and is passed on to build_segment_list_one. Otherwise more complex processing is performed (not yet implemented)

ensure_segment_table(connection)

source code 

Ensures that the DB represented by connection posses a segment table. If not, creates one and prints a warning to stderr

run_query_segments(doc, proc_id, engine, gps_start_time, gps_end_time, included_segments_string, excluded_segments_string=None, write_segments=True, start_pad=0, end_pad=0)

source code 

Runs a segment query. This was originally part of ligolw_query_segments, but now is also used by ligolw_segments_from_cats.

The write_segments option is provided so callers can coalesce segments obtained over sever invocations (as segments_from_cats does).