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
|
%module lhapdf
%include "std_string.i"
%include "std_vector.i"
//%include "std_except.i"
%{
#define SWIG_FILE_WITH_INIT
#include "LHAPDF/LHAPDF.h"
#include <cstddef>
%}
namespace LHAPDF {
class PDFSetInfo;
%ignore SetType;
%ignore initPDFSet(const std::string& name, SetType type, int member=0);
%ignore initPDFSet(int nset, const std::string& name, SetType type, int member=0);
}
%template(PDFSetInfoList) std::vector<LHAPDF::PDFSetInfo>;
%template(FloatList) std::vector<double>;
//%catches(std::runtime_error) LHAPDF;
%include "LHAPDF/LHAPDF.h"
%extend LHAPDF::PDFSetInfo {
std::string __str__() {
return $self->toString();
}
}
|