BinsNode.hh 1.16 KB
/*
 * BinsNode.hh
 *
 *  Created on: Jan 27, 2023
 *      Author: AKKODIS
 */

#ifndef BINSNODE_HH_
#define BINSNODE_HH_

#include <libxml/tree.h>
#include <iosfwd>

#include "NodeCfg.hh"
#include "PlotLogger.hh"
#include "HistogramSeriesProperties.hh"
#include "CommonNode.hh"



namespace plot {

/**
 * Read a 'manual' tag from xml request
 */
class ManualNode: public AMDA::XMLConfigurator::NodeCfg {
public:

	ManualNode(std::string histogramType) : AMDA::XMLConfigurator::NodeCfg(),_histogramType(histogramType){};
	virtual ~ManualNode(){};
	void proceed(xmlNodePtr pNode_,const AMDA::Parameters::CfgContext& pContext_);

protected:
	std::string _histogramType;
};

/**
 * Read a 'bins' tag from xml request
 */
class BinsNode: public AMDA::XMLConfigurator::NodeGrpCfg {
public:

	BinsNode(std::string histogramType): AMDA::XMLConfigurator::NodeGrpCfg(), _histogramType(histogramType){
		getChildList()["manual"] =  AMDA::XMLConfigurator::NodeCfgSPtr(new ManualNode(histogramType));
	};
	virtual ~BinsNode(){};
	void proceed(xmlNodePtr pNode_,const AMDA::Parameters::CfgContext& pContext_);
protected:
	std::string _histogramType;
};
} /* namespace plot */

#endif /* BINSNODE_HH_ */