Commit e6a273f8 authored by Pierre Aubert's avatar Pierre Aubert
Browse files

Remove plot stuff

parent 501ff7fb
Pipeline #96648 passed with stages
in 1 minute and 6 seconds
image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/phoenix/phoenix_math:0.1
image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/phoenix/phoenix_minimal:0.2
stages:
- BuildTestinstall
......@@ -17,7 +17,7 @@ dailyBuildMasterAll:
stage: BuildTestinstall
script:
- export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/usr/lib
- export LD_LIBRARY_PATH=/usr/lib
- env
- mkdir -p build
- cd build
......@@ -27,10 +27,7 @@ dailyBuildMasterAll:
-DSELF_TESTS_MODE=yes
- make all
- make install
- make test || cat Testing/Temporary/LastTest.log
- ldd /usr/bin/gnuplot | grep -i qt
- ls /usr/lib/x86_64-linux-gnu/ | grep -i qt
- make test
only:
- branches
- tags
......@@ -39,7 +36,7 @@ dailyBuildMasterAll:
TestCoverage:
stage: DocCoverage
script:
- export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/usr/lib
- export LD_LIBRARY_PATH=/usr/lib
- env
- mkdir -p build coverage
- cd build
......@@ -66,7 +63,7 @@ TestCoverage:
Doc:
stage: DocCoverage
script:
- export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/usr/lib
- export LD_LIBRARY_PATH=/usr/lib
- env
- rm -fr build public
- mkdir -p build
......
......@@ -7,13 +7,11 @@ phoenix_base_project("PhoenixMath" "1.4.0"
"Set of mathematic tools such as histograms"
"https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/PhoenixMath")
pull_extra_module("StringUtils" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/StringUtils.git")
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
phoenix_create_find(PhoenixMath phoenix_math PHistogram.h "" StringUtils)
phoenix_create_find_header(PhoenixMath PHistogram.h "")
add_subdirectory(src)
......
project(Phoenix)
add_executable(test_phistogram main.cpp)
target_link_libraries(test_phistogram phoenix_math string_utils)
add_test(NAME TestPHistogram
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_phistogram)
......
......@@ -29,10 +29,6 @@ bool testPHistogram(){
hist3.normalize();
std::cout << hist3 << std::endl;
b &= hist.savePng("hist.png");
b &= hist2.savePng("hist2.png");
b &= hist3.savePng("hist3.png");
return b;
}
......
......@@ -2,13 +2,6 @@ project(Phoenix)
cmake_minimum_required(VERSION 2.8)
add_subdirectory(PHistogram)
add_subdirectory(PGnuplot)
file(GLOB_RECURSE math_SRC "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
add_library(phoenix_math SHARED ${math_SRC})
target_link_libraries(phoenix_math string_utils)
install(TARGETS phoenix_math LIBRARY DESTINATION ${LIBRARY_DIRECTORY} ARCHIVE DESTINATION ${LIBRARY_DIRECTORY})
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(FILES ${headers} DESTINATION include/PhoenixMath)
......
project(Phoenix)
cmake_minimum_required(VERSION 2.8)
file(GLOB headersFunction "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(FILES ${headersFunction} DESTINATION include/PhoenixMath/PGnuplot)
/***************************************
Auteur : Pierre Aubert
Mail : aubertp7@gmail.com
Licence : CeCILL-C
****************************************/
#include "PConfigPlot.h"
///Constructor of class PConfigPlot
PConfigPlot::PConfigPlot(){
initialisationPConfigPlot();
}
///Copy Constructor of class PConfigPlot
/** @param other : PConfigPlot we want ot copy
*/
PConfigPlot::PConfigPlot(const PConfigPlot & other){
copyPConfigPlot(other);
}
///Destructor of class PConfigPlot
PConfigPlot::~PConfigPlot(){
}
///Operator = of class PConfigPlot
/** @param other : PConfigPlot we want ot copy
* @return copied class PConfigPlot
*/
PConfigPlot & PConfigPlot::operator = (const PConfigPlot & other){
copyPConfigPlot(other);
return *this;
}
///Sets the width of the PConfigPlot
/** @param width : width of the PConfigPlot
*/
void PConfigPlot::setWidth(long unsigned int width){
p_width = width;
}
///Sets the height of the PConfigPlot
/** @param height : height of the PConfigPlot
*/
void PConfigPlot::setHeight(long unsigned int height){
p_height = height;
}
///Sets the fontSize of the PConfigPlot
/** @param fontSize : fontSize of the PConfigPlot
*/
void PConfigPlot::setFontSize(long unsigned int fontSize){
p_fontSize = fontSize;
}
///Sets the labelX of the PConfigPlot
/** @param labelX : labelX of the PConfigPlot
*/
void PConfigPlot::setLabelX(const std::string & labelX){
p_labelX = labelX;
}
///Sets the labelY of the PConfigPlot
/** @param labelY : labelY of the PConfigPlot
*/
void PConfigPlot::setLabelY(const std::string & labelY){
p_labelY = labelY;
}
///Sets the labelZ of the PConfigPlot
/** @param labelZ : labelZ of the PConfigPlot
*/
void PConfigPlot::setLabelZ(const std::string & labelZ){
p_labelZ = labelZ;
}
///Sets the logXaxis of the PConfigPlot
/** @param logXaxis : logXaxis of the PConfigPlot
*/
void PConfigPlot::setLogXaxis(bool logXaxis){
p_logXaxis = logXaxis;
}
///Sets the logYaxis of the PConfigPlot
/** @param logYaxis : logYaxis of the PConfigPlot
*/
void PConfigPlot::setLogYaxis(bool logYaxis){
p_logYaxis = logYaxis;
}
///Sets the logZaxis of the PConfigPlot
/** @param logZaxis : logZaxis of the PConfigPlot
*/
void PConfigPlot::setLogZaxis(bool logZaxis){
p_logZaxis = logZaxis;
}
///Sets the is3dPlot of the PConfigPlot
/** @param is3dPlot : is3dPlot of the PConfigPlot
*/
void PConfigPlot::setIs3dPlot(bool is3dPlot){
p_is3dPlot = is3dPlot;
}
///Sets the marginTop of the PConfigPlot
/** @param marginTop : marginTop of the PConfigPlot
*/
void PConfigPlot::setMarginTop(float marginTop){
p_marginTop = marginTop;
}
///Sets the marginBottom of the PConfigPlot
/** @param marginBottom : marginBottom of the PConfigPlot
*/
void PConfigPlot::setMarginBottom(float marginBottom){
p_marginBottom = marginBottom;
}
///Sets the marginLeft of the PConfigPlot
/** @param marginLeft : marginLeft of the PConfigPlot
*/
void PConfigPlot::setMarginLeft(float marginLeft){
p_marginLeft = marginLeft;
}
///Sets the marginRight of the PConfigPlot
/** @param marginRight : marginRight of the PConfigPlot
*/
void PConfigPlot::setMarginRight(float marginRight){
p_marginRight = marginRight;
}
///Sets the keepGnuplot of the PConfigPlot
/** @param keepGnuplot : keepGnuplot of the PConfigPlot
*/
void PConfigPlot::setKeepGnuplot(bool keepGnuplot){
p_keepGnuplot = keepGnuplot;
}
///Gets the width of the PConfigPlot
/** @return width of the PConfigPlot
*/
long unsigned int PConfigPlot::getWidth() const{
return p_width;
}
///Gets the width of the PConfigPlot
/** @return width of the PConfigPlot
*/
long unsigned int & PConfigPlot::getWidth(){
return p_width;
}
///Gets the height of the PConfigPlot
/** @return height of the PConfigPlot
*/
long unsigned int PConfigPlot::getHeight() const{
return p_height;
}
///Gets the height of the PConfigPlot
/** @return height of the PConfigPlot
*/
long unsigned int & PConfigPlot::getHeight(){
return p_height;
}
///Gets the fontSize of the PConfigPlot
/** @return fontSize of the PConfigPlot
*/
long unsigned int PConfigPlot::getFontSize() const{
return p_fontSize;
}
///Gets the fontSize of the PConfigPlot
/** @return fontSize of the PConfigPlot
*/
long unsigned int & PConfigPlot::getFontSize(){
return p_fontSize;
}
///Gets the labelX of the PConfigPlot
/** @return labelX of the PConfigPlot
*/
const std::string & PConfigPlot::getLabelX() const{
return p_labelX;
}
///Gets the labelX of the PConfigPlot
/** @return labelX of the PConfigPlot
*/
std::string & PConfigPlot::getLabelX(){
return p_labelX;
}
///Gets the labelY of the PConfigPlot
/** @return labelY of the PConfigPlot
*/
const std::string & PConfigPlot::getLabelY() const{
return p_labelY;
}
///Gets the labelY of the PConfigPlot
/** @return labelY of the PConfigPlot
*/
std::string & PConfigPlot::getLabelY(){
return p_labelY;
}
///Gets the labelZ of the PConfigPlot
/** @return labelZ of the PConfigPlot
*/
const std::string & PConfigPlot::getLabelZ() const{
return p_labelZ;
}
///Gets the labelZ of the PConfigPlot
/** @return labelZ of the PConfigPlot
*/
std::string & PConfigPlot::getLabelZ(){
return p_labelZ;
}
///Gets the logXaxis of the PConfigPlot
/** @return logXaxis of the PConfigPlot
*/
bool PConfigPlot::getLogXaxis() const{
return p_logXaxis;
}
///Gets the logXaxis of the PConfigPlot
/** @return logXaxis of the PConfigPlot
*/
bool & PConfigPlot::getLogXaxis(){
return p_logXaxis;
}
///Gets the logYaxis of the PConfigPlot
/** @return logYaxis of the PConfigPlot
*/
bool PConfigPlot::getLogYaxis() const{
return p_logYaxis;
}
///Gets the logYaxis of the PConfigPlot
/** @return logYaxis of the PConfigPlot
*/
bool & PConfigPlot::getLogYaxis(){
return p_logYaxis;
}
///Gets the logZaxis of the PConfigPlot
/** @return logZaxis of the PConfigPlot
*/
bool PConfigPlot::getLogZaxis() const{
return p_logZaxis;
}
///Gets the logZaxis of the PConfigPlot
/** @return logZaxis of the PConfigPlot
*/
bool & PConfigPlot::getLogZaxis(){
return p_logZaxis;
}
///Gets the is3dPlot of the PConfigPlot
/** @return is3dPlot of the PConfigPlot
*/
bool PConfigPlot::getIs3dPlot() const{
return p_is3dPlot;
}
///Gets the is3dPlot of the PConfigPlot
/** @return is3dPlot of the PConfigPlot
*/
bool & PConfigPlot::getIs3dPlot(){
return p_is3dPlot;
}
///Gets the marginTop of the PConfigPlot
/** @return marginTop of the PConfigPlot
*/
float PConfigPlot::getMarginTop() const{
return p_marginTop;
}
///Gets the marginTop of the PConfigPlot
/** @return marginTop of the PConfigPlot
*/
float & PConfigPlot::getMarginTop(){
return p_marginTop;
}
///Gets the marginBottom of the PConfigPlot
/** @return marginBottom of the PConfigPlot
*/
float PConfigPlot::getMarginBottom() const{
return p_marginBottom;
}
///Gets the marginBottom of the PConfigPlot
/** @return marginBottom of the PConfigPlot
*/
float & PConfigPlot::getMarginBottom(){
return p_marginBottom;
}
///Gets the marginLeft of the PConfigPlot
/** @return marginLeft of the PConfigPlot
*/
float PConfigPlot::getMarginLeft() const{
return p_marginLeft;
}
///Gets the marginLeft of the PConfigPlot
/** @return marginLeft of the PConfigPlot
*/
float & PConfigPlot::getMarginLeft(){
return p_marginLeft;
}
///Gets the marginRight of the PConfigPlot
/** @return marginRight of the PConfigPlot
*/
float PConfigPlot::getMarginRight() const{
return p_marginRight;
}
///Gets the marginRight of the PConfigPlot
/** @return marginRight of the PConfigPlot
*/
float & PConfigPlot::getMarginRight(){
return p_marginRight;
}
///Gets the keepGnuplot of the PConfigPlot
/** @return keepGnuplot of the PConfigPlot
*/
bool PConfigPlot::getKeepGnuplot() const{
return p_keepGnuplot;
}
///Gets the keepGnuplot of the PConfigPlot
/** @return keepGnuplot of the PConfigPlot
*/
bool & PConfigPlot::getKeepGnuplot(){
return p_keepGnuplot;
}
///Copy Function of class PConfigPlot
/** @param other : PConfigPlot we want ot copy
*/
void PConfigPlot::copyPConfigPlot(const PConfigPlot & other){
p_width = other.p_width;
p_height = other.p_height;
p_fontSize = other.p_fontSize;
p_labelX = other.p_labelX;
p_labelY = other.p_labelY;
p_labelZ = other.p_labelZ;
p_logXaxis = other.p_logXaxis;
p_logYaxis = other.p_logYaxis;
p_logZaxis = other.p_logZaxis;
p_is3dPlot = other.p_is3dPlot;
p_marginTop = other.p_marginTop;
p_marginBottom = other.p_marginBottom;
p_marginLeft = other.p_marginLeft;
p_marginRight = other.p_marginRight;
p_keepGnuplot = other.p_keepGnuplot;
}
///Init the PConfigPlot
void PConfigPlot::initialisationPConfigPlot(){
p_width = 800lu;
p_height = 600lu;
p_fontSize = 10lu;
p_labelX = "x";
p_labelY = "y";
p_labelZ = "z";
p_logXaxis = false;
p_logYaxis = false;
p_logZaxis = false;
p_is3dPlot = false;
p_marginTop = 0.95f;
p_marginBottom = 0.1f;
p_marginLeft = 0.08f;
p_marginRight = 0.85f;
p_keepGnuplot = true;
}
/***************************************
Auteur : Pierre Aubert
Mail : aubertp7@gmail.com
Licence : CeCILL-C
****************************************/
#ifndef __PCONFIGPLOT_H__
#define __PCONFIGPLOT_H__
#include <string>
// #include <inttypes.h>
///@brief Describes the configration of the plot
class PConfigPlot{
public:
PConfigPlot();
PConfigPlot(const PConfigPlot & other);
virtual ~PConfigPlot();
PConfigPlot & operator = (const PConfigPlot & other);
void setWidth(long unsigned int width);
void setHeight(long unsigned int height);
void setFontSize(long unsigned int fontSize);
void setLabelX(const std::string & labelX);
void setLabelY(const std::string & labelY);
void setLabelZ(const std::string & labelZ);
void setLogXaxis(bool logXaxis);
void setLogYaxis(bool logYaxis);
void setLogZaxis(bool logZaxis);
void setIs3dPlot(bool is3dPlot);
void setMarginTop(float marginTop);
void setMarginBottom(float marginBottom);
void setMarginLeft(float marginLeft);
void setMarginRight(float marginRight);
void setKeepGnuplot(bool keepGnuplot);
long unsigned int getWidth() const;
long unsigned int & getWidth();
long unsigned int getHeight() const;
long unsigned int & getHeight();
long unsigned int getFontSize() const;
long unsigned int & getFontSize();
const std::string & getLabelX() const;
std::string & getLabelX();
const std::string & getLabelY() const;
std::string & getLabelY();
const std::string & getLabelZ() const;
std::string & getLabelZ();
bool getLogXaxis() const;
bool & getLogXaxis();
bool getLogYaxis() const;
bool & getLogYaxis();
bool getLogZaxis() const;
bool & getLogZaxis();
bool getIs3dPlot() const;
bool & getIs3dPlot();
float getMarginTop() const;
float & getMarginTop();
float getMarginBottom() const;
float & getMarginBottom();
float getMarginLeft() const;
float & getMarginLeft();
float getMarginRight() const;
float & getMarginRight();
bool getKeepGnuplot() const;
bool & getKeepGnuplot();
protected:
void copyPConfigPlot(const PConfigPlot & other);
private:
void initialisationPConfigPlot();
///Width of the pix
long unsigned int p_width;
///Height of the pix
long unsigned int p_height;
///Font size
long unsigned int p_fontSize;
///Label of the x axis
std::string p_labelX;
///Label of the y axis
std::string p_labelY;
///Label of the z axis
std::string p_labelZ;
///Log scale of x axis
bool p_logXaxis;
///Log scale of y axis
bool p_logYaxis;
///Log scale of z axis
bool p_logZaxis;
///Says if it's a 3d plot
bool p_is3dPlot;
///Top margin of the pix
float p_marginTop;
///Bottom margin of the pix
float p_marginBottom;
///Left margin of the pix
float p_marginLeft;
///Right margin of the pix
float p_marginRight;
///Says if we want to keep the gnuplot generated file
bool p_keepGnuplot;
};
#endif
#include <string>
///@brief Describes the configration of the plot
PConfigPlot{
///Width of the pix
size_t width;
///Height of the pix
size_t height;
///Font size
size_t fontSize;
///Label of the x axis
std::string labelX;
///Label of the y axis
std::string labelY;
///Label of the z axis
std::string labelZ;
///Log scale of x axis
bool logXaxis;
///Log scale of y axis
bool logYaxis;
///Log scale of z axis
bool logZaxis;
///Says if it's a 3d plot
bool is3dPlot;