Author: [log in to unmask]
Date: Sat May 16 21:56:33 2015
New Revision: 2989
Log:
Removed support for TOP, BOTTOM, AND, and OR triggers from SSPData as well as TOP and BOTTOM triggers from SSPSinglesTrigger. These are test run specific parameters and are not supported by SSPData and its related classes. These same methods have been deprecated in TestRunTriggerData, though it retains the methods for the purpose of legacy compatability.
Modified:
java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/triggerbank/SSPData.java
java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/triggerbank/SSPSinglesTrigger.java
java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/triggerbank/TestRunTriggerData.java
Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/triggerbank/SSPData.java
=============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/triggerbank/SSPData.java (original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/triggerbank/SSPData.java Sat May 16 21:56:33 2015
@@ -197,22 +197,6 @@
}
/**
- * Gets the list of triggers reported by the SSP.<br/>
- * <br/>
- * <b>Note:</b> This method is now deprecated. Singles triggers
- * can be obtained with <code>getSinglesTriggers</code>, pair
- * triggers with <code>getPairTriggers</code>, and cosmic triggers
- * with <code>getCosmicTriggers</code>.
- * @return Returns the triggers as a <code>List</code> collection
- * of <code>SSPTrigger</code> objects. These can vary in which
- * subclass they are, as appropriate to their type code.
- */
- @Deprecated
- public List<SSPTrigger> getTriggers() {
- return triggerList;
- }
-
- /**
* Gets the trigger time reported by the SSP.
* @return Returns the trigger time as a <code>long</code>.
*/
@@ -223,99 +207,4 @@
* @return Returns the event number as an <code>int</code>.
*/
public int getEventNumber() { return eventNumber; }
-
- // TODO: Get information from Andrea on what this is for. It seems
- // to be something specialized. Maybe it should be placed in
- // the analysis driver in which it is used?
- /**
- * Gets the first singles trigger that occurred in either crate.
- * If no singles triggered occurred, a value of <code>1025 * 4 =
- * 4100</code> will be returned.
- * @return Returns the time in nanoseconds of the earliest singles
- * trigger that occurred, or <code>4100</code> if no singles trigger
- * has occurred.
- */
- @Deprecated
- public int getOrTrig() {
- // Get the earliest time for both the top and bottom triggers.
- int topTime = getTopTrig();
- int bottomTime = getBotTrig();
-
- // Return whichever crate had the earliest trigger.
- if (topTime <= bottomTime) { return topTime; }
- else { return bottomTime; }
- }
-
- // TODO: Get information from Andrea on what this is for. It seems
- // to be something specialized. Maybe it should be placed in
- // the analysis driver in which it is used?
- /**
- * Gets the first singles trigger that occurred in the top crate.
- * If no singles triggered occurred, a value of <code>1025 * 4 =
- * 4100</code> will be returned.
- * @return Returns the time in nanoseconds of the earliest singles
- * trigger that occurred, or <code>4100</code> if no singles trigger
- * has occurred.
- */
- @Deprecated
- public int getTopTrig() {
- // Store the smallest found time. The time is a 10 bit value,
- // so it must always be less than 1024. Multiply by 4 to convert
- // from clock-cycles to nanoseconds.
- int topTime = 1025 * 4;
-
- // Iterate over all triggers.
- for(SSPTrigger trigger : triggerList) {
- // Select only singles triggers from the top crate.
- if(trigger instanceof SSPSinglesTrigger && ((SSPSinglesTrigger) trigger).isTop()) {
- // Store the smallest trigger time found.
- if(trigger.getTime() < topTime) {
- topTime = trigger.getTime();
- }
- }
- }
-
- // Return the smallest found time.
- return topTime;
- }
-
- // TODO: Get information from Andrea on what this is for. It seems
- // to be something specialized. Maybe it should be placed in
- // the analysis driver in which it is used?
- /**
- * Gets the first singles trigger that occurred in the bottom crate.
- * If no singles triggered occurred, a value of <code>1025 * 4 =
- * 4100</code> will be returned.
- * @return Returns the time in nanoseconds of the earliest singles
- * trigger that occurred, or <code>4100</code> if no singles trigger
- * has occurred.
- */
- @Deprecated
- public int getBotTrig() {
- // Store the smallest found time. The time is a 10 bit value,
- // so it must always be less than 1024. Multiply by 4 to convert
- // from clock-cycles to nanoseconds.
- int bottomTime = 1025 * 4;
-
- // Iterate over all triggers.
- for(SSPTrigger trigger : triggerList) {
- // Select only singles triggers from the bottom crate.
- if(trigger instanceof SSPSinglesTrigger && ((SSPSinglesTrigger) trigger).isBottom()) {
- // Store the smallest trigger time found.
- if(trigger.getTime() < bottomTime) {
- bottomTime = trigger.getTime();
- }
- }
- }
-
- // Return the smallest found time.
- return bottomTime;
- }
-
- // TODO: This does not seem to do anything. Can it be deleted? It
- // is also not used anywhere.
- @Deprecated
- public int getAndTrig() {
- return 0;
- }
}
Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/triggerbank/SSPSinglesTrigger.java
=============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/triggerbank/SSPSinglesTrigger.java (original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/triggerbank/SSPSinglesTrigger.java Sat May 16 21:56:33 2015
@@ -25,17 +25,6 @@
time, data);
}
- /**
- * 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
public boolean isFirstTrigger() {
return (type == SSPData.TRIG_TYPE_SINGLES0_BOT) || (type == SSPData.TRIG_TYPE_SINGLES0_TOP);
@@ -44,17 +33,6 @@
@Override
public boolean isSecondTrigger() {
return (type == SSPData.TRIG_TYPE_SINGLES1_BOT) || (type == SSPData.TRIG_TYPE_SINGLES1_TOP);
- }
-
- /**
- * 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-recon/src/main/java/org/hps/recon/ecal/triggerbank/TestRunTriggerData.java
=============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/triggerbank/TestRunTriggerData.java (original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/triggerbank/TestRunTriggerData.java Sat May 16 21:56:33 2015
@@ -8,75 +8,80 @@
* @version $Id: TriggerData.java,v 1.3 2012/08/03 23:14:39 meeg Exp $
*/
public class TestRunTriggerData extends AbstractIntData {
-
+
public static final int BANK_TAG = 0xe106;
public static final int BANK_SIZE = 8;
-
+
public static final int OR_TRIG = 3;
public static final int TOP_TRIG = 4;
public static final int BOT_TRIG = 5;
public static final int AND_TRIG = 6;
public static final int TIME = 7;
public static final String TRIG_COLLECTION = "TriggerBank";
-
-// protected TestRunTriggerData() {
-// super(null);
-// }
+
public TestRunTriggerData(int[] bank) {
super(bank);
decodeData();
}
-
+
public TestRunTriggerData(GenericObject data) {
super(data, BANK_TAG);
decodeData();
}
-
+
public long getTime() {
return bank[TIME] & 0xffffffffL;
}
-
+
+ @Deprecated
public int getOrTrig() {
return bank[OR_TRIG];
}
-
+
+ @Deprecated
public int getTopTrig() {
return bank[TOP_TRIG];
}
-
+
+ @Deprecated
public int getBotTrig() {
return bank[BOT_TRIG];
}
-
+
+ @Deprecated
public int getAndTrig() {
return bank[AND_TRIG];
}
-
+
public static long getTime(GenericObject object) {
return AbstractIntData.getBankInt(object, TIME) & 0xffffffffL;
}
-
+
+ @Deprecated
public static int getOrTrig(GenericObject object) {
return AbstractIntData.getBankInt(object, OR_TRIG);
}
-
+
+ @Deprecated
public static int getTopTrig(GenericObject object) {
return AbstractIntData.getBankInt(object, TOP_TRIG);
}
-
+
+ @Deprecated
public static int getBotTrig(GenericObject object) {
return AbstractIntData.getBankInt(object, BOT_TRIG);
}
-
+
+ @Deprecated
public static int getAndTrig(GenericObject object) {
return AbstractIntData.getBankInt(object, AND_TRIG);
}
-
+
@Override
public int getTag() {
return BANK_TAG;
}
-
+
@Override
protected final void decodeData() { //doesn't actually do anything since there is no decoding done on the ints
if (this.bank.length != BANK_SIZE) {
|