hep.lcd.util.driver
Class Driver

java.lang.Object
  |
  +--hep.analysis.EventHandler
        |
        +--hep.analysis.EventAnalyzer
              |
              +--hep.lcd.util.driver.Driver
Direct Known Subclasses:
CombinedReco, RadialClusterDriver, ReconDriver, SmearDriver, TrackReco, TrackRecoTPC

public class Driver
extends EventAnalyzer
implements Processor

A driver is a steering routine which can call a number of processors It also allows controlling the debug level of the processors being called and handles coordination of random numbers between Monte Carlo processors. Driver also implements Processor, so Drivers can be nested as Processors within other Drivers. When used as a nested driver all parameters such as histogramLevel and debugLevel are inherited from the parent driver.

See Also:
Processor, ProcessorContext, ReconDriver
Source Code:
Driver.java

Fields inherited from class hep.analysis.EventHandler
out
 
Constructor Summary
Driver()
           
 
Method Summary
 void add(Processor p)
          Add a Processor to this Driver
 void afterLastEvent()
           
 void beforeFirstEvent()
           
 void clearContext()
          Called by the Driver when this processor is removed from the Driver
 boolean contains(Processor p)
          Tests to see if a given Processor is already added to this Driver
 int getDebugLevel()
           
 int getHistogramLevel()
           
 String getName()
          Called by the Driver to get the name of this processor
 long getSeed()
           
 void process(LCDEvent event)
          Called by the driver when this processor should process an event.
 void processEvent(EventData data)
           
 void remove(Processor p)
          Removes a Processor from this Driver
 void setContext(ProcessorContext value)
          Called by the Driver when this processor is added to the Driver
 void setDebugLevel(int level)
           
 void setDetector(Detector det)
          Called by the driver when a new detector geometry is set.
 void setHistogramLevel(int level)
           
 void setSeed(long newSeed)
           
 void start()
          Called at the beginning of processing
 void stop()
          Called at the end of processing
 
Methods inherited from class hep.analysis.EventHandler
histogram, histogram, sendMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Driver

public Driver()
Method Detail

add

public void add(Processor p)
Add a Processor to this Driver
Parameters:
p - The Processor to be added

remove

public void remove(Processor p)
Removes a Processor from this Driver
Parameters:
p - The Processor to be removed

contains

public boolean contains(Processor p)
Tests to see if a given Processor is already added to this Driver
Parameters:
p - Processor to be checked

processEvent

public void processEvent(EventData data)
Overrides:
processEvent in class EventAnalyzer

setDetector

public void setDetector(Detector det)
Description copied from interface: Processor
Called by the driver when a new detector geometry is set. This will always be called before the first call to process(), and subsequently each time the Detector geometry changes.
Specified by:
setDetector in interface Processor

beforeFirstEvent

public void beforeFirstEvent()
Overrides:
beforeFirstEvent in class EventHandler

afterLastEvent

public void afterLastEvent()
Overrides:
afterLastEvent in class EventHandler

getSeed

public long getSeed()

setSeed

public void setSeed(long newSeed)

getDebugLevel

public int getDebugLevel()

setDebugLevel

public void setDebugLevel(int level)

getHistogramLevel

public int getHistogramLevel()

setHistogramLevel

public void setHistogramLevel(int level)

process

public void process(LCDEvent event)
Description copied from interface: Processor
Called by the driver when this processor should process an event. If the processor produces new output it should add it to the event.
Specified by:
process in interface Processor
Following copied from interface: hep.lcd.util.driver.Processor
Parameters:
event - The event to process

start

public void start()
Description copied from interface: Processor
Called at the beginning of processing
Specified by:
start in interface Processor

stop

public void stop()
Description copied from interface: Processor
Called at the end of processing
Specified by:
stop in interface Processor

setContext

public void setContext(ProcessorContext value)
Description copied from interface: Processor
Called by the Driver when this processor is added to the Driver
Specified by:
setContext in interface Processor
Following copied from interface: hep.lcd.util.driver.Processor
Parameters:
context - the new ProcessorContext

clearContext

public void clearContext()
Description copied from interface: Processor
Called by the Driver when this processor is removed from the Driver
Specified by:
clearContext in interface Processor

getName

public String getName()
Description copied from interface: Processor
Called by the Driver to get the name of this processor
Specified by:
getName in interface Processor
Following copied from interface: hep.lcd.util.driver.Processor
Returns:
The name of the processor


The LCD Group