Making the TPCLib compatible with the trunk of Jan 2009
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 May 2009 14:30:11 +0000 (14:30 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 May 2009 14:30:11 +0000 (14:30 +0000)
- deleted deprecated include header from AliHLTTPCTransform
- using AliRunLoader::GetRunLoader instead of gAlice->GetRunLoader

Filter out more compiler defines when calling rootcint due to bug
https://savannah.cern.ch/bugs/?31089

Deactivate TRD module if dependency AliTRDclusterizer::GetAddedClusters not resolved

Adjust MUON module to compile with Jan 2009 trunk (before changes in r 31742 and 31769)

HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructorComponent.cxx
HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.cxx
HLT/MUON/utils/AliHLTMUONDataCheckerComponent.cxx
HLT/SampleLib/Makefile.am
HLT/TPCLib/AliHLTTPCTransform.cxx
HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx
HLT/configure.ac
HLT/make.dict

index 03c0d69cb0cb21efde6d1551bc931683c1581b30..8a2be312005b89f6779153fa56f40bc051a48ede 100644 (file)
@@ -962,27 +962,48 @@ int AliHLTMUONHitReconstructorComponent::ReadLutFromCDB()
                                for (Int_t iX = 0; iX<= maxIX ; iX++)
                                for (Int_t iY = 0; iY<= maxIY ; iY++)
                                {
+#ifndef HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                        if (not seg->HasPadByIndices(iX,iY)) continue;
+#else // old AliMpPad functionality < r 31742
+                                       if (not seg->HasPad(AliMpIntPair(iX,iY))) continue;
+#endif
 
+#ifndef HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                        AliMpPad pad = seg->PadByIndices(iX,iY, kFALSE);
+#else // old AliMpPad functionality < r 31742
+                                       AliMpPad pad = seg->PadByIndices(AliMpIntPair(iX,iY), kFALSE);
+#endif
                                        
                                        // Getting Manu id
+#ifndef HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                        manuId = pad.GetManuId();
+#else // old AliMpPad functionality < r 31742
+                                       manuId = pad.GetLocation().GetFirst();
+#endif
                                        manuId &= 0x7FF; // 11 bits 
                                        if(!calibData.Pedestals(detElemId, manuId)) continue;
                        
                                        buspatchId = ddlStore->GetBusPatchId(detElemId,manuId);
                                        
                                        // Getting channel id
+#ifndef HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                        channelId =  pad.GetManuChannel();
+#else // old AliMpPad functionality < r 31742
+                                       channelId =  pad.GetLocation().GetSecond();
+#endif
                                        channelId &= 0x3F; // 6 bits
                                        
                                        idManuChannel = buspatchId << 11;
                                        idManuChannel = (idManuChannel | manuId) << 6;
                                        idManuChannel |= channelId;
                                        
+#ifndef HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                        localX = pad.GetPositionX();
                                        localY = pad.GetPositionY();
+#else // old AliMpPad functionality < r 31769
+                                       localX = pad.Position().X();
+                                       localY = pad.Position().Y();
+#endif //HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                        localZ = 0.0;
                                        
                                        chamberGeometryTransformer.Local2Global(
@@ -990,8 +1011,13 @@ int AliHLTMUONHitReconstructorComponent::ReadLutFromCDB()
                                                realX,realY,realZ
                                        );
                                        
+#ifndef HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                        padSizeX = AliHLTFloat32_t( pad.GetDimensionX() );
                                        padSizeY = AliHLTFloat32_t( pad.GetDimensionY() );
+#else // old AliMpPad functionality < r 31769
+                                       padSizeX = AliHLTFloat32_t( pad.Dimensions().X() );
+                                       padSizeY = AliHLTFloat32_t( pad.Dimensions().Y() );
+#endif //HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                        
                                        if (fUseIdealGain)
                                        {
index ffbde8f53d7439cfbd6010a3501f60a033b9f007..1398d8aa158f65d50d21a365877f6a860b7800ac 100644 (file)
@@ -980,7 +980,12 @@ int AliHLTMUONTriggerReconstructorComponent::ReadLutFromCDB()
                                                Int_t offset = 0;
                                                if (iCathode && localBoard->GetSwitch(6)) offset = -8;
                                                
+// just use this switch for simplicity for two different but shortly after each other applied changes
+#ifndef HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                                AliMpPad pad = seg->PadByLocation(boardId, bitxy+offset, kFALSE);
+#else // old AliMpPad functionality < r 31742
+                                               AliMpPad pad = seg->PadByLocation(AliMpIntPair(boardId, bitxy+offset), kFALSE);
+#endif //HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                        
                                                if (! pad.IsValid())
                                                {
@@ -989,8 +994,13 @@ int AliHLTMUONTriggerReconstructorComponent::ReadLutFromCDB()
                                                }
                                                
                                                // Get the global coodinates of the pad.
+#ifndef HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                                Float_t lx = pad.GetPositionX();
                                                Float_t ly = pad.GetPositionY();
+#else // old AliMpPad functionality < r 31769
+                                               Float_t lx = pad.Position().X();
+                                               Float_t ly = pad.Position().Y();
+#endif //HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                                Float_t gx, gy, gz;
                                                detElemTransform->Local2Global(lx, ly, 0, gx, gy, gz);
                                                
index 827ba75de626c6d73eba9cf4f7be3ad20f6cf129..5e5975c4143259610a9b7d67968a2a9d294db1f1 100644 (file)
@@ -1813,7 +1813,11 @@ bool AliHLTMUONDataCheckerComponent::CheckRawDataBlock(
                                        continue;
                                }
                                
+#ifndef HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                AliMpPad pad = seg->PadByLocation(manuId, channelId, warn);
+#else // old AliMpPad functionality < r 31742
+                               AliMpPad pad = seg->PadByLocation(AliMpIntPair(manuId, channelId), warn);
+#endif //HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                if (not pad.IsValid())
                                {
                                        HLTError("Problem found with data block %d, fDataType = '%s',"
@@ -2458,7 +2462,11 @@ bool AliHLTMUONDataCheckerComponent::CheckChannelsBlock(
                        }
                        
                        AliMpPad pad = seg->PadByLocation(
+#ifndef HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                        channel.fManu, channel.fChannelAddress,
+#else // old AliMpPad functionality < r 31742
+                                       AliMpIntPair(channel.fManu, channel.fChannelAddress),
+#endif //HAVE_NOT_MUON_ALIMPPAD_GETPOSITION
                                        warn
                                );
                        if (not pad.IsValid())
index 72da0e8248e8e909edf21a1cf96de03429b59448..2ecb1e884bd09f34598cb52212c4ba922dcbb797 100644 (file)
@@ -104,7 +104,7 @@ CLEANFILES                  += $(DICTFILES)
 
 # the rootcint buffer for macros is limited to 1024 characters
 # we have to filter out some of the defines
-DEFFILTER                      = -DPACKAGE* -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
+DEFFILTER                      = -DPACKAGE* -DHAVE_STDLIB_H=1* -DHAVE_STRING_H=1* -DHAVE_MEMORY_H=1* -DHAVE_STRINGS_H=1* -DHAVE_INTTYPES_H=1* -DHAVE_STDINT_H=1* -DHAVE_UNISTD_H=1* -DHAVE_DLFCN_H=1* -DHAVE_NOT_*
 
 
 $(DICTCPP:.cxx=.h): $(DICTCPP)
index 38634e48145453e46873d0c0a234d4dd4e8edd31..2788184d12aea334b59edfe9582b127794d35251 100644 (file)
@@ -18,7 +18,6 @@
 #ifdef use_root
 #include <TError.h>
 #include <TFile.h>
-#include <TGeoGlobalMagField.h>
 #include <TTimeStamp.h>
 #include <TUnixSystem.h>
 #endif
index 52fd9c7fe9f041c39f26c2e6dcd07ec70560f0f0..582e91eef05dc7a61fefb5d3f7a10acfea8a2bf6 100644 (file)
@@ -175,7 +175,7 @@ int AliTPCtrackerCA::LoadClusters ( TTree * fromTree )
     AliRunLoader *rl = AliRunLoader::Instance();//gAlice->GetRunLoader();
 #else
     // the old way before rev 30859
-    AliRunLoader *rl = gAlice->GetRunLoader();
+    AliRunLoader *rl = AliRunLoader::GetRunLoader();
 #endif
     if ( !rl ) break;
     rl->LoadKinematics();
index 35df141001bd5fc83363410957c509642a04dc09..31839adf0cf97697aac39edb3a4f55c69ff83ed5 100644 (file)
@@ -789,10 +789,11 @@ else
     # changed to AliTRDReconstructor::SetStreamLevel() due to revision 27797, Tue Aug 5 2008
     # changed to AliTRDReconstructor::SetClusters() according to revision 28069, Mon Aug 18 2008
     # changed to AliTRDCluster according to revision 30461, Thu Dec 18 2008
-    AC_MSG_CHECKING([for required functions in AliTRDCluster])
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDcluster.h>], 
-                                       [AliTRDcluster c;
-                                      c.SetDetector(0)])],
+    # changed to AliTRDclusterizer::GetAddedClusters according to revision 31299, Wed Mar 4 2009
+    AC_MSG_CHECKING([for required functions in AliTRDclusterizer])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDclusterizer.h>], 
+                                       [AliTRDclusterizer c;
+                                      c.GetAddedClusters()])],
                                        [], 
                                       [enable_trd="no...requires.AliRoot>v4-16-Release"])
     AC_MSG_RESULT([$enable_trd])       
