Commit 0c705950 authored by Hendrik Hoeth's avatar Hendrik Hoeth
Browse files

detect whether Rivet uses AIDA or YODA (merge from trunk)

parent ac28f378
......@@ -37,6 +37,9 @@
/* setSumOfWeights function available in Rivet */
#undef USING__RIVET__SETSOW
/* Rivet uses YODA as its histogramming backend */
#undef USING__RIVET__YODA
/* using FASTJET */
#undef USING__FASTJET
......
......@@ -289,7 +289,11 @@ public:
if (it->first.first!="") out+="."+it->first.first;
if (it->first.second!=0) out+=".j"+ToString(it->first.second);
it->second->finalize();
#ifdef USING__RIVET__YODA
it->second->writeData(out+".yoda");
#else
it->second->writeData(out+".aida");
#endif
}
m_finished=true;
return true;
......
......@@ -437,6 +437,7 @@ AC_DEFUN([SHERPA_SETUP_CONFIGURE_OPTIONS],
CONDITIONAL_RIVETLDADD="$($CONDITIONAL_RIVETDIR/bin/rivet-config --ldflags) $($CONDITIONAL_RIVETDIR/bin/rivet-config --ldadd)";
CONDITIONAL_RIVETCPPFLAGS="$($CONDITIONAL_RIVETDIR/bin/rivet-config --cppflags)";
AC_MSG_RESULT([${CONDITIONAL_RIVETDIR}]); rivet=true;
"$CONDITIONAL_RIVETDIR/bin/rivet-config" --version | grep -q '^1\.' || rivetyoda=true
else
AC_MSG_ERROR(Unable to use Rivet from specified path.);
fi;
......@@ -453,6 +454,9 @@ AC_DEFUN([SHERPA_SETUP_CONFIGURE_OPTIONS],
if test "$rivetsetsow" = "true" ; then
AC_DEFINE([USING__RIVET__SETSOW], "1", [setSumOfWeights function available in Rivet])
fi
if test "$rivetyoda" = "true" ; then
AC_DEFINE([USING__RIVET__YODA], "1", [Rivet uses YODA as its histogramming backend])
fi
AC_SUBST(CONDITIONAL_RIVETLDADD)
AC_SUBST(CONDITIONAL_RIVETCPPFLAGS)
AM_CONDITIONAL(RIVET_SUPPORT, test "$rivet" = "true")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment