From b4214950b0a57b050d7c144e90c89b911da33a80 Mon Sep 17 00:00:00 2001 From: Klaus Rabbertz <klaus.rabbertz@cern.ch> Date: Wed, 16 Jun 2021 11:01:58 +0200 Subject: [PATCH] Fix little issues with pyext & add D. Kalinkins suggestion; change some info to debug messages --- v2.5/toolkit/fastnlotoolkit/fastNLOReader.cc | 4 ++-- .../fastnlotoolkit/include/fastnlotk/fastNLOTable.h | 4 ---- v2.5/toolkit/pyext/Makefile.am | 4 ++-- v2.5/toolkit/pyext/fastnlo.i | 8 ++++++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/v2.5/toolkit/fastnlotoolkit/fastNLOReader.cc b/v2.5/toolkit/fastnlotoolkit/fastNLOReader.cc index aa090f45..b292eff6 100644 --- a/v2.5/toolkit/fastnlotoolkit/fastNLOReader.cc +++ b/v2.5/toolkit/fastnlotoolkit/fastNLOReader.cc @@ -1502,7 +1502,7 @@ void fastNLOReader::CalcCrossSectionv21(fastNLOCoeffAddFlex* c) { iCIBFlag2 = c->GetCoeffInfoBlockFlag2(iCIBIndex); dCIBCont = c->GetCoeffInfoContent(iCIBIndex); } else { - logger.info["CalcCrossSectionv21"]<<"No CoeffInfoBlock found; uncertainties are initialised to zero."<<endl; + logger.debug["CalcCrossSectionv21"]<<"No CoeffInfoBlock found; uncertainties are initialised to zero."<<endl; } for (unsigned int i=0; i<NObsBin; i++) { @@ -1618,7 +1618,7 @@ void fastNLOReader::CalcCrossSectionv20(fastNLOCoeffAddFix* c) { iCIBFlag2 = c->GetCoeffInfoBlockFlag2(iCIBIndex); dCIBCont = c->GetCoeffInfoContent(iCIBIndex); } else { - logger.info["CalcCrossSectionv20"]<<"No CoeffInfoBlock found; uncertainties are initialised to zero."<<endl; + logger.debug["CalcCrossSectionv20"]<<"No CoeffInfoBlock found; uncertainties are initialised to zero."<<endl; } int scaleVar = c->GetNpow() == ILOord ? 0 : fScalevar; diff --git a/v2.5/toolkit/fastnlotoolkit/include/fastnlotk/fastNLOTable.h b/v2.5/toolkit/fastnlotoolkit/include/fastnlotk/fastNLOTable.h index bde76acd..25aec898 100644 --- a/v2.5/toolkit/fastnlotoolkit/include/fastnlotk/fastNLOTable.h +++ b/v2.5/toolkit/fastnlotoolkit/include/fastnlotk/fastNLOTable.h @@ -246,10 +246,6 @@ class fastNLOTable { /// Returns pointer to reference table if available, else returns NULL pointer fastNLOCoeffAddBase* GetReferenceTable(fastNLO::ESMOrder eOrder) const; - /// Handle InfoBlocks - int CreateInfoBlock(int no, fastNLOCoeffBase *newinfoblock); - - private: bool cmp(const double x1, const double x2) const; bool cmp(const std::vector<double>& x1, const std::vector<double >& x2) const; diff --git a/v2.5/toolkit/pyext/Makefile.am b/v2.5/toolkit/pyext/Makefile.am index c5de0bd9..5499ed66 100644 --- a/v2.5/toolkit/pyext/Makefile.am +++ b/v2.5/toolkit/pyext/Makefile.am @@ -16,7 +16,7 @@ if ENABLE_PYEXT python_PYTHON = fastnlo.py pyexec_LTLIBRARIES = _fastnlo.la -_fastnlo_la_SOURCES = fastnlo_wrap.cc +_fastnlo_la_SOURCES = fastnlo_wrap.cc fastnlo_wrap.h _fastnlo_la_CPPFLAGS = $(PYTHON_CPPFLAGS) -I$(top_srcdir)/fastnlotoolkit/include/fastnlotk -I$(LHAPDFINCLUDEPATH) _fastnlo_la_LDFLAGS = -module -shared -avoid-version _fastnlo_la_LIBADD = $(top_srcdir)/fastnlotoolkit/libfastnlotoolkit.la @@ -29,7 +29,7 @@ fastnlo_wrap.cc: fastnlo.i $(SWIG) -c++ -python -I$(top_srcdir)/fastnlotoolkit/include/fastnlotk -o $@ -MD -MF $(DEPDIR)/fastnlo_wrap.Plo $< clean-local: - rm -f fastnlo_wrap.cc fastnlo.py + rm -f fastnlo_wrap.cc fastnlo_wrap.h fastnlo.py #$(DEPDIR)/fastnlo_wrap.Plo endif diff --git a/v2.5/toolkit/pyext/fastnlo.i b/v2.5/toolkit/pyext/fastnlo.i index 93536f37..171cd267 100644 --- a/v2.5/toolkit/pyext/fastnlo.i +++ b/v2.5/toolkit/pyext/fastnlo.i @@ -1,4 +1,8 @@ -%module fastnlo +// To be tested: Following suggestion from Dmitry Kalinkin, 12.06.2021 +%module(directors="1") fastnlo + +// generate directors for all classes that have virtual methods +%feature("director"); %{ /** @@ -47,7 +51,7 @@ namespace std { %} %include "../fastnlotoolkit/include/fastnlotk/speaker.h" %include "../fastnlotoolkit/include/fastnlotk/fastNLOPDFLinearCombinations.h" -//%include "../fastnlotoolkit/include/fastnlotk/fastNLOConstants.h" +%include "../fastnlotoolkit/include/fastnlotk/fastNLOConstants.h" %include "../fastnlotoolkit/include/fastnlotk/fastNLOTable.h" %include "../fastnlotoolkit/include/fastnlotk/fastNLOReader.h" %include "../fastnlotoolkit/include/fastnlotk/fastNLOLHAPDF.h" -- GitLab