Class ReconstructionEngine

java.lang.Object
org.jlab.clas.reco.ReconstructionEngine
All Implemented Interfaces:
org.jlab.clara.engine.Engine
Direct Known Subclasses:
PulseExtractorEngine, ReconstructionEngine.Reco

public abstract class ReconstructionEngine extends Object implements org.jlab.clara.engine.Engine
Author:
gavalian
  • Field Details

    • CONFIG_BANK_NAME

      public static final String CONFIG_BANK_NAME
      See Also:
    • rawBankOrders

      protected org.jlab.detector.banks.RawBank.OrderType[] rawBankOrders
  • Constructor Details

    • ReconstructionEngine

      public ReconstructionEngine(String name, String author, String version)
    • ReconstructionEngine

      public ReconstructionEngine(String name, String author)
  • Method Details

    • getConfigMap

      public Map<String,String> getConfigMap()
    • registerOutputBank

      public void registerOutputBank(String... bankName)
    • getSchemaFactory

      protected org.jlab.jnp.hipo4.data.SchemaFactory getSchemaFactory()
    • getRawBankReader

      protected org.jlab.detector.banks.RawBank getRawBankReader(String bankName)
    • getRawBankReader

      protected org.jlab.detector.banks.RawBank getRawBankReader(String bankName, org.jlab.detector.banks.RawBank.OrderType... order)
    • processDataEvent

      public abstract boolean processDataEvent(org.jlab.io.base.DataEvent event)
    • init

      public abstract boolean init()
    • requireConstants

      public void requireConstants(Map<String,Integer> tables)
      Use a map just to avoid name clash in ConstantsManager.
      Parameters:
      tables - map of table names to #indices
    • requireConstants

      public void requireConstants(List<String> tables)
    • requireConstants

      public void requireConstants(String... tables)
    • getEngineConfiguration

      public final String getEngineConfiguration()
    • getConstantsManager

      public org.jlab.detector.calib.utils.ConstantsManager getConstantsManager()
    • getEngineConfigString

      public String getEngineConfigString(String key, String def)
    • getEngineConfigString

      public String getEngineConfigString(String key)
    • configure

      public org.jlab.clara.engine.EngineData configure(org.jlab.clara.engine.EngineData ed)
      Specified by:
      configure in interface org.jlab.clara.engine.Engine
      Parameters:
      ed -
      Returns:
    • getStringConfigParameter

      protected String getStringConfigParameter(String jsonString, String key) throws Exception
      Throws:
      Exception
    • getStringConfigParameter

      protected String getStringConfigParameter(String jsonString, String group, String key) throws Exception
      Method helps to extract configuration parameters defined in the Clara YAML file.
      Parameters:
      jsonString - JSon configuration object (passed to the userInit method).
      group - config parameter group.
      key - the key of the config parameter.
      Returns:
      parameter: String value
      Throws:
      ClasEngineException - org.jlab.clara.clas engine exception
      Exception
    • setVariation

      public void setVariation(String variation)
    • setTimeStamp

      public void setTimeStamp(String timestamp)
    • constantManagerStatus

      protected boolean constantManagerStatus()
    • applyTriggerMask

      public final boolean applyTriggerMask(org.jlab.io.base.DataEvent event)
    • generateConfig

      public Map<String,Object> generateConfig()
      Generate a configuration section to drop in a HIPO bank, as the engineConfigMap appended with the software version. Here the top level is "yaml" to facilitate merging JSON banks later.
      Returns:
    • dropBanks

      public void dropBanks(org.jlab.io.base.DataEvent event)
    • checkRunNumber

      public boolean checkRunNumber(org.jlab.io.base.DataEvent event)
    • filterEvent

      public void filterEvent(org.jlab.io.base.DataEvent dataEvent)
    • execute

      public org.jlab.clara.engine.EngineData execute(org.jlab.clara.engine.EngineData input)
      Specified by:
      execute in interface org.jlab.clara.engine.Engine
    • executeGroup

      public org.jlab.clara.engine.EngineData executeGroup(Set<org.jlab.clara.engine.EngineData> set)
      Specified by:
      executeGroup in interface org.jlab.clara.engine.Engine
    • getInputDataTypes

      public Set<org.jlab.clara.engine.EngineDataType> getInputDataTypes()
      Specified by:
      getInputDataTypes in interface org.jlab.clara.engine.Engine
    • getOutputDataTypes

      public Set<org.jlab.clara.engine.EngineDataType> getOutputDataTypes()
      Specified by:
      getOutputDataTypes in interface org.jlab.clara.engine.Engine
    • getStates

      public Set<String> getStates()
      Specified by:
      getStates in interface org.jlab.clara.engine.Engine
    • setDescription

      public ReconstructionEngine setDescription(String desc)
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.jlab.clara.engine.Engine
    • getName

      public String getName()
    • getVersion

      public String getVersion()
      Specified by:
      getVersion in interface org.jlab.clara.engine.Engine
    • getAuthor

      public String getAuthor()
      Specified by:
      getAuthor in interface org.jlab.clara.engine.Engine
    • reset

      public void reset()
      Specified by:
      reset in interface org.jlab.clara.engine.Engine
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.jlab.clara.engine.Engine
    • setFatal

      public void setFatal()
    • getFatal

      public boolean getFatal()
    • main

      public static void main(String[] args)