Index: trunk/tools/czartool/Gpc1Db.pm
===================================================================
--- trunk/tools/czartool/Gpc1Db.pm	(revision 28704)
+++ trunk/tools/czartool/Gpc1Db.pm	(revision 28719)
@@ -73,4 +73,24 @@
 ###########################################################################
 #
+# Returns priority for this label
+#
+###########################################################################
+sub getPriority {
+    my ($self, $label) = @_;
+
+    my $query = $self->{_db}->prepare(<<SQL);
+    SELECT priority 
+        FROM Label 
+        WHERE label LIKE '$label' 
+SQL
+
+        $query->execute;
+    my $priority = scalar $query->fetchrow_array();
+    if (!$priority) {return 50000;} # assume labels not given priority in gpc1 Db have highest priority
+    return $priority;
+}
+
+###########################################################################
+#
 # Returns count of exposures with this state for this label
 #
