Print

Print


Author: [log in to unmask]
Date: Fri Jan 30 13:00:09 2015
New Revision: 2010

Log:
Localized the isTop() and isBottom() methods to the SSPSinglesTrigger and SSPCosmicTrigger classes only. These methods were not really defined for the SSPPairTrigger class nor the generic SSPTrigger, since the former always triggers off the top and bottom and can not really be a top or bottom trigger, and the latter is only used directly when the trigger type is not known, so no information about source crate can be inferred.

Modified:
    java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPCosmicTrigger.java
    java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPPairTrigger.java
    java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPSinglesTrigger.java
    java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPTrigger.java

Modified: java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPCosmicTrigger.java
 =============================================================================
--- java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPCosmicTrigger.java	(original)
+++ java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPCosmicTrigger.java	Fri Jan 30 13:00:09 2015
@@ -19,9 +19,21 @@
 		super(isTop ? SSPData.TRIG_TYPE_COSMIC_TOP : SSPData.TRIG_TYPE_COSMIC_BOT, time, 0);
 	}
 	
-	@Override
+	/**
+	 * Indicates whether the trigger was reported by the bottom SSP
+	 * crate or not.
+	 * @return Returns <code>true</code> if the trigger was reported
+	 * by the bottom crate and <code>false</code> if it was reported
+	 * by the top crate.
+	 */
 	public boolean isBottom() { return type == SSPData.TRIG_TYPE_COSMIC_BOT; }
 	
-	@Override
+	/**
+	 * Indicates whether the trigger was reported by the top SSP
+	 * crate or not.
+	 * @return Returns <code>true</code> if the trigger was reported
+	 * by the top crate and <code>false</code> if it was reported by
+	 * the bottom crate.
+	 */
 	public boolean isTop() { return type == SSPData.TRIG_TYPE_COSMIC_TOP; }
 }

Modified: java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPPairTrigger.java
 =============================================================================
--- java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPPairTrigger.java	(original)
+++ java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPPairTrigger.java	Fri Jan 30 13:00:09 2015
@@ -18,12 +18,6 @@
 	public SSPPairTrigger(boolean isFirstTrigger, int time, int data) {
 		super(isFirstTrigger ? SSPData.TRIG_TYPE_PAIR0 : SSPData.TRIG_TYPE_PAIR1, time, data);
 	}
-	
-	@Override
-	public boolean isBottom() { return true; }
-	
-	@Override
-	public boolean isTop() { return true; }
 	
 	/**
 	 * Indicates whether the trigger passed the pair energy sum cut

Modified: java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPSinglesTrigger.java
 =============================================================================
--- java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPSinglesTrigger.java	(original)
+++ java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPSinglesTrigger.java	Fri Jan 30 13:00:09 2015
@@ -25,12 +25,24 @@
 				time, data);
 	}
 	
-	@Override
+	/**
+	 * Indicates whether the trigger was reported by the bottom SSP
+	 * crate or not.
+	 * @return Returns <code>true</code> if the trigger was reported
+	 * by the bottom crate and <code>false</code> if it was reported
+	 * by the top crate.
+	 */
 	public boolean isBottom() {
 		return (type == SSPData.TRIG_TYPE_SINGLES0_BOT || type == SSPData.TRIG_TYPE_SINGLES1_BOT);
 	}
 	
-	@Override
+	/**
+	 * Indicates whether the trigger was reported by the top SSP
+	 * crate or not.
+	 * @return Returns <code>true</code> if the trigger was reported
+	 * by the top crate and <code>false</code> if it was reported by
+	 * the bottom crate.
+	 */
 	public boolean isTop() {
 		return (type == SSPData.TRIG_TYPE_SINGLES0_TOP || type == SSPData.TRIG_TYPE_SINGLES1_TOP);
 	}

Modified: java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPTrigger.java
 =============================================================================
--- java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPTrigger.java	(original)
+++ java/trunk/ecal-readout-sim/src/main/java/org/hps/readout/ecal/triggerbank/SSPTrigger.java	Fri Jan 30 13:00:09 2015
@@ -46,28 +46,6 @@
 	}
 	
 	/**
-	 * Indicates whether the trigger was reported by the bottom SSP
-	 * crate or not.
-	 * @return Returns <code>true</code> if the trigger was reported
-	 * by the bottom crate and <code>false</code> if it was reported
-	 * by the top crate.
-	 */
-	public boolean isBottom() {
-		return false;
-	}
-	
-	/**
-	 * Indicates whether the trigger was reported by the top SSP
-	 * crate or not.
-	 * @return Returns <code>true</code> if the trigger was reported
-	 * by the top crate and <code>false</code> if it was reported by
-	 * the bottom crate.
-	 */
-	public boolean isTop() {
-		return false;
-	}
-	
-	/**
 	 * Gets the raw, unparsed trigger data bank for this trigger.
 	 * @return Returns the trigger data bank as an <code>int</code>.
 	 */