LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  April 2015

HPS-SVN April 2015

Subject:

r2723 - in /java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring: drivers/ecal/RawCalorimeterHitMonitoringDriver.java ecal/plots/EcalMonitoringUtilities.java ecal/plots/RawCalorimeterHitMonitoringDriver.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Thu, 16 Apr 2015 22:52:33 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (501 lines)

Author: [log in to unmask]
Date: Thu Apr 16 15:52:24 2015
New Revision: 2723

Log:
Merge together ECAL monitoring utilities.

Added:
    java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/RawCalorimeterHitMonitoringDriver.java
      - copied, changed from r2721, java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/drivers/ecal/RawCalorimeterHitMonitoringDriver.java
Removed:
    java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/drivers/ecal/RawCalorimeterHitMonitoringDriver.java
Modified:
    java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalMonitoringUtilities.java

Modified: java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalMonitoringUtilities.java
 =============================================================================
--- java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalMonitoringUtilities.java	(original)
+++ java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalMonitoringUtilities.java	Thu Apr 16 15:52:24 2015
@@ -1,53 +1,141 @@
 package org.hps.monitoring.ecal.plots;
+
+import hep.aida.IBaseHistogram;
+import hep.aida.ICloud1D;
+import hep.aida.IHistogram1D;
+import hep.aida.IHistogram2D;
+import hep.aida.IPlotter;
+import hep.aida.IPlotterFactory;
+import hep.aida.IPlotterStyle;
+import hep.aida.IProfile1D;
+import hep.aida.IProfile2D;
+import hep.aida.ref.plotter.style.registry.IStyleStore;
+import hep.aida.ref.plotter.style.registry.StyleRegistry;
+
+import org.lcsim.util.aida.AIDA;
 
 /**
  * Some simple utility methods for organizing ECAL monitoring plots.
- * 
+ *
  * @author Jeremy McCormick <[log in to unmask]>
  * @author Andrea Celentano <[log in to unmask]>
  * @author <[log in to unmask]>
  */
 public final class EcalMonitoringUtilities {
 
+    static AIDA aida = AIDA.defaultInstance();
+    static double CHANNELS_LOWER_EDGE_1D = 0.5;
+    static double CHANNELS_UPPTER_EDGE_1D = 441.5;
+    static final String EXTRA_DATA_RELATIONS_NAME = "EcalReadoutExtraDataRelations";
+
+    // FIXME: Copied from EcalRawConverterDriver.
+    static int INTEGRAL_WINDOW = 30;
+
+    static int N_BINS_X_2D = 47;
+
+    static int N_BINS_Y_2D = 11;
+
+    static int N_CHANNELS_1D = 442;
+
+    static double X_BIN_EDGE_2D = 23.25;
+
+    final static int XHOLESTART = -10;
+
+    final static int XHOLEWIDTH = 9;
+
     final static int XOFFSET = 23;
+    static double Y_BIN_EDGE_2D = 5.25;
     final static int YOFFSET = 5;
-    final static int XHOLEWIDTH = 9;
-    final static int XHOLESTART = -10;
-    
-    private EcalMonitoringUtilities() {        
-    }
-    
-    public static int getRowFromHistoID(int id) {
-        return (YOFFSET - (id % (2*YOFFSET+1)));
+
+    static IHistogram1D createChannelHistogram1D(final String name) {
+        return aida.histogram1D(name, N_CHANNELS_1D, CHANNELS_LOWER_EDGE_1D, CHANNELS_UPPTER_EDGE_1D);
     }
 
-    public static int getColumnFromHistoID(int id) {
-        return ((id / (2*YOFFSET+1)) - XOFFSET);
+    static IHistogram2D createChannelHistogram2D(final String name) {
+        return aida.histogram2D(name, N_BINS_X_2D, -X_BIN_EDGE_2D, X_BIN_EDGE_2D, N_BINS_Y_2D, -Y_BIN_EDGE_2D,
+                Y_BIN_EDGE_2D);
     }
 
-    public static int getHistoIDFromRowColumn(int row, int column) {
-        return (-row + YOFFSET) + (2*YOFFSET+1) * (column + XOFFSET);
+    static IProfile1D createChannelProfile1D(final String name) {
+        return aida.profile1D(name, N_CHANNELS_1D, CHANNELS_LOWER_EDGE_1D, CHANNELS_UPPTER_EDGE_1D);
     }
 
-    public static Boolean isInHole(int row, int column) {
+    static IProfile2D createChannelProfile2D(final String name) {
+        return aida.profile2D(name, N_BINS_X_2D, -X_BIN_EDGE_2D, X_BIN_EDGE_2D, N_BINS_Y_2D, -Y_BIN_EDGE_2D,
+                Y_BIN_EDGE_2D);
+    }
+
+    public static int getChannelIdFromRowColumn(final int row, final int col) {
+        final int ix = col + XOFFSET + (col > 0 ? -1 : 0);
+        final int iy = row + YOFFSET + (row > 0 ? -1 : 0);
+        int cid = ix + 2 * XOFFSET * (2 * YOFFSET - iy - 1) + 1;
+        if (row == 1 && col >= XHOLESTART) {
+            cid -= XHOLEWIDTH;
+        } else if (row == -1 && col < XHOLESTART) {
+            cid -= XHOLEWIDTH;
+        } else if (row < 0) {
+            cid -= 2 * XHOLEWIDTH;
+        }
+        return cid;
+    }
+
+    // TODO: add more range constants for common quantities like hit energy, timestamp, ADC values, cluster position,
+    // etc.
+
+    public static int getColumnFromHistoID(final int id) {
+        return id / (2 * YOFFSET + 1) - XOFFSET;
+    }
+
+    public static int getHistoIDFromRowColumn(final int row, final int column) {
+        return -row + YOFFSET + (2 * YOFFSET + 1) * (column + XOFFSET);
+    }
+
+    static IPlotterStyle getPlotterStyle(final IBaseHistogram histogram) {
+        final StyleRegistry styleRegistry = StyleRegistry.getStyleRegistry();
+        final IStyleStore store = styleRegistry.getStore("DefaultStyleStore");
+        IPlotterStyle style = null;
+        if (histogram instanceof IHistogram1D || histogram instanceof ICloud1D || histogram instanceof IProfile1D) {
+            style = store.getStyle("DefaultHistogram1DStyle");
+        } else if (histogram instanceof IHistogram2D || histogram instanceof IProfile2D) {
+            style = store.getStyle("DefaultColorMapStyle");
+        }
+        if (style == null) {
+            throw new RuntimeException("A default style could not be found for " + histogram.title());
+        }
+        return style;
+    }
+
+    public static int getRowFromHistoID(final int id) {
+        return YOFFSET - id % (2 * YOFFSET + 1);
+    }
+
+    public static Boolean isInHole(final int row, final int column) {
         if (row == 1 || row == -1) {
-            if (column < XHOLESTART+XHOLEWIDTH && column >= XHOLESTART) {
+            if (column < XHOLESTART + XHOLEWIDTH && column >= XHOLESTART) {
                 return true;
             }
+        } else if (row == 0) {
+            return true;
+        } else if (column == 0) {
+            return true;
         }
-        else if (row == 0) return true;
-        else if (column ==0) return true;
         return false;
     }
-    
-    public static int getChannelIdFromRowColumn(int row, int col)
-    {
-        int ix = col + XOFFSET + (col>0 ? -1 : 0);
-        int iy = row + YOFFSET + (row>0 ? -1 : 0);
-        int cid = ix + 2*XOFFSET*(2*YOFFSET-iy-1) + 1;
-        if      (row== 1 && col>=XHOLESTART) cid -= XHOLEWIDTH;
-        else if (row==-1 && col< XHOLESTART) cid -= XHOLEWIDTH;
-        else if (row < 0)                    cid -= 2*XHOLEWIDTH;
-        return cid; 
+
+    static IPlotter plot(final IPlotterFactory plotterFactory, final IBaseHistogram histogram, IPlotterStyle style,
+            final boolean show) {
+        if (style == null) {
+            style = getPlotterStyle(histogram);
+        }
+        final IPlotter plotter = plotterFactory.create(histogram.title());
+        plotter.createRegion();
+        plotter.region(0).plot(histogram, style);
+        if (show) {
+            plotter.show();
+        }
+        return plotter;
+    }
+
+    private EcalMonitoringUtilities() {
     }
 }

Copied: java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/RawCalorimeterHitMonitoringDriver.java (from r2721, java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/drivers/ecal/RawCalorimeterHitMonitoringDriver.java)
 =============================================================================
--- java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/drivers/ecal/RawCalorimeterHitMonitoringDriver.java	(original)
+++ java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/RawCalorimeterHitMonitoringDriver.java	Thu Apr 16 15:52:24 2015
@@ -1,10 +1,5 @@
-package org.hps.monitoring.drivers.ecal;
-
-import static org.hps.monitoring.drivers.ecal.EcalMonitoringUtilities.EXTRA_DATA_RELATIONS_NAME;
-import static org.hps.monitoring.drivers.ecal.EcalMonitoringUtilities.INTEGRAL_WINDOW;
-import static org.hps.monitoring.drivers.ecal.EcalMonitoringUtilities.createChannelHistogram2D;
-import static org.hps.monitoring.drivers.ecal.EcalMonitoringUtilities.createChannelProfile2D;
-import static org.hps.monitoring.drivers.ecal.EcalMonitoringUtilities.plot;
+package org.hps.monitoring.ecal.plots;
+
 import hep.aida.ICloud1D;
 import hep.aida.IHistogram1D;
 import hep.aida.IHistogram2D;
@@ -37,104 +32,70 @@
 
 /**
  * This is a set of detailed plots for monitoring ECAL raw data collections in integral mode (modes 3 and 7).
- * 
+ *
  * @author Jeremy McCormick <[log in to unmask]>
  */
 public class RawCalorimeterHitMonitoringDriver extends Driver {
 
-    ICloud1D pedSubAmplitudeC1D;
-    IHistogram1D amplitudeH1D;
-    ICloud1D timestampC1D;
-    ICloud1D amplitudeLowC1D;
-    ICloud1D amplitudeHighC1D;
-    IHistogram1D hitsPerEventH1D;
-    IHistogram2D hitMapH2D;
-    IHistogram2D occupancyH2D;
-    IProfile2D amplitudeHighP2D;
-    IProfile2D amplitudeLowP2D;
-    IProfile2D timestampP2D;
-
-    Map<Long, Integer> occupancyMap = new HashMap<Long, Integer>();
-    int accumulatedEvents = 0;
-    long lastUpdatedMillis = 0;
-    long occupancyUpdateMillis = 5000; // Refresh occupancy plots every 5 seconds.
-
-    AIDA aida = AIDA.defaultInstance();
-
-    EcalConditions conditions;
-    
-    String rawCalorimeterHitCollectionName = "EcalReadoutHits";
-    Subdetector subdetector;
-    IIdentifierHelper helper;
-
-    public void setOccupancyUpdateMillis(long occupancyUpdateMillis) {
-        this.occupancyUpdateMillis = occupancyUpdateMillis;
-    }
-
-    public void setRawCalorimeterHitCollectionName(String rawCalorimeterHitCollectionName) {
-        this.rawCalorimeterHitCollectionName = rawCalorimeterHitCollectionName;
-    }
-
-    public void detectorChanged(Detector detector) {
-        DatabaseConditionsManager manager = DatabaseConditionsManager.getInstance();
-        conditions = manager.getCachedConditions(EcalConditions.class, "ecal_conditions").getCachedData();
-        subdetector = detector.getSubdetector("Ecal");
-        helper = subdetector.getDetectorElement().getIdentifierHelper();
-    }
-
-    public void startOfData() {
-        pedSubAmplitudeC1D = aida.cloud1D("Pedestal Sub Amplitude");
-        amplitudeH1D = aida.histogram1D("Amplitude", 150, 0.5, 14999.5);
-        timestampC1D = aida.cloud1D("Timestamp");
-        amplitudeLowC1D = aida.cloud1D("Mode 7 Amplitude Low");
-        amplitudeHighC1D = aida.cloud1D("Mode 7 Amplitude High");
-        hitsPerEventH1D = aida.histogram1D("Hits Per Event", 100, -0.5, 99.5);
-        hitMapH2D = createChannelHistogram2D("Hit Map");
-        occupancyH2D = createChannelHistogram2D("Hit Occupancy");
-        amplitudeHighP2D = createChannelProfile2D("Mode 7 Average Amplitude High");
-        amplitudeLowP2D = createChannelProfile2D("Mode 7 Average Amplitude Low");
-        timestampP2D = createChannelProfile2D("Average Timestamp");
-
-        IPlotterFactory plotterFactory = aida.analysisFactory().createPlotterFactory("ECAL - " + rawCalorimeterHitCollectionName);
-
-        plot(plotterFactory, pedSubAmplitudeC1D, null, true);
-        plot(plotterFactory, amplitudeH1D, null, true);
-        plot(plotterFactory, timestampC1D, null, true);
-        plot(plotterFactory, amplitudeLowC1D, null, true);
-        plot(plotterFactory, amplitudeHighC1D, null, true);
-        plot(plotterFactory, hitsPerEventH1D, null, true);
-        plot(plotterFactory, hitMapH2D, null, true);
-        plot(plotterFactory, occupancyH2D, null, true);
-        plot(plotterFactory, amplitudeHighP2D, null, true);
-        plot(plotterFactory, amplitudeLowP2D, null, true);
-        plot(plotterFactory, timestampP2D, null, true);
-
-        lastUpdatedMillis = System.currentTimeMillis();
-    }
-
-    public void process(EventHeader event) {
-                
-        if (event.hasCollection(RawCalorimeterHit.class, rawCalorimeterHitCollectionName)) {
-
-            List<RawCalorimeterHit> rawHits = event.get(RawCalorimeterHit.class, rawCalorimeterHitCollectionName);
+    private int accumulatedEvents = 0;
+    private final AIDA aida = AIDA.defaultInstance();
+    private IHistogram1D amplitudeH1D;
+    private ICloud1D amplitudeHighC1D;
+    private IProfile2D amplitudeHighP2D;
+    private ICloud1D amplitudeLowC1D;
+    private IProfile2D amplitudeLowP2D;
+    private EcalConditions conditions;
+    private IIdentifierHelper helper;
+    private IHistogram2D hitMapH2D;
+    private IHistogram1D hitsPerEventH1D;
+
+    private long lastUpdatedMillis = 0;
+    private IHistogram2D occupancyH2D;
+    private final Map<Long, Integer> occupancyMap = new HashMap<Long, Integer>();
+    private long occupancyUpdateMillis = 5000; // Refresh occupancy plots every 5 seconds.
+
+    private ICloud1D pedSubAmplitudeC1D;
+
+    private String rawCalorimeterHitCollectionName = "EcalReadoutHits";
+
+    private Subdetector subdetector;
+    private ICloud1D timestampC1D;
+    private IProfile2D timestampP2D;
+
+    @Override
+    public void detectorChanged(final Detector detector) {
+        final DatabaseConditionsManager manager = DatabaseConditionsManager.getInstance();
+        this.conditions = manager.getCachedConditions(EcalConditions.class, "ecal_conditions").getCachedData();
+        this.subdetector = detector.getSubdetector("Ecal");
+        this.helper = this.subdetector.getDetectorElement().getIdentifierHelper();
+    }
+
+    @Override
+    public void process(final EventHeader event) {
+
+        if (event.hasCollection(RawCalorimeterHit.class, this.rawCalorimeterHitCollectionName)) {
+
+            final List<RawCalorimeterHit> rawHits = event.get(RawCalorimeterHit.class,
+                    this.rawCalorimeterHitCollectionName);
 
             /*
              * Do basic plots of RawCalorimeterHit data.
              */
-            hitsPerEventH1D.fill(rawHits.size());
-            Set<RawCalorimeterHit> uniqueRawHits = new HashSet<RawCalorimeterHit>();
-            for (RawCalorimeterHit rawHit : rawHits) {
-                amplitudeH1D.fill(rawHit.getAmplitude());
-                timestampC1D.fill(rawHit.getTimeStamp());
-                EcalChannel channel = conditions.getChannelCollection().findGeometric(rawHit.getCellID());
-                EcalChannelConstants constants = conditions.getChannelConstants(channel);
-                pedSubAmplitudeC1D.fill(rawHit.getAmplitude() - (constants.getCalibration().getPedestal() * INTEGRAL_WINDOW));
-
-                int ix = helper.getValue(new Identifier(rawHit.getCellID()), "ix");
-                int iy = helper.getValue(new Identifier(rawHit.getCellID()), "iy");
-                hitMapH2D.fill(ix, iy);
-
-                timestampP2D.fill(ix, iy, rawHit.getTimeStamp());
+            this.hitsPerEventH1D.fill(rawHits.size());
+            final Set<RawCalorimeterHit> uniqueRawHits = new HashSet<RawCalorimeterHit>();
+            for (final RawCalorimeterHit rawHit : rawHits) {
+                this.amplitudeH1D.fill(rawHit.getAmplitude());
+                this.timestampC1D.fill(rawHit.getTimeStamp());
+                final EcalChannel channel = this.conditions.getChannelCollection().findGeometric(rawHit.getCellID());
+                final EcalChannelConstants constants = this.conditions.getChannelConstants(channel);
+                this.pedSubAmplitudeC1D.fill(rawHit.getAmplitude() - constants.getCalibration().getPedestal()
+                        * EcalMonitoringUtilities.INTEGRAL_WINDOW);
+
+                final int ix = this.helper.getValue(new Identifier(rawHit.getCellID()), "ix");
+                final int iy = this.helper.getValue(new Identifier(rawHit.getCellID()), "iy");
+                this.hitMapH2D.fill(ix, iy);
+
+                this.timestampP2D.fill(ix, iy, rawHit.getTimeStamp());
 
                 uniqueRawHits.add(rawHit);
             }
@@ -142,59 +103,101 @@
             /*
              * Update and plot occupancies based on unique hits in the event.
              */
-            for (RawCalorimeterHit rawHit : uniqueRawHits) {
+            for (final RawCalorimeterHit rawHit : uniqueRawHits) {
 
                 // Add entry if does not exist.
-                if (occupancyMap.get(rawHit.getCellID()) == null) {
-                    occupancyMap.put(rawHit.getCellID(), 0);
+                if (this.occupancyMap.get(rawHit.getCellID()) == null) {
+                    this.occupancyMap.put(rawHit.getCellID(), 0);
                 }
 
                 // Increment hit count by one for this hit.
-                int nHits = occupancyMap.get(rawHit.getCellID()) + 1;
-                occupancyMap.put(rawHit.getCellID(), nHits);
-            }
-            ++accumulatedEvents;
-            long elapsed = System.currentTimeMillis() - lastUpdatedMillis;
-            if (elapsed >= occupancyUpdateMillis) {
-                occupancyH2D.reset();
-                for (Entry<Long, Integer> entry : occupancyMap.entrySet()) {
-                    IIdentifier hitId = new Identifier(entry.getKey());
-                    int ix = helper.getValue(hitId, "ix");
-                    int iy = helper.getValue(hitId, "iy");
-                    occupancyH2D.fill(ix, iy, (double) entry.getValue() / (double) accumulatedEvents);
+                final int nHits = this.occupancyMap.get(rawHit.getCellID()) + 1;
+                this.occupancyMap.put(rawHit.getCellID(), nHits);
+            }
+            ++this.accumulatedEvents;
+            final long elapsed = System.currentTimeMillis() - this.lastUpdatedMillis;
+            if (elapsed >= this.occupancyUpdateMillis) {
+                this.occupancyH2D.reset();
+                for (final Entry<Long, Integer> entry : this.occupancyMap.entrySet()) {
+                    final IIdentifier hitId = new Identifier(entry.getKey());
+                    final int ix = this.helper.getValue(hitId, "ix");
+                    final int iy = this.helper.getValue(hitId, "iy");
+                    this.occupancyH2D.fill(ix, iy, (double) entry.getValue() / (double) this.accumulatedEvents);
                 }
-                lastUpdatedMillis = System.currentTimeMillis();
-                accumulatedEvents = 0;
-                occupancyMap.clear();
+                this.lastUpdatedMillis = System.currentTimeMillis();
+                this.accumulatedEvents = 0;
+                this.occupancyMap.clear();
             }
 
             /*
              * Plot from mode 7 data if it exists.
              */
-            if (event.hasCollection(LCRelation.class, EXTRA_DATA_RELATIONS_NAME)) {
-                List<LCRelation> extraDataRelations = event.get(LCRelation.class, EXTRA_DATA_RELATIONS_NAME);
+            if (event.hasCollection(LCRelation.class, EcalMonitoringUtilities.EXTRA_DATA_RELATIONS_NAME)) {
+                final List<LCRelation> extraDataRelations = event.get(LCRelation.class,
+                        EcalMonitoringUtilities.EXTRA_DATA_RELATIONS_NAME);
                 if (extraDataRelations != null) {
-                    for (LCRelation rel : event.get(LCRelation.class, EXTRA_DATA_RELATIONS_NAME)) {
-                        GenericObject extraData = (GenericObject) rel.getTo();
+                    for (final LCRelation rel : event.get(LCRelation.class,
+                            EcalMonitoringUtilities.EXTRA_DATA_RELATIONS_NAME)) {
+                        final GenericObject extraData = (GenericObject) rel.getTo();
                         if (extraData instanceof HitExtraData.Mode7Data) {
-                            HitExtraData.Mode7Data mode7Data = (HitExtraData.Mode7Data) extraData;
-                            amplitudeHighC1D.fill(mode7Data.getAmplHigh());
-                            amplitudeLowC1D.fill(mode7Data.getAmplLow());
-
-                            RawCalorimeterHit rawHit = (RawCalorimeterHit) rel.getFrom();
+                            final HitExtraData.Mode7Data mode7Data = (HitExtraData.Mode7Data) extraData;
+                            this.amplitudeHighC1D.fill(mode7Data.getAmplHigh());
+                            this.amplitudeLowC1D.fill(mode7Data.getAmplLow());
+
+                            final RawCalorimeterHit rawHit = (RawCalorimeterHit) rel.getFrom();
                             // FIXME: Duplicated from RawTrackerHit loop from above.
-                            int ix = helper.getValue(new Identifier(rawHit.getCellID()), "ix");
-                            int iy = helper.getValue(new Identifier(rawHit.getCellID()), "iy");
+                            final int ix = this.helper.getValue(new Identifier(rawHit.getCellID()), "ix");
+                            final int iy = this.helper.getValue(new Identifier(rawHit.getCellID()), "iy");
 
                             // Average amplitude high.
-                            amplitudeHighP2D.fill(ix, iy, mode7Data.getAmplHigh());
+                            this.amplitudeHighP2D.fill(ix, iy, mode7Data.getAmplHigh());
 
                             // Average amplitude low.
-                            amplitudeLowP2D.fill(ix, iy, mode7Data.getAmplLow());
+                            this.amplitudeLowP2D.fill(ix, iy, mode7Data.getAmplLow());
                         }
                     }
                 }
             }
         }
     }
+
+    public void setOccupancyUpdateMillis(final long occupancyUpdateMillis) {
+        this.occupancyUpdateMillis = occupancyUpdateMillis;
+    }
+
+    public void setRawCalorimeterHitCollectionName(final String rawCalorimeterHitCollectionName) {
+        this.rawCalorimeterHitCollectionName = rawCalorimeterHitCollectionName;
+    }
+
+    @Override
+    public void startOfData() {
+        this.pedSubAmplitudeC1D = this.aida.cloud1D("Pedestal Sub Amplitude");
+        this.amplitudeH1D = this.aida.histogram1D("Amplitude", 150, 0.5, 14999.5);
+        this.timestampC1D = this.aida.cloud1D("Timestamp");
+        this.amplitudeLowC1D = this.aida.cloud1D("Mode 7 Amplitude Low");
+        this.amplitudeHighC1D = this.aida.cloud1D("Mode 7 Amplitude High");
+        this.hitsPerEventH1D = this.aida.histogram1D("Hits Per Event", 100, -0.5, 99.5);
+        this.hitMapH2D = EcalMonitoringUtilities.createChannelHistogram2D("Hit Map");
+        this.occupancyH2D = EcalMonitoringUtilities.createChannelHistogram2D("Hit Occupancy");
+        this.amplitudeHighP2D = EcalMonitoringUtilities.createChannelProfile2D("Mode 7 Average Amplitude High");
+        this.amplitudeLowP2D = EcalMonitoringUtilities.createChannelProfile2D("Mode 7 Average Amplitude Low");
+        this.timestampP2D = EcalMonitoringUtilities.createChannelProfile2D("Average Timestamp");
+
+        final IPlotterFactory plotterFactory = this.aida.analysisFactory().createPlotterFactory(
+                "ECAL - " + this.rawCalorimeterHitCollectionName);
+
+        EcalMonitoringUtilities.plot(plotterFactory, this.pedSubAmplitudeC1D, null, true);
+        EcalMonitoringUtilities.plot(plotterFactory, this.amplitudeH1D, null, true);
+        EcalMonitoringUtilities.plot(plotterFactory, this.timestampC1D, null, true);
+        EcalMonitoringUtilities.plot(plotterFactory, this.amplitudeLowC1D, null, true);
+        EcalMonitoringUtilities.plot(plotterFactory, this.amplitudeHighC1D, null, true);
+        EcalMonitoringUtilities.plot(plotterFactory, this.hitsPerEventH1D, null, true);
+        EcalMonitoringUtilities.plot(plotterFactory, this.hitMapH2D, null, true);
+        EcalMonitoringUtilities.plot(plotterFactory, this.occupancyH2D, null, true);
+        EcalMonitoringUtilities.plot(plotterFactory, this.amplitudeHighP2D, null, true);
+        EcalMonitoringUtilities.plot(plotterFactory, this.amplitudeLowP2D, null, true);
+        EcalMonitoringUtilities.plot(plotterFactory, this.timestampP2D, null, true);
+
+        this.lastUpdatedMillis = System.currentTimeMillis();
+    }
 }

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use