public class ToFile extends ModuleAdapter
Used this module to test the ordering of events coming from the EB. The output channels were modified to place user events, arriving prior to the prestart event, after the prestart instead. This module simply wrote things directly to file so this behavior could be tested.
ModuleAdapter.RateCalculatorThread
Modifier and Type | Field and Description |
---|---|
com.lmax.disruptor.SequenceBarrier |
barrierIn
All recording threads share one barrier.
|
com.lmax.disruptor.Sequence |
sequence
One sequence per recording thread.
|
(package private) org.jlab.coda.emu.modules.ToFile.RecordingThread |
thread
Main thread of this module.
|
attributeMap, avgEventSize, emu, endCallback, epThreadsSetInConfig, errorMsg, eventCountTotal, eventProducingThreads, eventRate, goodChunk_X_EtBufSize, id, inputChanLevels, inputChanNames, inputChannelCount, inputChannels, logger, maxEventSize, minEventSize, moduleState, name, outputChanLevels, outputChanNames, outputChannelCount, outputChannels, outputOrder, paused, prestartCallback, RateCalculator, representStatistics, statGatheringPeriod, statistics, timeStatsOn, timeToBuild, wordCountTotal, wordRate
Constructor and Description |
---|
ToFile(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> attributeMap,
Emu emu)
Constructor creates a new EventRecording instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addInputChannels(java.util.ArrayList<DataChannel> input_channels)
Add the given input channels to this EmuModule object.
|
void |
clearChannels()
Remove all channels from this EmuModule object.
|
void |
end()
This method implements the END transition of the CODA run control state machine.
|
DataChannel |
getInputChannel()
Get the one input channel in use.
|
void |
go()
This method implements the GO transition of the CODA run control state machine.
|
void |
prestart()
This method implements the PRESTART transition of the CODA run control state machine.
|
void |
reset()
This method implements the RESET transition of the CODA run control state machine.
|
addOutputChannels, adjustStatistics, download, eventToOutputChannel, eventToOutputChannel, getAttr, getEndCallback, getError, getEventProducingThreadCount, getInputChannels, getInputLevels, getInputNames, getIntAttr, getInternalRingCount, getOutputChannels, getOutputLevels, getOutputNames, getOutputOrder, getPrestartCallback, getStatistics, name, pause, registerEndCallback, registerPrestartCallback, representsEmuStatistics, state
org.jlab.coda.emu.modules.ToFile.RecordingThread thread
public com.lmax.disruptor.Sequence sequence
public com.lmax.disruptor.SequenceBarrier barrierIn
public ToFile(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> attributeMap, Emu emu) throws org.jlab.coda.jevio.EvioException
name
- name of moduleattributeMap
- map containing attributes of moduleemu
- Emu containing this module.org.jlab.coda.jevio.EvioException
- if cannot write filepublic void addInputChannels(java.util.ArrayList<DataChannel> input_channels)
addInputChannels
in interface EmuModule
addInputChannels
in class ModuleAdapter
input_channels
- the input channels to add to this EmuModule objectpublic DataChannel getInputChannel()
public void clearChannels()
clearChannels
in interface EmuModule
clearChannels
in class ModuleAdapter
public void reset()
reset
in interface CODAStateMachine
reset
in class ModuleAdapter
public void go()
go
in interface CODAStateMachine
go
in class ModuleAdapter
public void end()
end
in interface CODAStateMachine
end
in class ModuleAdapter
public void prestart() throws CmdExecException
prestart
in interface CODAStateMachine
prestart
in class ModuleAdapter
CmdExecException
- if error during command execution.