added switch for doc to configure.ac; added monilithic doc build; configure.ac and...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Jul 2008 19:35:33 +0000 (19:35 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Jul 2008 19:35:33 +0000 (19:35 +0000)
HLT/PHOS/AliHLTPHOSClusterizer.cxx
HLT/configure.ac
HLT/doc/Makefile.am

index a0ea835..04aabb6 100644 (file)
 #include "TClonesArray.h"
 #include "AliPHOSGeometry.h"
 #include "AliPHOSDigit.h"
+#ifndef HAVE_NOT_PHOSRECOPARAMEMC // set from configure if EMC functionality not available in AliPHOSRecoParam
 #include "AliPHOSRecoParam.h"
+#else
+#include "AliPHOSRecoParamEmc.h"
+#endif
 
 ClassImp(AliHLTPHOSClusterizer);
 
@@ -83,9 +87,16 @@ void
 AliHLTPHOSClusterizer::SetRecoParameters(AliPHOSRecoParam* params)
 {
   //see header file for documentation
+#ifndef HAVE_NOT_PHOSRECOPARAMEMC // set from configure if EMC functionality not available in AliPHOSRecoParam
+  // the new AliPHOSRecoParam functions, available from revision
   fEmcClusteringThreshold = params->GetEMCClusteringThreshold();
   fEmcMinEnergyThreshold = params->GetEMCMinE();
   fLogWeight = params->GetEMCLogWeight();
+#else
+  fEmcClusteringThreshold = params->GetClusteringThreshold();
+  fEmcMinEnergyThreshold = params->GetMinE();
+  fLogWeight = params->GetLogWeight();
+#endif
 }
 
 void
index 0f63a7a..f8b50a1 100644 (file)
@@ -653,6 +653,13 @@ else
                                        [AC_DEFINE(HAVE_ALICALORAWSTREAM)
                                        have_alicalorawstream=yes], 
                                       [])
+    AC_MSG_RESULT([$have_aliphosrecoparam])
+    AC_MSG_CHECKING([for required EMC functionality in AliPHOSRecoParam.h ])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliPHOSRecoParam.h>], 
+                                       [AliPHOSRecoParam param;
+                                       param.GetEMCClusteringThreshold()])],
+                                       [have_aliphosrecoparam=yes], 
+                                      [AC_DEFINE(HAVE_NOT_PHOSRECOPARAMEMC)])
     AC_MSG_RESULT([$have_alicalorawstream])
     AC_LANG_POP(C++)
     CPPFLAGS="$save_CPPFLAGS"
@@ -918,7 +925,6 @@ dnl
 AC_ARG_VAR(DOXYGEN, The Documentation Generator)
 AC_PATH_PROG(PERL, perl)
 AC_PATH_PROG(DOXYGEN, doxygen)
-AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
 AC_ARG_ENABLE(dot,
   [AC_HELP_STRING([--enable-dot],
       [enable dot documentation generator])],
@@ -930,6 +936,28 @@ if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
    HAVE_DOT=YES
    DOT_PATH=`dirname $DOT`
 fi
+
+AC_MSG_CHECKING([for documentation mode])
+AC_ARG_ENABLE(doc,
+  [AC_HELP_STRING([--disable-doc],
+      [disable documentation build; monolithic build --enable-doc=mono ])],
+  [],[enable_doc=modules])
+if test "x$DOXYGEN" = "x" ; then
+   enable_doc=no.doxygen
+elif test ! "x$enable_doc" = "xmono" && \
+     test ! "x$enable_doc" = "xmodules"  && \
+     test ! "x$enable_doc" = "xno"; then
+   enable_doc=no
+   AC_MSG_WARN([unknown option])
+fi
+if test "x$enable_doc" = "xno" ; then
+   enable_doc=off
+   DOXYGEN=
+fi
+
+AC_MSG_RESULT([$enable_doc])
+AM_CONDITIONAL(MONOLITHIC_DOC, test "x$enable_doc" = "xmono")
+AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
 AC_SUBST([HAVE_DOT])
 AC_SUBST([DOT_PATH])
 
index 40e10fc..892aa0d 100644 (file)
@@ -64,6 +64,16 @@ HTML                 =
 TAGS                   = 
 endif
 
+if MONOLITHIC_DOC
+RUN_MODULES            =
+MAIN_MODULE            = doxymono.conf readme.c sample_readme.c module_group.c
+MESSAGE                        = monolithic
+else
+RUN_MODULES            = $(TAGS) $(MODULES)
+MAIN_MODULE            = doxymain.conf
+MESSAGE                        = main
+endif
+
 DISTCLEANFILES         = doxy.log $(PACKAGE).tags
 
 CLEANFILES             = $(MODULES:%=$(PACKAGE).%.tags) \
@@ -79,11 +89,11 @@ CLASS_FILTER        = structAliHLTRawBuffer \
 %.png:%.fig
        fig2dev -Lpng $< 
 
-all-local: $(TAGS) $(MODULES) $(HTML) $(PDF)
+all-local: $(RUN_MODULES) $(HTML) $(PDF)
 
 
 clean-local: 
-       rm -rf *~ html latex man readme.c sample_readme.c module_group.c doxymain.conf
+       rm -rf *~ html latex man readme.c sample_readme.c module_group.c $(MAIN_MODULE) $(TAGS)
 
 readme.c: @top_srcdir@/README
        @cat $< | sed -e '/^=/s|=||g' -e '/^-/s|-||g'                     | \
@@ -133,12 +143,16 @@ doxymain.conf: doxygen.conf Makefile
        @t="$(foreach m, $(MODULES), @PACKAGE@.$(m).tags=$(m))"; \
        cat $< | sed -e "s|^\(TAGFILES[ ]*=\)|\1 $$t|" -e "/^WARN/s|NO|YES|"> $@
 
+doxymono.conf: doxygen.conf Makefile
+       @t="$(foreach m, $(MODULES), @top_srcdir@/$(m))"; \
+       cat $< | sed -e "s|^\(INPUT[ ]*=\)|\1 $$t|" -e "/^WARN/s|NO|YES|"> $@
+
 $(TAGS): doxygen.conf mainpage.c readme.c sample_readme.c module_group.c
        @echo creating main tag file ...
        $(DOXYGEN) $<  
 
-$(HTML): doxymain.conf
-       @echo creating main documentation ...
+$(HTML): $(MAIN_MODULE)
+       @echo creating $(MESSAGE) documentation ...
        $(DOXYGEN) $<  
 
 %.conf: doxymodule.conf Makefile