From: František Dvořák Date: Thu, 7 Sep 2006 16:20:48 +0000 (+0000) Subject: Sort by IPAW_STAGE. X-Git-Tag: glite-jp-index_R_1_2_2~9 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=7a023478ea21d90cbcccd133f600b8fc52676ad9;p=jra1mw.git Sort by IPAW_STAGE. --- diff --git a/org.glite.jp.index/examples/pch06/query1.pl b/org.glite.jp.index/examples/pch06/query1.pl index a2c30a8..50b8a5a 100644 --- a/org.glite.jp.index/examples/pch06/query1.pl +++ b/org.glite.jp.index/examples/pch06/query1.pl @@ -1,9 +1,14 @@ #! /usr/bin/perl # -# first query implementation +# 1. query: +# +# Find the process that led to Atlas X Graphic / everything that caused Atlas X +# Graphic to be as it is. This should tell us the new brain images from which +# the averaged atlas was generated, the warping performed etc. +# # call: -# ./query1.pl OUTPUT_FILE_NAME 2>/dev/null +# ./query2.pl OUTPUT_FILE_NAME 2>/dev/null # use strict; @@ -26,7 +31,7 @@ if ($#ARGV + 1 != 1) { $output = $ARGV[0]; # debug calls -$pch::debug = 1; +$pch::debug = 0; my $debug = 0; # @@ -79,6 +84,10 @@ foreach my $jobid (@according_jobs) { $according_count++; } +foreach my $jobid (@according_jobs) { + my @attrs2 = pch::psquery($ps, $jobid, "$pch::jplbtag:IPAW_STAGE"); + $according_jobs{$jobid} = $attrs2[0]; +} # # queries on result set @@ -86,7 +95,7 @@ foreach my $jobid (@according_jobs) { print "Results\n"; print "=======\n"; print "\n"; -foreach my $jobid (keys %according_jobs) { +foreach my $jobid (sort { $according_jobs{$b} <=> $according_jobs{$a} } keys %according_jobs) { print "jobid $jobid:\n"; # query & output all desired atributes