hep.lcd.util.driver
Class AbstractProcessor

java.lang.Object
  |
  +--hep.lcd.util.driver.AbstractProcessor
Direct Known Subclasses:
AbsTracker, AddRandomBkg, AddReconTrks, BaseMonteCarlo, CCDReco, ClusterCheater, EventScan, FitTracks, MCFast, RadialClusterBuilder, SimpleAnlReconTrks, SimpleClusterBuilder, SmearTrackerHits, TrkMCTruth

public abstract class AbstractProcessor
extends Object
implements Processor

A base implementation of Processor. Normally Processors will extend this class. It contains a bunch of convenience routines for accessing useful info from the ProcessorContext.

Source Code:
AbstractProcessor.java

Field Summary
protected  ProcessorContext context
           
 
Constructor Summary
AbstractProcessor()
           
 
Method Summary
 void clearContext()
          Called by the Driver to clear the context
 int getDebugLevel()
          Get the level of debug output requested
 PrintWriter getDebugStream()
          Get the stream to which debug output should be written
 int getHistogramLevel()
          Get the level of histogram output requested
 String getName()
          A default implementation of Processor.getName() Returns the name of this class.
 Reader getParameterFile(String name)
           
 PropertySet getParameters()
          Get the parameters for this processor from the constants system
 PropertySet getParameters(String name)
          Get the named parameters from the constants system
 Random getRandom()
          Get the random number generator to be used
 Histogram histogram(String name)
           
protected  void init()
          Called once the ProcessorContext has been set by the Driver.
 void setContext(ProcessorContext context)
          Called by the Driver to set the context
 void setDetector(Detector det)
          A default implementation of Processor.setDetector().
 void start()
          A default implementation of Processor.start().
 void stop()
          A default implementation of Processor.stop().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.lcd.util.driver.Processor
process
 

Field Detail

context

protected ProcessorContext context
Constructor Detail

AbstractProcessor

public AbstractProcessor()
Method Detail

init

protected void init()
Called once the ProcessorContext has been set by the Driver. Initialization which requires a ProcessorContext should be done here rather than in the Processor's constructor. This default implementation does nothing.

start

public void start()
A default implementation of Processor.start(). Does nothing.
Specified by:
start in interface Processor

stop

public void stop()
A default implementation of Processor.stop(). Does nothing.
Specified by:
stop in interface Processor

setDetector

public void setDetector(Detector det)
A default implementation of Processor.setDetector(). Does nothing.
Specified by:
setDetector in interface Processor

setContext

public void setContext(ProcessorContext context)
Called by the Driver to set the context
Specified by:
setContext in interface Processor
Following copied from interface: hep.lcd.util.driver.Processor
Parameters:
context - the new ProcessorContext

clearContext

public void clearContext()
Called by the Driver to clear the context
Specified by:
clearContext in interface Processor

getName

public String getName()
A default implementation of Processor.getName() Returns the name of this class.
Specified by:
getName in interface Processor
Following copied from interface: hep.lcd.util.driver.Processor
Returns:
The name of the processor

getDebugStream

public PrintWriter getDebugStream()
Get the stream to which debug output should be written

getDebugLevel

public int getDebugLevel()
Get the level of debug output requested

getHistogramLevel

public int getHistogramLevel()
Get the level of histogram output requested

histogram

public Histogram histogram(String name)

getRandom

public Random getRandom()
Get the random number generator to be used

getParameters

public PropertySet getParameters()
Get the parameters for this processor from the constants system

getParameters

public PropertySet getParameters(String name)
Get the named parameters from the constants system
Parameters:
name - The name of the parameters to get

getParameterFile

public Reader getParameterFile(String name)


The LCD Group