mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-07-15 01:17:06 +01:00
CMake first working compilation for library
This commit is contained in:
@ -72,7 +72,7 @@ string PlotObject::dumpToTmpFile(const DMat &m)
|
||||
for (Index j = 0; j < m.cols(); ++j)
|
||||
{
|
||||
}
|
||||
sprintf(tmpFileName, "%s/latan_plot_tmp.XXXXXX.dat", P_tmpdir);
|
||||
snprintf(tmpFileName, sizeof(tmpFileName), "%s/latan_plot_tmp.XXXXXX.dat", P_tmpdir);
|
||||
fd = mkstemps(tmpFileName, 4);
|
||||
if (fd == -1)
|
||||
{
|
||||
@ -699,7 +699,7 @@ Plot & Plot::operator<<(PlotModifier &&modifier)
|
||||
|
||||
// find gnuplot ////////////////////////////////////////////////////////////////
|
||||
#define SEARCH_DIR(dir) \
|
||||
sprintf(buf, "%s/%s", dir, gnuplotBin_.c_str());\
|
||||
snprintf(buf, sizeof(buf), "%s/%s", dir, gnuplotBin_.c_str());\
|
||||
if (access(buf, X_OK) == 0)\
|
||||
{\
|
||||
return dir;\
|
||||
|
@ -25,11 +25,10 @@ using namespace Latan;
|
||||
|
||||
PlaceHolder Latan::_;
|
||||
|
||||
const string Env::fullName = PACKAGE_STRING;
|
||||
const string Env::name = PACKAGE_NAME;
|
||||
const string Env::version = PACKAGE_VERSION;
|
||||
const string Env::msgPrefix = "[" + strFrom(PACKAGE_NAME) + " v"
|
||||
+ strFrom(PACKAGE_VERSION) + "] ";
|
||||
const string Env::fullName = strFrom(PROJECT_NAME) + " v" + strFrom(PROJECT_VERSION);
|
||||
const string Env::name = PROJECT_NAME;
|
||||
const string Env::version = PROJECT_VERSION;
|
||||
const string Env::msgPrefix = "[" + Env::fullName + "] ";
|
||||
|
||||
void Env::function(void)
|
||||
{}
|
||||
|
@ -30,8 +30,12 @@ namespace ROOT
|
||||
};
|
||||
|
||||
// macros necessary in the ROOT-based version of Minuit2
|
||||
#ifndef ROOT_Math_VecTypes
|
||||
#define ROOT_Math_VecTypes
|
||||
#endif
|
||||
#ifndef MATHCORE_STANDALONE
|
||||
#define MATHCORE_STANDALONE
|
||||
#endif
|
||||
|
||||
#include <Minuit2/Minuit2Minimizer.h>
|
||||
#include <Math/Functor.h>
|
||||
|
@ -108,15 +108,15 @@ void SampleFitResult::print(const bool printXsi, ostream &out) const
|
||||
Index pMax = printXsi ? size() : nPar_;
|
||||
DMat err = this->variance().cwiseSqrt();
|
||||
|
||||
sprintf(buf, "chi^2/dof= %.1e/%d= %.2e -- chi^2 CCDF= %.2e -- p-value= %.2e",
|
||||
snprintf(buf, sizeof(buf), "chi^2/dof= %.1e/%d= %.2e -- chi^2 CCDF= %.2e -- p-value= %.2e",
|
||||
getChi2(), static_cast<int>(getNDof()), getChi2PerDof(), getCcdf(),
|
||||
getPValue());
|
||||
out << buf << endl;
|
||||
sprintf(buf, "correlation dynamic range= %.1f dB", getCorrRangeDb());
|
||||
snprintf(buf, sizeof(buf), "correlation dynamic range= %.1f dB", getCorrRangeDb());
|
||||
out << buf << endl;
|
||||
for (Index p = 0; p < pMax; ++p)
|
||||
{
|
||||
sprintf(buf, "%12s= % e +/- %e", parName_[p].c_str(),
|
||||
snprintf(buf, sizeof(buf), "%12s= % e +/- %e", parName_[p].c_str(),
|
||||
(*this)[central](p), err(p));
|
||||
out << buf << endl;
|
||||
}
|
||||
|
@ -76,15 +76,15 @@ void FitResult::print(const bool printXsi, ostream &out) const
|
||||
char buf[256];
|
||||
Index pMax = printXsi ? size() : nPar_;
|
||||
|
||||
sprintf(buf, "chi^2/dof= %.1e/%d= %.2e -- chi^2 CCDF= %.2e -- p-value= %.2e",
|
||||
snprintf(buf, sizeof(buf), "chi^2/dof= %.1e/%d= %.2e -- chi^2 CCDF= %.2e -- p-value= %.2e",
|
||||
getChi2(), static_cast<int>(getNDof()), getChi2PerDof(), getCcdf(),
|
||||
getPValue());
|
||||
out << buf << endl;
|
||||
sprintf(buf, "correlation dynamic range= %.1f dB", getCorrRangeDb());
|
||||
snprintf(buf, sizeof(buf), "correlation dynamic range= %.1f dB", getCorrRangeDb());
|
||||
out << buf << endl;
|
||||
for (Index p = 0; p < pMax; ++p)
|
||||
{
|
||||
sprintf(buf, "%12s= %e", parName_[p].c_str(), (*this)(p));
|
||||
snprintf(buf, sizeof(buf), "%12s= %e", parName_[p].c_str(), (*this)(p));
|
||||
out << buf << endl;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user