hps-java/src/main/java/org/lcsim/hps/monitoring
diff -u -r1.1 -r1.2
--- EcalMonitoringPlots.java 4 Apr 2012 23:26:07 -0000 1.1
+++ EcalMonitoringPlots.java 5 Apr 2012 23:58:19 -0000 1.2
@@ -21,7 +21,7 @@
AIDA aida = AIDA.defaultInstance();
IPlotter plotter;
- IHistogram2D cellEnergyPlot;
+ IHistogram2D hitCountPlot;
IDDecoder dec;
@@ -54,7 +54,7 @@
// Setup plots.
aida.tree().cd("/");
- cellEnergyPlot = aida.histogram2D("Crystal Energy", 47, -23.5, 23.5, 11, -5.5, 5.5);
+ hitCountPlot = aida.histogram2D(detector.getDetectorName() + " : " + rawCalorimeterHitCollectionName + " : Hit Count", 47, -23.5, 23.5, 11, -5.5, 5.5);
// Create the plotter regions.
plotter.createRegion();
@@ -62,7 +62,7 @@
IPlotterStyle style = plotter.region(0).style();
style.setParameter("hist2DStyle","colorMap");
style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow");
- plotter.region(0).plot(cellEnergyPlot);
+ plotter.region(0).plot(hitCountPlot);
((PlotterRegion)plotter.region(0)).getPlot().setAllowUserInteraction(false);
((PlotterRegion)plotter.region(0)).getPlot().setAllowPopupMenus(false);
plotter.show();
@@ -72,13 +72,17 @@
List<RawCalorimeterHit> hits = event.get(RawCalorimeterHit.class, rawCalorimeterHitCollectionName);
for (RawCalorimeterHit hit : hits) {
dec.setID(hit.getCellID());
- cellEnergyPlot.fill(dec.getValue("ix"), dec.getValue("iy"));
+ hitCountPlot.fill(dec.getValue("ix"), dec.getValue("iy"));
}
}
+
+ public void endOfData() {
+ plotter.hide();
+ }
public void reset() {
plotter.hide();
- cellEnergyPlot.reset();
+ hitCountPlot.reset();
detectorChanged(detector);
}
}