Class DecoderWriter

java.lang.Object
org.jlab.clara.std.services.AbstractService
org.jlab.clara.std.services.AbstractEventWriterService<org.jlab.jnp.hipo4.io.HipoWriterSorted>
org.jlab.io.clara.HipoToHipoWriter
org.jlab.io.clara.DecoderWriter
All Implemented Interfaces:
org.jlab.clara.engine.Engine

public class DecoderWriter extends HipoToHipoWriter
Combined with DecoderReader, a port of the standard "decoder" to CLARA. 1. Converts EVIO to HIPO, translation tables, pulse extraction 2. Copies special banks on-the-fly to new tag-1 events 3. Caches helicity states and scaler readouts, for later use in post-processing. 4. Upon close, writes the helicity sequence to HEL::flip banks in new tag-1 events.
Author:
baltzell
  • Field Summary

    Fields inherited from class org.jlab.io.clara.HipoToHipoWriter

    filename, schemaBankList

    Fields inherited from class org.jlab.clara.std.services.AbstractEventWriterService

    writer
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    In addition to closing the writer, creates and writes tag-1 events with HEL::flip bnks and clears old scaler/helicity readings.
    protected org.jlab.jnp.hipo4.io.HipoWriterSorted
    createWriter(Path file, org.json.JSONObject opts)
     
    protected void
    In addition to writing the incoming event, copies all tag-1 banks to new tag-1 events and writes them, and stores helicity/scaler readings for later.

    Methods inherited from class org.jlab.io.clara.HipoToHipoWriter

    configure, getDataType, writeEvent

    Methods inherited from class org.jlab.clara.std.services.AbstractEventWriterService

    configure, destroy, execute, executeGroup, getInputDataTypes, getOutputDataTypes, reset

    Methods inherited from class org.jlab.clara.std.services.AbstractService

    getAuthor, getDescription, getName, getStates, getVersion

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DecoderWriter

      public DecoderWriter()
  • Method Details

    • createWriter

      protected org.jlab.jnp.hipo4.io.HipoWriterSorted createWriter(Path file, org.json.JSONObject opts) throws org.jlab.clara.std.services.EventWriterException
      Overrides:
      createWriter in class HipoToHipoWriter
      Throws:
      org.jlab.clara.std.services.EventWriterException
    • writeEvent

      protected void writeEvent(Object event) throws org.jlab.clara.std.services.EventWriterException
      In addition to writing the incoming event, copies all tag-1 banks to new tag-1 events and writes them, and stores helicity/scaler readings for later.
      Overrides:
      writeEvent in class HipoToHipoWriter
      Parameters:
      event -
      Throws:
      org.jlab.clara.std.services.EventWriterException
    • closeWriter

      protected void closeWriter()
      In addition to closing the writer, creates and writes tag-1 events with HEL::flip bnks and clears old scaler/helicity readings.
      Overrides:
      closeWriter in class HipoToHipoWriter