|
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 an ilwd file or ilwd sent from another
api, converts the ilwd object to LIGO_LW document.
Calling convention (all on a single line):
ldasJob { -name "username" -password "********" -email "user@foobar.edu"} {ILwd2Lw -ingestdata URL -returnprotocol URL -ingestdataapi URL -outputformat LIGO_LW -subject {freeform string} }
Option Descriptions:
-ingestdata:
http ftp file
NOTES:
-ingestdataapi: api
-subject: {subject for the return e-mail}
Examples of ILwd2Lw 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:
Output created by ligolw API in LIGO_LW format in the job output directory:
TrigMgr20010307234636000002010000.xml
Optional: only needed when requesting an ilwd file be converted
into a LIGO_LW document.
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 ilwd format. A file
extension of ".ilwd" is required to identify a ilwd file;
The URL must be valid for the command to be successfully executed.
Optional: only needed when requesting ilwd to be sent to
an api for processing, e.g. use within the putMetaData command.
The argument of the -ingestdataapi option the api to send
the ilwd converted from the LIGO_LW document.
Default: {}
Default: "jobID completed"
String to be used as the subject for the e-mail returned by the
system on completion of the job.
#!/bin/sh
# use -*-Tcl-*- \
exec tclsh "$0" "$@"
# convenient formatted command definition
set cmd "ldasJob
{ -name foo -password **** -email foo@foobar.edu }
{
ILwd2Lw
# subject to be used when e-mailing user
-subject {test script for ILwd2Lw}
# input url for converting
-ingestdata file:/ldas_usr/ldas/test/database/TrigMgr20010307234636000002010000.ilwd
# ilwd format for output ilwd (optional)
-outputformat LIGO_LW
# returnprotocol has the name of output file, directory structure is ignored.
-returnprotocol file:TrigMgr20010307234636000002010000.xml
}"
# 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:
Return to Top