public class MergeDriver extends Driver
DigiTrackerHit
objects into one,
combining hits in the same channels.
Input collections (either HashMap<Sensor, ArrayList<DigiTrackerHit>> or Collection<DigiTrackerHit>) are fetched from the event usung name supplied through calls to set("ADD_INPUT_COLLECTION", name), and output collection (type HashMap<Sensor, ArrayList<DigiTrackerHit>>) is attached to the event with the name set by a call to set("OUTPUT_MAP_NAME", name).
Whenever input collections contain hits in the same channels, new DigiTrackerHit
objects of type DigiTrackerHitComposite
are created and stored in the output
map. These new objects reference all the original hits as their constituents.
merge(java.util.Collection<java.util.HashMap<org.lcsim.recon.tracking.vsegment.geom.Sensor, java.util.ArrayList<org.lcsim.recon.tracking.vsegment.hit.DigiTrackerHit>>>)
methods can also be called directly by other classes.
Driver.AbortRunException, Driver.NextEventException
Modifier and Type | Field and Description |
---|---|
(package private) ArrayList<String> |
_inMapNames |
(package private) String |
_outMapName |
HLEVEL_DEFAULT, HLEVEL_FULL, HLEVEL_HIGH, HLEVEL_NORMAL, HLEVEL_OFF
Constructor and Description |
---|
MergeDriver()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
ArrayList<DigiTrackerHit> |
merge(ArrayList<DigiTrackerHit> hitList)
Returns a list of hits produced by merging hits in the list supplied as an argument.
|
HashMap<Sensor,ArrayList<DigiTrackerHit>> |
merge(Collection<HashMap<Sensor,ArrayList<DigiTrackerHit>>> hitMaps)
Returns the result of merging DigiTrackerHits from several maps.
|
void |
process(EventHeader event)
Called by framework to process event.
|
void |
set(String name,
Object value)
Set parameters.
|
add, clearStatistics, contains, detectorChanged, drivers, endOfData, getConditionsManager, getHistogramLevel, getLogger, getName, getRandom, printStatistics, processChildren, remove, resume, setHistogramLevel, setLogLevel, setRandom, startOfData, suspend
public void set(String name, Object value)
name
- Name of parameter to be set. Case is ignored.value
- Value to be assigned to the parameter.NoSuchParameterException
- Thrown if the supplied parameter name is unknown.
Subclasses may catch this exception after a call to super.set()
and set their own parameters.public void process(EventHeader event)
process
in class Driver
event
- The event to be processedDriver.NextEventException
,
Driver.AbortRunException
public HashMap<Sensor,ArrayList<DigiTrackerHit>> merge(Collection<HashMap<Sensor,ArrayList<DigiTrackerHit>>> hitMaps)
public ArrayList<DigiTrackerHit> merge(ArrayList<DigiTrackerHit> hitList)
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.