File tree Expand file tree Collapse file tree
common-tools/clas-analysis/src/main/java/org/jlab/analysis/postprocess Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,8 +194,8 @@ private void processEventScalers(Bank runcfg, Bank recevt) {
194194 }
195195
196196 /**
197- * Modify REC::Event for beam charge and livetime
198- * @param runcfg
197+ * Modify RUN::config's unixtime and update the event
198+ * @param event
199199 * @param runcfg
200200 */
201201 private void processEventUnix (Event event , Bank runcfg ) {
@@ -213,17 +213,20 @@ private void processEventUnix(Event event, Bank runcfg) {
213213 }
214214
215215 /**
216- * Modify REC::Event for beam charge and livetime
217- * @param runcfg
216+ * Modify RUN::config's unixtime and update the event
217+ * @param event
218218 * @param runcfg
219219 */
220220 private void processEventUnix (DataEvent event , DataBank runcfg ) {
221221 if (runcfg .rows () > 0 ) {
222- Integer unix = eventUnix .get (eventUnix .floorKey (runcfg .getInt ("event" ,0 )));
223- if (unix != null ) {
224- event .removeBank (runcfg .getDescriptor ().getName ());
225- runcfg .setInt ("unixtime" , 0 , unix );
226- event .appendBank (runcfg );
222+ Integer key = eventUnix .floorKey (runcfg .getInt ("event" ,0 ));
223+ if (key != null ) {
224+ Integer unix = eventUnix .get (key );
225+ if (unix != null ) {
226+ event .removeBank (runcfg .getDescriptor ().getName ());
227+ runcfg .setInt ("unixtime" , 0 , unix );
228+ event .appendBank (runcfg );
229+ }
227230 }
228231 }
229232 }
You can’t perform that action at this time.
0 commit comments