2222/**
2323 * Combined with DecoderReader, a port of the standard "decoder" to CLARA.
2424 *
25- * 1. Converts EVIO to HIPO, translation tables, pulse extraction
26- * 2. Copies special banks on-the-fly to new tag-1 events
27- * 3. Caches helicity states and scaler readouts, for later use in post-processing.
28- * 4. Upon close, writes the helicity sequence to HEL::flip banks in new tag-1 events.
29- *
25+ * 1. Copies certain banks on-the-fly to new tag-1 events
26+ * 2. Caches helicity states and scaler readouts, for later use in post-processing
27+ * 3. Writes the helicity sequence to HEL::flip banks in new tag-1 events
28+ * 4. Adds .hipo to the output filename, if necessary
29+ * 5. Runs post-processing, writing tag-1 information to all events
30+ *
3031 * @author baltzell
3132 */
3233public class DecoderWriter extends HipoToHipoWriter {
@@ -43,7 +44,6 @@ public class DecoderWriter extends HipoToHipoWriter {
4344 boolean postprocess ;
4445
4546 private void init (JSONObject opts ) {
46- postprocess = false ;
4747 fullSchema = new SchemaFactory ();
4848 fullSchema .initFromDirectory (FileUtils .getEnvironmentPath ("CLAS12DIR" ,"etc/bankdefs/hipo4" ));
4949 runConfig = new Bank (fullSchema .getSchema ("RUN::config" ));
@@ -52,7 +52,7 @@ private void init(JSONObject opts) {
5252 scalers = new DaqScalersSequence (fullSchema );
5353 conman = new ConstantsManager ();
5454 conman .init ("/runcontrol/hwp" ,"/runcontrol/helicity" );
55- if ( opts . has ( " postprocess" )) postprocess = opts .getBoolean ("postprocess" );
55+ postprocess = opts .optBoolean ("postprocess" , false );
5656 if (opts .has ("variation" )) conman .setVariation (opts .getString ("variation" ));
5757 if (opts .has ("timestamp" )) conman .setTimeStamp (opts .getString ("timestamp" ));
5858 tag1banks = new Bank [TAG1BANKS .length ];
0 commit comments