From 7a023478ea21d90cbcccd133f600b8fc52676ad9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Thu, 7 Sep 2006 16:20:48 +0000 Subject: [PATCH] Sort by IPAW_STAGE. --- org.glite.jp.index/examples/pch06/query1.pl | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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 -- 1.8.2.3