CalibrationNode.cc 1 KB
/*
 * CalibrationNode.cc
 *
 *  Created on: Dec 24, 2012
 *      Author: f.casimir
 */

#include "Parameter.hh"
#include "CalibrationNode.hh"

#include "Config.hh"
#include "CalibrationInfoWriter.hh"

using namespace AMDA::Parameters;

namespace AMDA {
namespace XMLParameterConfigurator {

	CalibrationNode::CalibrationNode() : NodeCfg() {
	}

	CalibrationNode::~CalibrationNode() {
	}

	void CalibrationNode::proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pContext) {
		Parameter* lParameter = pContext.get<Parameter*>();
		if (pNode->children && pNode->children->content && pNode->children->content[0] != '\0') {
			LOG4CXX_DEBUG(gLogger, "CalibrationNode::proceed push: " << (char*)pNode->children->content << " to Parameter: " << lParameter)
			CalibrationInfoWriter* lWriter = new  CalibrationInfoWriter();
			lWriter->setExpression((char*)pNode->children->content);
			lParameter->getCalibrationInfoWriterList().push_back(lWriter);
		}
	}

} /* namespace XMLParameterConfigurator */
} /* namespace AMDA */