]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
changes due to pure virtual TBuffer class from root v5-15-02 on
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Feb 2007 09:24:58 +0000 (09:24 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Feb 2007 09:24:58 +0000 (09:24 +0000)
HLT/BASE/AliHLTMessage.cxx
HLT/BASE/AliHLTMessage.h
HLT/Makefile.am
HLT/configure.ac

index 4dccc808e5eeb79a11bfebd96089772668c3e141..4f1ccda95251baa491ba7c89587fb6d836d0ffd3 100644 (file)
@@ -40,7 +40,14 @@ const Int_t kMAXBUF = 0xffffff;
 ClassImp(AliHLTMessage)
 
 //______________________________________________________________________________
-AliHLTMessage::AliHLTMessage(UInt_t what) : TBuffer(kWrite)
+AliHLTMessage::AliHLTMessage(UInt_t what) 
+  :
+# ifdef ROOT_TBufferFile
+  TBufferFile(kWrite),
+# else
+  TBuffer(kWrite),
+# endif
+  AliHLTLogging()
 {
    // Create a AliHLTMessage object for storing objects. The "what" integer
    // describes the type of message. Predifined ROOT system message types
@@ -67,7 +74,14 @@ AliHLTMessage::AliHLTMessage(UInt_t what) : TBuffer(kWrite)
 }
 
 //______________________________________________________________________________
-AliHLTMessage::AliHLTMessage(void *buf, Int_t bufsize) : TBuffer(kRead, bufsize, buf, 0)
+AliHLTMessage::AliHLTMessage(void *buf, Int_t bufsize)
+  :
+# if defined(ROOT_TBufferFile) || defined(HAVE_TBUFFERFILE_H)
+  TBufferFile(kRead, bufsize, buf, 0),
+# else
+  TBuffer(kRead, bufsize, buf, 0),
+# endif
+  AliHLTLogging()
 {
    // Create a AliHLTMessage object for reading objects. The objects will be
    // read from buf. Use the What() method to get the message type.
index df3314b833e65ede77962f52d216551001f1880a..a3754a36c5b45c19ebc60e10687dc733987d0ce9 100644 (file)
 
 //////////////////////////////////////////////////////////////////////////
 //                                                                      //
-// TMessage                                                        //
+// TMessage                                                             //
 //                                                                      //
 // Message buffer class used for serializing objects and sending them   //
 // over the network.                                                    //
 //                                                                      //
 //////////////////////////////////////////////////////////////////////////
 
-#ifndef ROOT_TBuffer
-#include "TBuffer.h"
+// TBuffer has been made pure virtual in root version v5-15-02, this
+// requires to inherit from TBufferFile instead of TBuffer.
+// TMessage is not really used by this class but by including it we also get
+// TBufferFile if this exists. The define ROOT_TBufferFile can than be used
+// to differentiate between the usage of TBuffer or TBufferFile.
+#include "TMessage.h"
+
+#if defined(HAVE_TBUFFERFILE_H)
+#include "TBufferFile.h"
 #endif
+
 #ifndef ROOT_MessageTypes
 #include "MessageTypes.h"
 #endif
  * - the AliHLTMessage(void *buf, Int_t bufsize) constructor has been made
  *   public in order to be used externally.
  */
-class AliHLTMessage : public TBuffer, public AliHLTLogging {
+class AliHLTMessage 
+:
+# if defined(ROOT_TBufferFile) || defined(HAVE_TBUFFERFILE_H)
+public TBufferFile,
+#else
+public TBuffer,
+#endif
+public AliHLTLogging {
 
 public:
    AliHLTMessage(UInt_t what = kMESS_ANY);
index eac8e5af7d6f928c067b71cad14419e5395f0d81..72ff13380823a47eced5c9ae3312582fa583acf8 100644 (file)
@@ -28,6 +28,7 @@ SUBDIRS               = BASE \
 EXTRA_DIST             = libHLTbase.pkg \
                          libAliHLTSample.pkg \
                          libAliHLTPHOS.pkg \
+                         libAliHLTTPC.pkg \
                          libAliHLTTRD.pkg \
                          hlt.conf
 
index 07e060dbd1a4421cf8065759b1e77fbf5e5ca734..33ece15b410e9543f0de7ae1c153a23152416254 100644 (file)
@@ -44,7 +44,15 @@ AC_SUBST([ROOTSYS])
 ROOTBINDIR=`dirname $ROOTEXEC`
 AC_SUBST([ROOTBINDIR])
 
-dnl test for additional required root libraries
+dnl test for additional required root libraries and headers
+LIBS='-ldl'
+if test "x$have_root" = "x1"; then
+  AC_LANG_PUSH(C++)
+  save_CPPFLAGS=$CPPFLAGS
+  save_LDFLAGS=$LDFLAGS
+  save_LIBS=$LIBS
+  CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done`
+  
   # we check for the libSTEER library which is linked to
   # - the ROOT libs libGeom libMinuit libVMC libEG
   # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07)
@@ -52,23 +60,21 @@ dnl test for additional required root libraries
   # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires
   #   libTreePlayer.so
   # - from Jan 07 libESD also depends on libXMLIO
-LIBS='-ldl'
-if test "x$have_root" = "x1"; then
-  save_CPPFLAGS=$CPPFLAGS
-  save_LDFLAGS=$LDFLAGS
-  save_LIBS=$LIBS
-  
   ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO'
   for CHECKLIB in $ROOT_CHECKLIBS ; do
-    CPPFLAGS="$save_CPPFLAGS"
     LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
     LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS"
     AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"])
   done
-  
+
+  # TBuffer.h has been made pure virtual in root v5-15-02 and one
+  # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h)
+  AC_CHECK_HEADERS([TBufferFile.h])
+
   CPPFLAGS=$save_CPPFLAGS
   LDFLAGS=$save_LDFLAGS
   LIBS=$save_LIBS
+  AC_LANG_POP(C++)
 fi
 
 dnl ------------------------------------------------------------------