TRD DAs
authoragrigora <alina.grigoras@cern.ch>
Wed, 26 Nov 2014 15:48:14 +0000 (16:48 +0100)
committeragrigora <alina.grigoras@cern.ch>
Mon, 15 Dec 2014 12:52:02 +0000 (13:52 +0100)
47 files changed:
TRD/CMakeLists.txt
TRD/DA/CMakeLists.txt [new file with mode: 0644]
TRD/DA/TRDHALFCHAMBERSTATUSda.cxx [moved from TRD/TRDHALFCHAMBERSTATUSda.cxx with 100% similarity]
TRD/DA/TRDPEDESTALda.cxx [moved from TRD/TRDPEDESTALda.cxx with 100% similarity]
TRD/DA/TRDVDRIFTda.cxx [moved from TRD/TRDVDRIFTda.cxx with 100% similarity]
TRD/TRDbase/AliTRDCalibraFillHisto.cxx [moved from TRD/TRDrec/AliTRDCalibraFillHisto.cxx with 100% similarity]
TRD/TRDbase/AliTRDCalibraFillHisto.h [moved from TRD/TRDrec/AliTRDCalibraFillHisto.h with 100% similarity]
TRD/TRDbase/AliTRDReconstructor.cxx [moved from TRD/TRDrec/AliTRDReconstructor.cxx with 100% similarity]
TRD/TRDbase/AliTRDReconstructor.h [moved from TRD/TRDrec/AliTRDReconstructor.h with 100% similarity]
TRD/TRDbase/AliTRDchamberTimeBin.cxx [moved from TRD/TRDrec/AliTRDchamberTimeBin.cxx with 100% similarity]
TRD/TRDbase/AliTRDchamberTimeBin.h [moved from TRD/TRDrec/AliTRDchamberTimeBin.h with 100% similarity]
TRD/TRDbase/AliTRDcluster.cxx [moved from TRD/TRDrec/AliTRDcluster.cxx with 100% similarity]
TRD/TRDbase/AliTRDcluster.h [moved from TRD/TRDrec/AliTRDcluster.h with 100% similarity]
TRD/TRDbase/AliTRDclusterizer.cxx [moved from TRD/TRDrec/AliTRDclusterizer.cxx with 100% similarity]
TRD/TRDbase/AliTRDclusterizer.h [moved from TRD/TRDrec/AliTRDclusterizer.h with 100% similarity]
TRD/TRDbase/AliTRDdEdxBaseUtils.cxx [moved from TRD/TRDrec/AliTRDdEdxBaseUtils.cxx with 100% similarity]
TRD/TRDbase/AliTRDdEdxBaseUtils.h [moved from TRD/TRDrec/AliTRDdEdxBaseUtils.h with 100% similarity]
TRD/TRDbase/AliTRDdEdxCalibHistArray.cxx [moved from TRD/TRDrec/AliTRDdEdxCalibHistArray.cxx with 100% similarity]
TRD/TRDbase/AliTRDdEdxCalibHistArray.h [moved from TRD/TRDrec/AliTRDdEdxCalibHistArray.h with 100% similarity]
TRD/TRDbase/AliTRDdEdxCalibUtils.cxx [moved from TRD/TRDrec/AliTRDdEdxCalibUtils.cxx with 100% similarity]
TRD/TRDbase/AliTRDdEdxCalibUtils.h [moved from TRD/TRDrec/AliTRDdEdxCalibUtils.h with 100% similarity]
TRD/TRDbase/AliTRDdEdxReconUtils.cxx [moved from TRD/TRDrec/AliTRDdEdxReconUtils.cxx with 100% similarity]
TRD/TRDbase/AliTRDdEdxReconUtils.h [moved from TRD/TRDrec/AliTRDdEdxReconUtils.h with 100% similarity]
TRD/TRDbase/AliTRDpidUtil.cxx [moved from TRD/TRDrec/AliTRDpidUtil.cxx with 100% similarity]
TRD/TRDbase/AliTRDpidUtil.h [moved from TRD/TRDrec/AliTRDpidUtil.h with 100% similarity]
TRD/TRDbase/AliTRDseedV1.cxx [moved from TRD/TRDrec/AliTRDseedV1.cxx with 100% similarity]
TRD/TRDbase/AliTRDseedV1.h [moved from TRD/TRDrec/AliTRDseedV1.h with 100% similarity]
TRD/TRDbase/AliTRDtrackV1.cxx [moved from TRD/TRDrec/AliTRDtrackV1.cxx with 100% similarity]
TRD/TRDbase/AliTRDtrackV1.h [moved from TRD/TRDrec/AliTRDtrackV1.h with 100% similarity]
TRD/TRDbase/AliTRDtrackerDebug.cxx [moved from TRD/TRDrec/AliTRDtrackerDebug.cxx with 100% similarity]
TRD/TRDbase/AliTRDtrackerDebug.h [moved from TRD/TRDrec/AliTRDtrackerDebug.h with 100% similarity]
TRD/TRDbase/AliTRDtrackerV1.cxx [moved from TRD/TRDrec/AliTRDtrackerV1.cxx with 100% similarity]
TRD/TRDbase/AliTRDtrackerV1.h [moved from TRD/TRDrec/AliTRDtrackerV1.h with 100% similarity]
TRD/TRDbase/AliTRDtrackingChamber.cxx [moved from TRD/TRDrec/AliTRDtrackingChamber.cxx with 100% similarity]
TRD/TRDbase/AliTRDtrackingChamber.h [moved from TRD/TRDrec/AliTRDtrackingChamber.h with 100% similarity]
TRD/TRDbase/AliTRDtrackingSector.cxx [moved from TRD/TRDrec/AliTRDtrackingSector.cxx with 100% similarity]
TRD/TRDbase/AliTRDtrackingSector.h [moved from TRD/TRDrec/AliTRDtrackingSector.h with 100% similarity]
TRD/TRDbase/AliTRDtrackletOflHelper.cxx [moved from TRD/TRDrec/AliTRDtrackletOflHelper.cxx with 100% similarity]
TRD/TRDbase/AliTRDtrackletOflHelper.h [moved from TRD/TRDrec/AliTRDtrackletOflHelper.h with 100% similarity]
TRD/TRDbase/AliTRDtransform.cxx [moved from TRD/TRDrec/AliTRDtransform.cxx with 100% similarity]
TRD/TRDbase/AliTRDtransform.h [moved from TRD/TRDrec/AliTRDtransform.h with 100% similarity]
TRD/TRDbase/CMakeLists.txt
TRD/TRDbase/TRDbaseLinkDef.h
TRD/TRDrec/AliTRDqaRecPoints.h
TRD/TRDrec/CMakeLists.txt
TRD/TRDrec/TRDrecLinkDef.h
TRD/TRDsim/CMakeLists.txt

