BinsNode.cc
1.35 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
/*
* BinsNode.cc
*
* Created on: Jan 27, 2023
* Author: AKKODIS
*/
#include <libxml/tree.h>
#include <iosfwd>
#include "BinsNode.hh"
namespace plot {
void ManualNode::proceed(xmlNodePtr pNode_,const AMDA::Parameters::CfgContext& pContext_){
LOG4CXX_DEBUG(gLogger, "ManualNode::proceed");
Histogram2DSeriesProperties* props = pContext_.get<Histogram2DSeriesProperties*>();
// read attributes :
xmlChar* value = NULL;
// overwrites default values if any...
// xbinnumber
value = xmlGetProp(pNode_, (const xmlChar *)"xbinnumber");
if( value ){
props->getManualProperties().setXBinNumber(std::stoul((const char*)value));
xmlFree(value);
}
// ybinnumber
value = xmlGetProp(pNode_, (const xmlChar *)"ybinnumber");
if( value ){
props->getManualProperties().setYBinNumber(std::stoul((const char*)value));
xmlFree(value);
}
}
void BinsNode::proceed(xmlNodePtr pNode_,const AMDA::Parameters::CfgContext& pContext_){
LOG4CXX_DEBUG(gLogger, "BinsNode::proceed");
Histogram2DSeriesProperties* props = pContext_.get<Histogram2DSeriesProperties*>();
xmlChar* name = pContext_.get<xmlChar*>();
//parse children nodes
AMDA::Parameters::CfgContext context;
context.push<xmlChar*>(name);
context.push<Histogram2DSeriesProperties*>(props);
AMDA::XMLConfigurator::NodeGrpCfg::proceed(pNode_, context);
}
} /* namespace plot */