public class Detector extends Object
This class is intended for use as a base class. It is not abstract but the constructor is protected. Similarly, there are no public methods for adding, modifying or removing layers or subdetectors. A subclass is expected to call methods to add a single layer or all the layers from another detector. Typically these calls would be made in the constructor.
The return status for each change is zero if the change was successful. After all changes, is_ok() may be called to verify internal consistency.
The layer names must be unique. New names are checked for uniqueness each time a layer is added.
Modifier and Type | Field and Description |
---|---|
private int |
_check |
private Map |
_layermap |
private List |
_names |
private static boolean |
CHECK_SIZE_MISMATCH |
private static int |
CHECKED_BAD |
private static int |
CHECKED_OK |
private static int |
UNCHECKED |
Modifier | Constructor and Description |
---|---|
protected |
Detector() |
Modifier and Type | Method and Description |
---|---|
protected int |
addLayer(String name,
Layer lyr) |
protected int |
addSubdetector(Detector subdet) |
private void |
check() |
String |
genericType()
Return the type.
|
boolean |
isAssigned(String name)
Return whether a name has been assigned.
|
boolean |
isOk()
Return whether the check status is ok.
|
Layer |
layer(String name)
Return a layer.
|
protected Map |
layerMap() |
List |
layerNames()
Return the list of layer names.
|
void |
printLayers()
Print the layers.
|
static String |
staticType()
Return the type.
|
String |
toString()
output stream
|
String |
type()
Return the type.
|
static String |
typeName()
Return the type name.
|
private static final int UNCHECKED
private static final int CHECKED_OK
private static final int CHECKED_BAD
private static boolean CHECK_SIZE_MISMATCH
private List _names
private Map _layermap
private int _check
public static String typeName()
public static String staticType()
private void check()
protected Map layerMap()
protected int addSubdetector(Detector subdet)
public String genericType()
public String type()
public boolean isOk()
public List layerNames()
public void printLayers()
public String toString()
public boolean isAssigned(String name)
name
- String name of detectorCopyright © 2016 Linear Collider Detector (LCD). All rights reserved.