Author: [log in to unmask]
Date: Fri Jun 19 19:07:57 2015
New Revision: 3172
Log:
Add option for not reseting scalar data on every event.
Modified:
java/trunk/record-util/src/main/java/org/hps/record/scalers/ScalersEvioProcessor.java
Modified: java/trunk/record-util/src/main/java/org/hps/record/scalers/ScalersEvioProcessor.java
=============================================================================
--- java/trunk/record-util/src/main/java/org/hps/record/scalers/ScalersEvioProcessor.java (original)
+++ java/trunk/record-util/src/main/java/org/hps/record/scalers/ScalersEvioProcessor.java Fri Jun 19 19:07:57 2015
@@ -24,6 +24,8 @@
*/
private ScalerData data;
+ boolean resetEveryEvent = true;
+
/**
* Get the current scaler data or null if there was none in the last event processed.
*
@@ -41,7 +43,9 @@
*/
@Override
public void process(final EvioEvent evio) {
- this.data = null;
+ if (resetEveryEvent) {
+ this.data = null;
+ }
for (final BaseStructure bank : evio.getChildrenList()) {
// Does the crate tag match?
if (bank.getHeader().getTag() == EvioEventConstants.SCALERS_CRATE_TAG) {
@@ -61,4 +65,8 @@
}
}
}
+
+ public void setResetEveryEvent(final boolean resetEveryEvent) {
+ this.resetEveryEvent = resetEveryEvent;
+ }
}
|