use of dr.evomodel.tree.randomlocalmodel.RandomLocalTreeVariable in project beast-mcmc by beast-dev.
the class RLTVLoggerParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
TreeModel treeModel = (TreeModel) xo.getChild(TreeModel.class);
RandomLocalTreeVariable randomLocal = (RandomLocalTreeVariable) xo.getChild(RandomLocalTreeVariable.class);
String fileName = xo.getStringAttribute(FILENAME);
int logEvery = xo.getIntegerAttribute(LOG_EVERY);
TabDelimitedFormatter formatter = null;
try {
formatter = new TabDelimitedFormatter(new PrintWriter(new FileWriter(fileName)));
} catch (IOException e) {
e.printStackTrace();
}
return new RLTVLogger(formatter, logEvery, treeModel, randomLocal);
}
Aggregations