Commit in hps-java/src/main/java/org/lcsim/hps/monitoring on MAIN
EcalDaqPlots.java+14-81.1 -> 1.2
fix reset

hps-java/src/main/java/org/lcsim/hps/monitoring
EcalDaqPlots.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- EcalDaqPlots.java	13 Apr 2012 00:07:25 -0000	1.1
+++ EcalDaqPlots.java	18 Apr 2012 21:06:19 -0000	1.2
@@ -4,9 +4,9 @@
 import hep.aida.IPlotter;
 import hep.aida.IPlotterStyle;
 import hep.aida.ref.plotter.PlotterRegion;
-
 import jas.hist.JASHist;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import org.lcsim.event.EventHeader;
@@ -19,12 +19,13 @@
 
 public class EcalDaqPlots extends Driver implements Resettable {
     
-    String subdetectorName;
-    String inputCollection;
-    HPSEcalDaqIDConverter idMap;
-    IPlotter plotter;
-    AIDA aida;
-    Detector detector;
+    private String subdetectorName;
+    private String inputCollection;
+    private HPSEcalDaqIDConverter idMap;
+    private IPlotter plotter;
+    private AIDA aida;
+    private Detector detector;
+    private List<IHistogram1D> plots;
     
     public EcalDaqPlots() {}
     
@@ -56,6 +57,7 @@
     }
     
     private void setupPlots() {
+        plots = new ArrayList<IHistogram1D>();
         aida = AIDA.defaultInstance();
         aida.tree().cd("/");
         plotter = aida.analysisFactory().createPlotterFactory().create("HPS ECAL DAQ Plots");
@@ -67,8 +69,9 @@
         int region = 0;
         for (int i=0; i<14; i++) { // slot
             for (int j=1; j<3; j++) { // crate                
-                System.out.println("creating plot: " + "ECAL: Crate " + j + "; Slot " + i + " in region " + region);
+                //System.out.println("creating plot: " + "ECAL: Crate " + j + "; Slot " + i + " in region " + region);
                 IHistogram1D hist = aida.histogram1D("ECAL: Crate " + j + "; Slot " + i, 16, 0, 16);
+                plots.add(hist);
                 plotter.region(region).plot(hist);
                 JASHist jhist = ((PlotterRegion)plotter.region(region)).getPlot();
                 jhist.setAllowUserInteraction(false);
@@ -88,6 +91,9 @@
         if (plotter != null) {
             plotter.hide();
             plotter.destroyRegions();
+            for (IHistogram1D plot : plots) {
+                plot.reset();
+            }
             detectorChanged(detector);
         }
     }
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