@@ -883,6 +884,25 @@ if test "x$enable_muon" = "xyes" ; then
                                      [AC_DEFINE(HAVE_NOT_MUON_DIGITMAKER_GETRAWSTREAM)])
     LIBS=$save_LIBS
   AC_MSG_RESULT([$have_muon_digitmaker_getrawstream])
+
+  dnl
+  dnl Check for AliMpPad::GetPositionX/Y
+  dnl change of implementation in MUON code
+  dnl revision 31769, Wed Apr 1 2009
+  dnl 
+  have_muon_alimppad_getposition=no
+  AC_MSG_CHECKING(for GetPosition methods of AliMpPad)
+    CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON/mapping"
+    LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
+    LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMpPad.h>], 
+                                    [AliMpPad pad;
+                                    pad.GetPositionX();])],
+                                    [have_muon_alimppad_getposition=yes], 
+                                     [AC_DEFINE(HAVE_NOT_MUON_ALIMPPAD_GETPOSITION)])
+    LIBS=$save_LIBS
+  AC_MSG_RESULT([$have_muon_alimppad_getposition])
+
   CPPFLAGS="$save_CPPFLAGS"
 
   AC_LANG_POP(C++)
index 11f40b23ff92957f06d05056ea99d1f9f6dfa8ad..08c206d53d2137408338ae199e94a3dfca624d3c 100644 (file)
@@ -35,7 +35,9 @@ EXTRA_DIST                    += $(MODULE_DHDR)
 
 # the rootcint buffer for macros is limited to 1024 characters
 # we have to filter out some of the defines
-DEFFILTER                      = -DPACKAGE* -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
+# The asterisk at the end is important even for defines which
+# are not wildcards. But otherwise the case does not pick them.
+DEFFILTER                      = -DPACKAGE* -DHAVE_STDLIB_H=1* -DHAVE_STRING_H=1* -DHAVE_MEMORY_H=1* -DHAVE_STRINGS_H=1* -DHAVE_INTTYPES_H=1* -DHAVE_STDINT_H=1* -DHAVE_UNISTD_H=1* -DHAVE_DLFCN_H=1* -DHAVE_NOT_ALIMAGF30848* -DHAVE_NOT_ALTRORAWSTREAMV3* -DHAVE_NOT_ALIRUNLOADER30859* -DHAVE_NOT_ESD_COPY* -DHAVE_NOT_MUON_DIGITMAKER_GETRAWSTREAM* -DHAVE_NOT_ALITPCCALIBPULSER* -DHAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER* -DHAVE_NOT_TPCOFFLINE_REC*
 
 $(DICTCPP:.cxx=.h): $(DICTCPP)
        if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi