Print

Print


Commit in hps-java/src/main/java/org/lcsim/hps/monitoring on MAIN
EtConnection.java+20-221.6 -> 1.7
minor tweaks

hps-java/src/main/java/org/lcsim/hps/monitoring
EtConnection.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- EtConnection.java	8 Apr 2012 23:48:11 -0000	1.6
+++ EtConnection.java	13 Apr 2012 00:57:13 -0000	1.7
@@ -6,6 +6,7 @@
 import org.jlab.coda.et.EtStationConfig;
 import org.jlab.coda.et.EtSystem;
 import org.jlab.coda.et.EtSystemOpenConfig;
+import org.jlab.coda.et.enums.Mode;
 
 /**
  * Create an EtSystem and EtAttachment from ConnectionParameters.
@@ -17,15 +18,12 @@
 	EtSystem sys;
 	EtAttachment att;
 	EtStation stat;
-	
-	//boolean usable;
-	
+		
 	private EtConnection(ConnectionParameters param, EtSystem sys, EtAttachment att, EtStation stat) {
 	    this.param = param;
 		this.sys = sys;
 		this.att = att;
 		this.stat = stat;
-		//this.usable = true; // Assume objects come from static createEtConnection() call so should be valid.
 	}
 	
 	EtSystem getEtSystem() {
@@ -45,24 +43,24 @@
 	}
 		
 	void cleanup() {
-	    //System.out.println("cleanup");
-	    try {
-	        //System.out.println("alive");
-	        //System.out.println("wakeUpAll");
-	        sys.wakeUpAll(stat);
-	        //System.out.println("detach");
-	        sys.detach(att);
-	        //System.out.println("stat");
-	        sys.removeStation(stat);
-	        //System.out.println("close");
-	        sys.close();
-	    } catch (Exception e) {
-	        e.printStackTrace();
-	    } 
-	    //finally {
-	    //    usable = false;
-	    //}
-	    System.out.println("done w/ cleanup");
+	    boolean debug = true;
+	    try {				
+            // sys.wakeUpAll(stat);
+            if (debug)
+                System.out.println("detach ...");
+            sys.detach(att);
+            if (debug)
+                System.out.println("removeStation ...");
+            sys.removeStation(stat);
+            if (debug)
+                System.out.println("close ...");
+            sys.close();
+            if (debug)
+                System.out.println("cleanup successful");
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+        }		
 	}
 	
 	static EtConnection createEtConnection(ConnectionParameters cn) {
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1