View Javadoc

1   package org.lcsim.detector;
2   
3   import java.util.List;
4   
5   /**
6    * The {@link IReadout} provides access to hit objects
7    * from {@link IDetectorElement} objects.  Since there
8    * is no class for hits within GeomConverter, this class 
9    * provides access based on the hits' concrete class 
10   * with the {{@link #getHits(Class)} method.
11   * 
12   * @author jeremym
13   * @version $Id: IReadout.java,v 1.6 2010/04/14 17:52:32 jeremy Exp $
14   */
15  public interface IReadout
16  {
17  	/**
18  	 * Get a list of hits matching type T. 
19  	 * @param  klass The class of the list to return.
20  	 * @return A {@link List} containing the hits or containing
21  	 *         nothing if no hits have been added.
22  	 */
23  	public <T> List<T> getHits(Class<T> klass);
24  	
25  	/**
26  	 * Add a hit.
27  	 * 
28  	 * @param hit The hit to add.
29  	 */
30  	public void addHit(Object hit);
31  	
32  	/**
33  	 * Clear the hits.
34  	 */
35  	public void clear();
36  }