public class CompactReader extends Object
Modifier and Type | Field and Description |
---|---|
private org.jdom.Document |
doc |
private JDOMExpressionFactory |
expr |
private ElementFactory |
factory |
private XMLMaterialManager |
xmat |
Constructor and Description |
---|
CompactReader()
Create a CompactReader using a DefaultElementFactory.
|
CompactReader(ElementFactory factory)
Create a CompactReader using the specified ElementFactory.
|
Modifier and Type | Method and Description |
---|---|
private Readout |
createReadout(org.jdom.Element readoutElement) |
org.jdom.Document |
getDocument() |
Detector |
read(InputStream in)
Read a compact geometry XML file.
|
private void |
readConstants(org.jdom.Element lccdd,
Detector det) |
private void |
readFields(org.jdom.Element lccdd,
Detector det) |
private void |
readHeader(org.jdom.Element lccdd,
Detector det) |
(package private) void |
readIncludes(org.jdom.Element lccdd,
Detector det) |
private void |
readLimits(org.jdom.Element lccdd,
Detector det) |
private void |
readMaterials(org.jdom.Element compact,
Detector det) |
private void |
readMatrices(org.jdom.Element compact,
Detector det) |
private Map<String,Readout> |
readReadouts(org.jdom.Element lccdd,
Detector det) |
private void |
readRegions(org.jdom.Element lccdd,
Detector det) |
private void |
readSubdetectors(org.jdom.Element lccdd,
Detector det,
Map<String,Readout> readoutMap) |
private void |
readVisAttributes(org.jdom.Element lccdd,
Detector det)
Create the VisAttributes objects from vis elements in the display block.
|
static void |
registerCLHEPConstants(JDOMExpressionFactory f) |
protected void |
resetDocument() |
private ElementFactory factory
private JDOMExpressionFactory expr
private org.jdom.Document doc
private XMLMaterialManager xmat
public CompactReader()
public CompactReader(ElementFactory factory)
factory
- The ElementFactory to be used for creating elements as the file is parsed.public Detector read(InputStream in) throws IOException, org.jdom.JDOMException, ElementFactory.ElementCreationException
in
- The input stream to read.IOException
- If an IO error occurs while reading the stream.org.jdom.JDOMException
- If invalid XML is found while reading the file.org.lcsim.geometry.compact.ElementFactory.ElementCreationException
- If the ElementFactory throws
an ElementCreationException.ElementFactory.ElementCreationException
private void readConstants(org.jdom.Element lccdd, Detector det) throws org.jdom.JDOMException, ElementFactory.ElementCreationException
org.jdom.JDOMException
ElementFactory.ElementCreationException
private void readMatrices(org.jdom.Element compact, Detector det)
private void readHeader(org.jdom.Element lccdd, Detector det) throws org.jdom.JDOMException, ElementFactory.ElementCreationException
org.jdom.JDOMException
ElementFactory.ElementCreationException
private void readRegions(org.jdom.Element lccdd, Detector det) throws org.jdom.JDOMException, ElementFactory.ElementCreationException
org.jdom.JDOMException
ElementFactory.ElementCreationException
private void readLimits(org.jdom.Element lccdd, Detector det) throws org.jdom.JDOMException, ElementFactory.ElementCreationException
org.jdom.JDOMException
ElementFactory.ElementCreationException
private Map<String,Readout> readReadouts(org.jdom.Element lccdd, Detector det) throws org.jdom.JDOMException, ElementFactory.ElementCreationException
org.jdom.JDOMException
ElementFactory.ElementCreationException
private Readout createReadout(org.jdom.Element readoutElement) throws Exception
Exception
private void readSubdetectors(org.jdom.Element lccdd, Detector det, Map<String,Readout> readoutMap) throws org.jdom.JDOMException, ElementFactory.ElementCreationException
org.jdom.JDOMException
ElementFactory.ElementCreationException
private void readFields(org.jdom.Element lccdd, Detector det) throws org.jdom.JDOMException, ElementFactory.ElementCreationException
org.jdom.JDOMException
ElementFactory.ElementCreationException
private void readMaterials(org.jdom.Element compact, Detector det)
private void readVisAttributes(org.jdom.Element lccdd, Detector det) throws org.jdom.JDOMException, ElementFactory.ElementCreationException
lccdd
- det
- org.jdom.JDOMException
ElementFactory.ElementCreationException
public static void registerCLHEPConstants(JDOMExpressionFactory f)
protected void resetDocument()
public org.jdom.Document getDocument()
void readIncludes(org.jdom.Element lccdd, Detector det)
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.