|
ldasJob { -name {} -password {} -email {} } { userCmd -opt1 {} ... }
Which is in the format of a Tcl command, ldasJob, with two required arguments:
Given a valid url for a LIGO_LW, converts the LIGO_LW document to ilwd
Calling convention (all on a single line):
ldasJob { -name "username" -password "********" -email "user@foobar.edu"} {Lw2ILwd -ingestdata URL -returnprotocol URL -ingestdataapi URL -outputformat {ilwd ascii | ilwd binary} -subject {freeform string} }
Option Descriptions:
-ingestdata:
http ftp file
NOTES:
The argument of the -ingestdata option URL format
is of the format similar to
that of -returnprotocol. The URL specifies the source of
of the data to be ingested in xml format. A file
extension of ".xml" is required to identify a LIGO_LW file;
The URL must be valid for the command to be successfully executed.
Examples of Lw2ILwd commands:
Examples on how to use this command
This example presents a Tcl script which can be run from any computer with a network connection to submit a user command to the LDAS system:
#!/bin/sh
# use -*-Tcl-*- \
exec tclsh "$0" "$@"
# convenient formatted command definition
set cmd "ldasJob
{ -name foo -password **** -email foo@foobar.edu }
{
Lw2ILwd
# subject to be used when e-mailing user
-subject {test script for Lw2ILwd}
# input url for converting
-ingestdata file:/ldas_usr/ldas/test/database/TrigMgr20010307234636000002010000.xml
# ilwd format for output ilwd (optional)
-outputformat {ilwd ascii}
# returnprotocol has the name of output file, directory structure is ignored.
-returnprotocol file:TrigMgr20010307234636000002010000.ilwd
}"
# strip comments and compact cmd into user command format
set cmd [ split $cmd "\n" ]
foreach line $cmd {
set line [ string trim $line ]
if { [ regexp {^#} $line ] } {
continue
}
lappend tmp $line
}
set cmd [ join $tmp "\n" ]
regsub -all -- {[\n\s]+} $cmd { } cmd
# connect, issue command, print reply from manager,
# and disconnect
set sid [ socket ldas-dev.ligo.caltech.edu 10001 ]
puts $sid $cmd
flush $sid
puts [ read $sid ]
close $sid
Which submits this command to the system:
Output created by ligolw API in ilwd ascii format in the job output directory: TrigMgr20010307234636000002010000.ilwd
Return to Top