Class OutputExperiment
- All Implemented Interfaces:
AssociateXMLUponLoad
- Direct Known Subclasses:
InputOutputExperiment
Experiment that produces output files, as defined by a OutputManager.- Author:
- Owen Feehan
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name for the output that records the total execution-time of the experiment. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract MultiLevelOutputEnabledIf specified, default rules for determine which outputs are enabled or not.executeExperiment(ExecutionArguments arguments) Executes the experiment for given arguments.protected abstract Optional<TaskStatistics> executeExperimentWithParameters(ParametersExperiment parameters) Executes the experiment for parameters.A name for the experiment.Where log messages that do not pertain to a specific job (input) appear.The output-manager that specifies how/where/which elements occur duing outputting.booleanWhether more detailed log-messages around each experiment occur.voidsetExperimentIdentifier(ExperimentIdentifier experimentIdentifier) A name for the experiment.voidsetForceDetailedLogging(boolean forceDetailedLogging) Whether more detailed log-messages around each experiment occur.voidsetLogExperiment(LoggingDestination logExperiment) Where log messages that do not pertain to a specific job (input) appear.voidsetOutput(OutputManager output) The output-manager that specifies how/where/which elements occur duing outputting.booleanWhether to log in more or less detail.Methods inherited from class org.anchoranalysis.experiment.bean.Experiment
associateXML, getXMLConfigurationMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Field Details
-
OUTPUT_EXECUTION_TIME
The name for the output that records the total execution-time of the experiment.- See Also:
-
-
Constructor Details
-
OutputExperiment
public OutputExperiment()
-
-
Method Details
-
executeExperiment
public Optional<Path> executeExperiment(ExecutionArguments arguments) throws ExperimentExecutionException Executes the experiment for given arguments.- Specified by:
executeExperimentin classExperiment- Parameters:
arguments- additional run-time configuration/parameters that influences the experiment.- Returns:
- the path files written into as output, if such a path exists.
- Throws:
ExperimentExecutionException- if an error occurs executing the experiment.
-
useDetailedLogging
public boolean useDetailedLogging()Description copied from class:ExperimentWhether to log in more or less detail.It's appropriate to perform more detailed logging for a lengthier experiment, but something quick and simple is preferable for a short job, which may only be outputted to the console.
- Specified by:
useDetailedLoggingin classExperiment- Returns:
- true iff detailed logging should be employed.
-
executeExperimentWithParameters
protected abstract Optional<TaskStatistics> executeExperimentWithParameters(ParametersExperiment parameters) throws ExperimentExecutionException Executes the experiment for parameters.- Parameters:
parameters- a combination of run-time and bean-time specified elements used in the experiment.- Returns:
- statistics of the tasks, if they exist.
- Throws:
ExperimentExecutionException- if anything occurs stop the experiment finishing its execution
-
defaultOutputs
If specified, default rules for determine which outputs are enabled or not.- Returns:
- the default rules if they exist.
-
getOutput
The output-manager that specifies how/where/which elements occur duing outputting. -
setOutput
The output-manager that specifies how/where/which elements occur duing outputting. -
getLogExperiment
Where log messages that do not pertain to a specific job (input) appear.Note that in the case of a
InputOutputExperimentan additional log will be created for each specific job. -
setLogExperiment
Where log messages that do not pertain to a specific job (input) appear.Note that in the case of a
InputOutputExperimentan additional log will be created for each specific job. -
getExperimentIdentifier
A name for the experiment. -
setExperimentIdentifier
A name for the experiment. -
isForceDetailedLogging
public boolean isForceDetailedLogging()Whether more detailed log-messages around each experiment occur.if true, then detailed messages around each experiment (name, time, start-stop events etc.) are ALWAYS displayed if false, these will sometimes be hidden (e.g. if the execution of each file is very quick)
-
setForceDetailedLogging
public void setForceDetailedLogging(boolean forceDetailedLogging) Whether more detailed log-messages around each experiment occur.if true, then detailed messages around each experiment (name, time, start-stop events etc.) are ALWAYS displayed if false, these will sometimes be hidden (e.g. if the execution of each file is very quick)
-