PlotNode.cc
1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* PlotNode.cc
*
* Created on: 29 oct. 2013
* Author: CS
*/
#include "PlotNode.hh"
#include "PostProcessingNode.hh"
#include "ParameterManager.hh"
#include "PlotOutput.hh"
#include "PageNode.hh"
#include "PlotLogger.hh"
#include "DefaultPlotConfiguration.hh"
#include "CommonNode.hh"
namespace plot {
PlotNode::PlotNode() :
NodeGrpCfg() {
getChildList()["outputStructure"] = AMDA::XMLConfigurator::NodeCfgSPtr(new OutputStructureNode());
getChildList()["page"] = AMDA::XMLConfigurator::NodeCfgSPtr(new PageNode());
getChildList()["postProcess"] = AMDA::XMLConfigurator::NodeCfgSPtr(
new postprocessing::PostProcessingNode<PlotOutput>());
}
PlotNode::~PlotNode() {
}
void PlotNode::proceed(xmlNodePtr pNode,
const AMDA::Parameters::CfgContext& pContext) {
AMDA::Parameters::ParameterManager* lParameterManager = pContext.get<
AMDA::Parameters::ParameterManager*>();
// create plot output and add it to the context and to
// the output manager
AMDA::Parameters::CfgContext lContext;
PlotOutput* plotOutput = new PlotOutput(*lParameterManager);
lContext.push<PlotOutput*>(plotOutput);
lContext.push<AMDA::Parameters::ParameterManager*>(lParameterManager);
AMDA::Parameters::ParamOutputSPtr lParamOutput(plotOutput);
AMDA::XMLConfigurator::NodeGrpCfg::proceed(pNode, lContext);
lParameterManager->getParamOutputList().push_back(lParamOutput);
}
void OutputStructureNode::proceed(xmlNodePtr pNode,
const AMDA::Parameters::CfgContext& pContext) {
LOG4CXX_DEBUG(gLogger, "OutputStructureNode::proceed")
PlotOutput* lPlotOutput =
pContext.get<PlotOutput*>();
lPlotOutput->setOutputStructure(
(const char*) pNode->children->content);
}
} /* namespace plot */