Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
import org.json.JSONObject;

/**
*
* Emulate DecoderReader for EVIO files, or HipoToHipoReader for HIPO files.
*
* @author baltzell
*/
public class Clas12Reader extends AbstractEventReaderService<Object> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
/**
* Combined with DecoderWriter, a port of the standard "decoder" to CLARA.
*
* 1. Convert EVIO to HIPO
* 2. CCDB translation tables, c/s/c -> s/l/c/o
* 3. Pulse extraction, e.g., Mode-1 FADC250
*
* @author baltzell
*/
public class DecoderReader extends AbstractEventReaderService<EvioSource> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
/**
* 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.
*
* 1. Copies certain banks on-the-fly to new tag-1 events
* 2. Caches helicity states and scaler readouts, for later use in post-processing
* 3. Writes the helicity sequence to HEL::flip banks in new tag-1 events
* 4. Adds .hipo to the output filename, if necessary
* 5. Runs post-processing, writing tag-1 information to all events
*
* @author baltzell
*/
public class DecoderWriter extends HipoToHipoWriter {
Expand All @@ -43,7 +44,6 @@ public class DecoderWriter extends HipoToHipoWriter {
boolean postprocess;

private void init(JSONObject opts) {
postprocess = false;
fullSchema = new SchemaFactory();
fullSchema.initFromDirectory(FileUtils.getEnvironmentPath("CLAS12DIR","etc/bankdefs/hipo4"));
runConfig = new Bank(fullSchema.getSchema("RUN::config"));
Expand All @@ -52,7 +52,7 @@ private void init(JSONObject opts) {
scalers = new DaqScalersSequence(fullSchema);
conman = new ConstantsManager();
conman.init("/runcontrol/hwp","/runcontrol/helicity");
if (opts.has("postprocess")) postprocess = opts.getBoolean("postprocess");
postprocess = opts.optBoolean("postprocess", false);
if (opts.has("variation")) conman.setVariation(opts.getString("variation"));
if (opts.has("timestamp")) conman.setTimeStamp(opts.getString("timestamp"));
tag1banks = new Bank[TAG1BANKS.length];
Expand Down