index db02336..033d3c9 100644 (file)
@@ -20,6 +20,10 @@ add_subdirectory(TRDrec)
 add_subdirectory(TRDsim)
 add_subdirectory(TRDqaAnalysis)
 
+if(DA)
+    add_subdirectory(DA)
+endif(DA)
+
 # Install macros
 install(DIRECTORY Macros DESTINATION TRD)
 
diff --git a/TRD/DA/CMakeLists.txt b/TRD/DA/CMakeLists.txt
new file mode 100644 (file)
index 0000000..bfb65ba
--- /dev/null
@@ -0,0 +1,68 @@
+# **************************************************************************
+# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
+# *                                                                        *
+# * Author: The ALICE Off-line Project.                                    *
+# * Contributors are mentioned in the code where appropriate.              *
+# *                                                                        *
+# * Permission to use, copy, modify and distribute this software and its   *
+# * documentation strictly for non-commercial purposes is hereby granted   *
+# * without fee, provided that the above copyright notice appears in all   *
+# * copies and that both the copyright notice and this permission notice   *
+# * appear in the supporting documentation. The authors make no claims     *
+# * about the suitability of this software for any purpose. It is          *
+# * provided "as is" without express or implied warranty.                  *
+# **************************************************************************
+
+# Module include folder
+include_directories(${AliRoot_SOURCE_DIR}/TRD/DA)
+
+# Additional include folders in alphabetical order
+include_directories(
+                    ${AliRoot_SOURCE_DIR}/RAW/RAWDatarec
+                    ${AliRoot_SOURCE_DIR}/STEER/STEERBase
+                    ${AliRoot_SOURCE_DIR}/TPC/TPCbase
+                   )
+
+
+# DIM
+link_directories(${DIMDIR}/${ODIR})
+
+#daqDA flags
+include_directories(${daqDA})
+link_directories(${daqDA})
+
+# AMORE definitions
+add_definitions(${AMORE_DEFINITIONS})
+include_directories(${AMORE_INCLUDE_DIR})
+
+# Generating the DA executable
+add_executable(TRDHALFCHAMBERSTATUSda TRDHALFCHAMBERSTATUSda.cxx) #1
+add_executable(TRDPEDESTALda TRDPEDESTALda.cxx) #2
+add_executable(TRDVDRIFTda TRDVDRIFTda.cxx) #3
+
+target_link_libraries(TRDHALFCHAMBERSTATUSda CDB-static RAWDatarec-static STEERBase-static TRDbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1
+target_link_libraries(TRDPEDESTALda CDB-static RAWDatarec-static STEERBase-static TRDbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 2
+target_link_libraries(TRDVDRIFTda RAWDatarec-static STEERBase-static TRDbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 3
+
+set(MODULE_COMPILE_FLAGS)
+set(MODULE_LINK_FLAGS)
+
+# different flags
+set(MODULE_COMPILE_FLAGS "-O -g ${DATE_CFLAGS} ${AMORE_CFLAGS}")
+set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
+
+set_target_properties(TRDHALFCHAMBERSTATUSda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 1
+set_target_properties(TRDHALFCHAMBERSTATUSda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 1
+
+set_target_properties(TRDPEDESTALda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 2
+set_target_properties(TRDPEDESTALda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 2
+
+set_target_properties(TRDVDRIFTda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 3
+set_target_properties(TRDVDRIFTda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 3
+
+# Installation
+install(TARGETS 
+                TRDHALFCHAMBERSTATUSda
+                TRDPEDESTALda
+                TRDVDRIFTda
+        RUNTIME DESTINATION bin)
\ No newline at end of file
similarity index 100%
rename from TRD/TRDVDRIFTda.cxx
rename to TRD/DA/TRDVDRIFTda.cxx
index f0f6a49..71a080c 100644 (file)
@@ -27,7 +27,6 @@ include_directories(${ROOT_INCLUDE_DIRS}
                     ${AliRoot_SOURCE_DIR}/STEER/ESD
                     ${AliRoot_SOURCE_DIR}/STEER/STEER
                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
-                    ${AliRoot_SOURCE_DIR}/TRD/TRDrec
                    )
 
 # Sources in alphabetical order
@@ -53,6 +52,7 @@ set(SRCS
     AliTRDcalibDB.cxx
     AliTRDCalibPadStatus.cxx
     AliTRDCalibraExbAltFit.cxx
+    AliTRDCalibraFillHisto.cxx
     AliTRDCalibraFit.cxx
     AliTRDCalibraMode.cxx
     AliTRDCalibraVdriftLinearFit.cxx
@@ -70,8 +70,15 @@ set(SRCS
     AliTRDCalSingleChamberStatus.cxx
     AliTRDCalTrapConfig.cxx
     AliTRDCalTrkAttach.cxx
+    AliTRDchamberTimeBin.cxx
     AliTRDCommonParam.cxx
+    AliTRDcluster.cxx
+    AliTRDclusterizer.cxx
     AliTRDDataDCS.cxx
+    AliTRDdEdxBaseUtils.cxx
+    AliTRDdEdxCalibHistArray.cxx
+    AliTRDdEdxCalibUtils.cxx
+    AliTRDdEdxReconUtils.cxx
     AliTRDdigit.cxx
     AliTRDdigitsManager.cxx
     AliTRDdigitsParam.cxx
@@ -87,23 +94,33 @@ set(SRCS
     AliTRDonlineTrackMatching.cxx
     AliTRDpadPlane.cxx
     AliTRDPhInfo.cxx
+    AliTRDpidUtil.cxx
     AliTRDPreprocessor.cxx
     AliTRDPrfInfo.cxx
     AliTRDQAChecker.cxx
     AliTRDrawData.cxx
     AliTRDrawStream.cxx
     AliTRDrecoParam.cxx
+    AliTRDReconstructor.cxx
     AliTRDSaxHandler.cxx
+    AliTRDseedV1.cxx
     AliTRDSensorArray.cxx
     AliTRDSensor.cxx
     AliTRDSignalIndex.cxx
     AliTRDSimParam.cxx
     AliTRDtrackGTU.cxx
+    AliTRDtrackerDebug.cxx
+    AliTRDtrackerV1.cxx
+    AliTRDtrackingChamber.cxx
+    AliTRDtrackingSector.cxx
     AliTRDtrackletBase.cxx
     AliTRDtrackletGTU.cxx
+    AliTRDtrackletOflHelper.cxx
     AliTRDtrackletMCM.cxx
     AliTRDtrackletWord.cxx
     AliTRDtrackOnline.cxx
+    AliTRDtrackV1.cxx
+    AliTRDtransform.cxx
     AliTRDtrapConfig.cxx
     AliTRDtrapConfigHandler.cxx
     AliTRDUshortInfo.cxx
@@ -117,17 +134,28 @@ string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
 get_directory_property(incdirs INCLUDE_DIRECTORIES)
 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
 
+set(ROOT_DEPENDENCIES Core GenVector Geom Gpad Graf Gui Hist MathCore Matrix Minuit Net RIO Tree VMC XMLParser)
+set(ALIROOT_DEPENDENCIES STEERBase STEER ESD CDB RAWDatabase RAWDatarec)
+
 # Generate the ROOT map
 # Dependecies
-set(LIBDEPS STEERBase STEER ESD CDB RAWDatabase RAWDatarec TRDrec Gpad Gui)
+set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
 
+# Create an object to be reused in case of static libraries 
+# Otherwise the sources will be compiled twice
+add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx)
+# Add a library to the project using the object
+add_library(${MODULE} SHARED $<TARGET_OBJECTS:TRDbase-object>)
+
+# Linking
+target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
 
-# Add a library to the project using the specified source files
-add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
+# Public include folders that will be propagated to the dependecies
+target_include_directories(${MODULE} PUBLIC ${incdirs})
 
 # Additional compilation flags
-set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "-O -g")
+set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "-O -g")
 
 # System dependent: Modify the way the library is build
 if(${CMAKE_SYSTEM} MATCHES Darwin)
@@ -152,4 +180,24 @@ install(TARGETS ${MODULE}
         ARCHIVE DESTINATION lib
         LIBRARY DESTINATION lib)
 
-install(FILES ${HDRS} DESTINATION include)
\ No newline at end of file
+install(FILES ${HDRS} DESTINATION include)
+
+# Static version if DA enabled
+if(ALIROOT_STATIC)
+    add_library(${MODULE}-static STATIC $<TARGET_OBJECTS:TRDbase-object>)
+    set_target_properties(${MODULE}-static PROPERTIES OUTPUT_NAME ${MODULE})
+
+    # list of shared dependencies / the name of the variable containing the list of static ones
+    generate_static_dependencies("${ALIROOT_DEPENDENCIES}" "STATIC_ALIROOT_DEPENDENCIES")
+    target_link_libraries(${MODULE}-static ${STATIC_ALIROOT_DEPENDENCIES} Root RootExtra)
+    
+    # Public include folders that will be propagated to the dependecies
+    target_include_directories(${MODULE}-static PUBLIC ${incdirs})
+    
+    set_target_properties(${MODULE}-static PROPERTIES LINK_FLAGS "-Wl,--whole-archive")
+
+    # Installation
+    install(TARGETS ${MODULE}-static
+            ARCHIVE DESTINATION lib
+            LIBRARY DESTINATION lib)
+endif(ALIROOT_STATIC)
index 8d10c44..ec915fa 100644 (file)
 #pragma link C++ class  AliTRDrecoParam+;
 #pragma link C++ class  AliTRDSimParam+;
 
+#pragma link C++ class  AliTRDpidUtil+; // moved from TRDrec
+#pragma link C++ class  AliTRDseedV1+; // moved from TRDrec
+#pragma link C++ class  AliTRDcluster+; //moved from TRDrec
+#pragma link C++ class  AliTRDtrackV1+; // moved from TRDrec
+#pragma link C++ class  AliTRDReconstructor+; // moved from TRDrec
+#pragma link C++ class  AliTRDtransform+;// moved from TRDrec
+#pragma link C++ class  AliTRDchamberTimeBin+;// moved from TRDrec
+#pragma link C++ class  AliTRDtrackingChamber+;// moved from TRDrec
+#pragma link C++ class  AliTRDtrackerV1+;// moved from TRDrec
+#pragma link C++ class  AliTRDtrackletOflHelper+;// moved from TRDrec
+#pragma link C++ class  AliTRDtrackingSector+; //moved from TRDrec
+#pragma link C++ class  AliTRDclusterizer+; // moved from TRDrec
+#pragma link C++ class  AliTRDCalibraFillHisto+; //moved from TRDrec
+#pragma link C++ class  AliTRDtrackerDebug+; // moved from TRDrec
+#pragma link C++ class  AliTRDdEdxBaseUtils+;
+#pragma link C++ class  AliTRDdEdxCalibHistArray+;
+#pragma link C++ class  AliTRDdEdxCalibUtils+;
+#pragma link C++ class  AliTRDdEdxReconUtils+;
+#pragma link C++ class  AliTRDtrackerV1::AliTRDLeastSquare+;
+#pragma link C++ class  AliTRDtrackerV1::AliTRDtrackFitterRieman+;
+
 #endif
index 9d11e72..735d6ef 100644 (file)
@@ -18,6 +18,7 @@
 
 class TH1;
 class TH1D;
+class TH2D;
 class TH3D;
 class TObjArray;
 
index 439dec7..5d6f89a 100644 (file)
@@ -21,10 +21,9 @@ include_directories(${AliRoot_SOURCE_DIR}/TRD/${MODULE})
 
 # Additional include folders in alphabetical order except ROOT
 include_directories(${ROOT_INCLUDE_DIRS}
-                    ${AliRoot_SOURCE_DIR}/RAW/RAWDatabase
+                    ${AliRoot_SOURCE_DIR}/RAW/RAWDatabase // this should not be here, but it is still asked, why?
                     ${AliRoot_SOURCE_DIR}/RAW/RAWDatarec
                     ${AliRoot_SOURCE_DIR}/STAT
-                    ${AliRoot_SOURCE_DIR}/STEER/CDB
                     ${AliRoot_SOURCE_DIR}/STEER/ESD
                     ${AliRoot_SOURCE_DIR}/STEER/STEER
                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
@@ -33,30 +32,12 @@ include_directories(${ROOT_INCLUDE_DIRS}
 
 # Sources in alphabetical order
 set(SRCS
-    AliTRDCalibraFillHisto.cxx
     AliTRDCalPIDLQ.cxx
     AliTRDCalPIDNN.cxx
-    AliTRDchamberTimeBin.cxx
-    AliTRDcluster.cxx
-    AliTRDclusterizer.cxx
-    AliTRDdEdxBaseUtils.cxx
-    AliTRDdEdxCalibHistArray.cxx
-    AliTRDdEdxCalibUtils.cxx
-    AliTRDdEdxReconUtils.cxx
     AliTRDpidESD.cxx
-    AliTRDpidUtil.cxx
     AliTRDqaBuildReference.cxx
     AliTRDQADataMakerRec.cxx
     AliTRDqaRecPoints.cxx
-    AliTRDReconstructor.cxx
-    AliTRDseedV1.cxx
-    AliTRDtrackerDebug.cxx
-    AliTRDtrackerV1.cxx
-    AliTRDtrackingChamber.cxx
-    AliTRDtrackingSector.cxx
-    AliTRDtrackletOflHelper.cxx
-    AliTRDtrackV1.cxx
-    AliTRDtransform.cxx
    )
 
 # Headers from sources
@@ -67,17 +48,28 @@ string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
 get_directory_property(incdirs INCLUDE_DIRECTORIES)
 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
 
+set(ROOT_DEPENDENCIES Core Gpad Hist MLP RIO)
+set(ALIROOT_DEPENDENCIES STEERBase STEER ESD RAWDatarec STAT TRDbase)
+
 # Generate the ROOT map
 # Dependecies
-set(LIBDEPS STEERBase STEER ESD CDB RAWDatabase RAWDatarec STAT TRDbase)
+set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
 
+# Create an object to be reused in case of static libraries 
+# Otherwise the sources will be compiled twice
+add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx)
+# Add a library to the project using the object
+add_library(${MODULE} SHARED $<TARGET_OBJECTS:TRDrec-object>)
+
+# Linking
+target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
 
-# Add a library to the project using the specified source files
-add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
+# Public include folders that will be propagated to the dependecies
+target_include_directories(${MODULE} PUBLIC ${incdirs})
 
 # Additional compilation flags
-set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "-O -g")
+set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "-O -g")
 
 # System dependent: Modify the way the library is build
 if(${CMAKE_SYSTEM} MATCHES Darwin)
index 5d159d5..135b9bb 100644 (file)
@@ -8,37 +8,13 @@
 #pragma link off all classes;
 #pragma link off all functions;
 
-#pragma link C++ class  AliTRDcluster+;
-#pragma link C++ class  AliTRDclusterizer+;
-#pragma link C++ class  AliTRDtransform+;
-
 #pragma link C++ class  AliTRDpidESD+;
-#pragma link C++ class  AliTRDpidUtil+;
-#pragma link C++ class  AliTRDdEdxCalibHistArray+;
-#pragma link C++ class  AliTRDdEdxBaseUtils+;
-#pragma link C++ class  AliTRDdEdxCalibUtils+;
-#pragma link C++ class  AliTRDdEdxReconUtils+;
-
-#pragma link C++ class  AliTRDReconstructor+;
-
-#pragma link C++ class  AliTRDtrackletOflHelper+;
-#pragma link C++ class  AliTRDseedV1+;
-#pragma link C++ class  AliTRDtrackV1+;
-#pragma link C++ class  AliTRDtrackerV1+;
-#pragma link C++ class  AliTRDtrackerV1::AliTRDLeastSquare+;
-#pragma link C++ class  AliTRDtrackerV1::AliTRDtrackFitterRieman+;
-#pragma link C++ class  AliTRDtrackerDebug+;
-#pragma link C++ class  AliTRDtrackingSector+;
-#pragma link C++ class  AliTRDtrackingChamber+;
-#pragma link C++ class  AliTRDchamberTimeBin+;
 
 #pragma link C++ class  AliTRDQADataMakerRec+;
 #pragma link C++ class  AliTRDqaBuildReference+;
 
 #pragma link C++ class  AliTRDqaRecPoints+;
 
-#pragma link C++ class  AliTRDCalibraFillHisto+;
-
 #pragma link C++ class  AliTRDCalPIDLQ+;
 #pragma link C++ class  AliTRDCalPIDNN+;
 
index 13a12d9..92c8062 100644 (file)
@@ -61,17 +61,28 @@ string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
 get_directory_property(incdirs INCLUDE_DIRECTORIES)
 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
 
+set(ROOT_DEPENDENCIES Core Geom Gpad Hist MathCore Physics RIO RooFit Tree VMC)
+set(ALIROOT_DEPENDENCIES STEERBase STEER ESD RAWDatarec RAWDatabase TRDbase TRDrec T0base TOFbase TOFsim VZERObase)
+
 # Generate the ROOT map
 # Dependecies
-set(LIBDEPS STEERBase STEER ESD RAWDatarec RAWDatabase TRDbase TRDrec T0base TOFbase TOFsim VZERObase)
+set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
 
+# Create an object to be reused in case of static libraries 
+# Otherwise the sources will be compiled twice
+add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx)
+# Add a library to the project using the object
+add_library(${MODULE} SHARED $<TARGET_OBJECTS:TRDsim-object>)
+
+# Linking
+target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
 
-# Add a library to the project using the specified source files
-add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
+# Public include folders that will be propagated to the dependecies
+target_include_directories(${MODULE} PUBLIC ${incdirs})
 
 # Additional compilation flags
-set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "-O -g")
+set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "-O -g")
 
 # System dependent: Modify the way the library is build
 if(${CMAKE_SYSTEM} MATCHES Darwin)