Added dependencies to target runTrain2
[u/mrichter/AliRoot.git] / PWGLF / CMakelibPWGLFforward2.pkg
1 # -*- mode: CMake -*-
2 #------------------------------------------------------------------------#
3 # Package File for PWGLFforward2                                          #
4 # Author : Christian Holm Christensen (cholm@nbi.dk)                     #
5 # Variables Defined :                                                    #
6 #                                                                        #
7 # SRCS - C++ source files                                                #
8 # HDRS - C++ header files                                                #
9 # DHDR - ROOT Dictionary Linkdef header file                             #
10 # CSRCS - C source files                                                 #
11 # CHDRS - C header files                                                 #
12 # EINCLUDE - Include directories                                         #
13 # EDEFINE - Compiler definitions                                         #
14 # ELIBS - Extra libraries to link                                        #
15 # ELIBSDIR - Extra library directories                                   #
16 # PACKFFLAGS - Fortran compiler flags for package                        #
17 # PACKCXXFLAGS - C++ compiler flags for package                          #
18 # PACKCFLAGS - C compiler flags for package                              #
19 # PACKSOFLAGS - Shared library linking flags                             #
20 # PACKLDFLAGS - Module linker flags                                      #
21 # PACKBLIBS - Libraries to link (Executables only)                       #
22 # EXPORT - Header files to be exported                                   #
23 # CINTHDRS - Dictionary header files                                     #
24 # CINTAUTOLINK - Set automatic dictionary generation                     #
25 # ARLIBS - Archive Libraries and objects for linking (Executables only)  #
26 # SHLIBS - Shared Libraries and objects for linking (Executables only)   #
27 #------------------------------------------------------------------------#
28
29 set ( SRCS   
30   FORWARD/analysis2/AliAODCentralMult.cxx
31   FORWARD/analysis2/AliAODForwardEP.cxx
32   FORWARD/analysis2/AliAODForwardMult.cxx
33   FORWARD/analysis2/AliBasedNdetaTask.cxx
34   FORWARD/analysis2/AliBaseMCTrackDensity.cxx
35   FORWARD/analysis2/AliCentralCorrAcceptance.cxx 
36   FORWARD/analysis2/AliCentralCorrSecondaryMap.cxx
37   FORWARD/analysis2/AliCentraldNdetaTask.cxx
38   FORWARD/analysis2/AliCentralMCCorrectionsTask.cxx
39   FORWARD/analysis2/AliCentralMCMultiplicityTask.cxx
40   FORWARD/analysis2/AliCentralMultiplicityTask.cxx
41   FORWARD/analysis2/AliCopyHeaderTask.cxx
42   FORWARD/analysis2/AliDisplacedVertexSelection.cxx
43   FORWARD/analysis2/AliFMDCorrAcceptance.cxx
44   FORWARD/analysis2/AliFMDCorrDoubleHit.cxx
45   FORWARD/analysis2/AliFMDCorrector.cxx 
46   FORWARD/analysis2/AliFMDCorrELossFit.cxx 
47   FORWARD/analysis2/AliFMDCorrMergingEfficiency.cxx
48   FORWARD/analysis2/AliFMDCorrSecondaryMap.cxx 
49   FORWARD/analysis2/AliFMDCorrVertexBias.cxx
50   FORWARD/analysis2/AliFMDDensityCalculator.cxx
51   FORWARD/analysis2/AliFMDEnergyFitter.cxx
52   FORWARD/analysis2/AliFMDEnergyFitterTask.cxx 
53   FORWARD/analysis2/AliFMDEventInspector.cxx
54   FORWARD/analysis2/AliFMDEventPlaneFinder.cxx
55   FORWARD/analysis2/AliFMDEventPlaneTask.cxx
56   FORWARD/analysis2/AliFMDHistCollector.cxx
57   FORWARD/analysis2/AliFMDMCCorrector.cxx
58   FORWARD/analysis2/AliFMDMCDensityCalculator.cxx
59   FORWARD/analysis2/AliFMDMCEventInspector.cxx
60   FORWARD/analysis2/AliFMDMCSharingFilter.cxx
61   FORWARD/analysis2/AliFMDMCTrackDensity.cxx
62   FORWARD/analysis2/AliFMDMultCuts.cxx
63   FORWARD/analysis2/AliFMDSharingFilter.cxx
64   FORWARD/analysis2/AliForwardCorrectionManager.cxx
65   FORWARD/analysis2/AliForwarddNdetaTask.cxx
66   FORWARD/analysis2/AliForwardFlowTaskQC.cxx
67   FORWARD/analysis2/AliForwardFlowWeights.cxx
68   FORWARD/analysis2/AliForwardMCCorrectionsTask.cxx
69   FORWARD/analysis2/AliForwardMCFlowTaskQC.cxx
70   FORWARD/analysis2/AliForwardMCMultiplicityTask.cxx 
71   FORWARD/analysis2/AliForwardMultiplicityBase.cxx
72   FORWARD/analysis2/AliForwardMultiplicityTask.cxx
73   FORWARD/analysis2/AliForwardQATask.cxx
74   FORWARD/analysis2/AliForwardUtil.cxx
75   FORWARD/analysis2/AliMCTruthdNdetaTask.cxx
76   FORWARD/analysis2/AliPoissonCalculator.cxx
77   FORWARD/analysis2/AliSPDMCTrackDensity.cxx
78   FORWARD/GEO/AliAnalysisTaskZDCPbPb.cxx
79   FORWARD/analysis2/AliForwardMultiplicityDistribution.cxx
80   FORWARD/analysis2/AliForwardCreateResponseMatrices.cxx
81 )
82
83 string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" )
84 set ( HDRS ${HDRS} FORWARD/analysis2/AliFMDStripIndex.h )
85
86 set ( EINCLUDE  
87   ANALYSIS 
88   PWGLF/FORWARD/analysis2  
89   PWGLF/FORWARD/GEO 
90   PWG0 
91   STEER/ESD 
92   STEER/STEERBase)
93
94 set ( EXPORT FORWARD/analysis2/AliAODForwardMult.h 
95              FORWARD/analysis2/AliAODCentralMult.h 
96              FORWARD/analysis2/AliForwardUtil.h  
97              FORWARD/analysis2/AliFMDEventInspector.h
98              FORWARD/analysis2/AliFMDMCEventInspector.h
99              FORWARD/GEO/AliAnalysisTaskZDCPbPb.h)
100
101 set ( DHDR  PWGLFforward2LinkDef.h)
102
103 add_executable(runTrain
104   FORWARD/analysis2/trains/runMain.cxx)
105 target_link_libraries(runTrain 
106   ${ARLIBS} ${SHLIBS} ${PBLIBS} ${EXEFLAGS} ${ROOTCLIBS})
107 install(TARGETS runTrain 
108   RUNTIME DESTINATION bin/tgt_${ALICE_TARGET})
109
110 add_executable(runTrain2
111   FORWARD/trains/trainMain.cxx)
112 target_link_libraries(runTrain2 
113   ${BINLIBDIRS} ${ARLIBS} ${SHLIBS} ${PBLIBS} ${EXEFLAGS} ${ROOTCLIBS} 
114   -lSTEERBase -lESD -lAOD -lOADB -lANALYSIS -lANALYSISalice)
115 install(TARGETS runTrain2 
116   RUNTIME DESTINATION bin/tgt_${ALICE_TARGET})
117 add_dependencies(runTrain2 STEERBase ESD AOD OADB ANALYSIS ANALYSISalice)
118
119 # --------------------------------------------------------------------
120 # Extra targets 
121 #
122 add_custom_command( OUTPUT FORWARD/doc/doc.pdf 
123                     COMMAND pdflatex doc
124                     COMMAND pdflatex doc
125                     COMMAND pdflatex doc
126                     COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc
127                     COMMAND mv doc.pdf ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc/
128                     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/FORWARD/doc
129                     MAIN_DEPENDENCY FORWARD/doc/doc.tex)
130
131 add_custom_command( OUTPUT FORWARD/doc/html/index.html 
132                     COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc
133                     COMMAND sed -e 's,../analysis2,${CMAKE_CURRENT_SOURCE_DIR}/FORWARD/analysis2,' -e 's,OUTPUT_DIRECTORY *=.*,OUTPUT_DIRECTORY = FORWARD/doc/,' < ${CMAKE_CURRENT_SOURCE_DIR}/FORWARD/doc/Doxyfile > ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc/Doxyfile
134                     COMMAND doxygen ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc/Doxyfile
135                     DEPENDS ${SRCS} ${HDRS})
136
137 add_custom_target( PWGLFforward-doc DEPENDS FORWARD/doc/doc.pdf )
138 add_custom_target( PWGLFforward-doxy DEPENDS FORWARD/doc/html/index.html )
139
140 add_custom_target( install-PWGLFforward2.par 
141   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${PACKAGE}.par ${CMAKE_INSTALL_PREFIX}
142   COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green --bold "${PACKAGE}.par installed in ${CMAKE_INSTALL_PREFIX}"
143   DEPENDS ${CMAKE_BINARY_DIR}/${PACKAGE}.par
144   DEPENDS test-${PACKAGE}.par)
145
146 # --------------------------------------------------------------------
147 # Extra installation targets 
148 #
149 # Install scripts 
150 install ( DIRECTORY FORWARD/analysis2/scripts 
151           DESTINATION PWGLF/FORWARD/analysis2 
152           USE_SOURCE_PERMISSIONS
153           PATTERN "*~"    EXCLUDE
154           PATTERN ".svn"  EXCLUDE
155           PATTERN "*.d"   EXCLUDE 
156           PATTERN "*.so"  EXCLUDE)
157
158 # install QA scripts 
159 install ( DIRECTORY FORWARD/analysis2/qa
160           DESTINATION PWGLF/FORWARD/analysis2 
161           USE_SOURCE_PERMISSIONS
162           PATTERN "*~"    EXCLUDE
163           PATTERN ".svn"  EXCLUDE
164           PATTERN "*.d"   EXCLUDE 
165           PATTERN "*.so"  EXCLUDE)
166
167 # install correction scripts 
168 install ( DIRECTORY FORWARD/analysis2/corrs
169           DESTINATION PWGLF/FORWARD/analysis2 
170           PATTERN "*~"    EXCLUDE
171           PATTERN ".svn"  EXCLUDE
172           PATTERN "*.d"   EXCLUDE 
173           PATTERN "*.so"  EXCLUDE)
174
175 # install trains 
176 install ( DIRECTORY FORWARD/analysis2/trains 
177           DESTINATION PWGLF/FORWARD/analysis2 
178           PATTERN "*~"   EXCLUDE
179           PATTERN ".svn" EXCLUDE
180           PATTERN "*.d"  EXCLUDE 
181           PATTERN "*.so" EXCLUDE)
182
183 # install trains 
184 install ( DIRECTORY FORWARD/trains 
185           DESTINATION PWGLF/FORWARD 
186           FILES_MATCHING PATTERN "*.C"
187           PATTERN "*~"        EXCLUDE
188           PATTERN ".svn"      EXCLUDE)
189           # PATTERN "*.d"       EXCLUDE 
190           # PATTERN "*.so"      EXCLUDE
191           # PATTERN "*.root"    EXCLUDE
192           # PATTERN "*.png"     EXCLUDE
193           # PATTERN "test*"     EXCLUDE
194           # PATTERN "export*.C" EXCLUDE
195           # PATTERN "dndeta_*.C" EXCLUDE
196           # PATTERN "dndeta_*.root" EXCLUDE
197
198 # Install other scripts
199 install ( FILES FORWARD/analysis2/AddTaskCentraldNdeta.C
200                 FORWARD/analysis2/AddTaskCentralMCCorr.C
201                 FORWARD/analysis2/AddTaskCentralMult.C
202                 FORWARD/analysis2/AddTaskCentralTracks.C
203                 FORWARD/analysis2/AddTaskCopyHeader.C
204                 FORWARD/analysis2/AddTaskFMDELoss.C
205                 FORWARD/analysis2/AddTaskFMDEventPlane.C
206                 FORWARD/analysis2/AddTaskForwardFlow.C
207                 FORWARD/analysis2/AddTaskForwardMCCorr.C
208                 FORWARD/analysis2/AddTaskForwardMult.C
209                 FORWARD/analysis2/AddTaskForwardQA.C
210                 FORWARD/analysis2/AddTaskForwarddNdeta.C
211                 FORWARD/analysis2/AddTaskMCTruthdNdeta.C
212                 FORWARD/analysis2/AddTaskMCParticleFilter.C
213                 FORWARD/analysis2/DrawdNdeta.C
214                 FORWARD/analysis2/ForwardAODConfig.C
215                 FORWARD/analysis2/CentralAODConfig.C
216                 FORWARD/analysis2/MakeAOD.C
217                 FORWARD/analysis2/MakedNdeta.C
218                 FORWARD/analysis2/MakeELossFits.C
219                 FORWARD/analysis2/MakeEvaluateTriggers.C
220                 FORWARD/analysis2/MakeFlow.C
221                 FORWARD/analysis2/MakeFMDEventPlane.C
222                 FORWARD/analysis2/MakeForwardQA.C
223                 FORWARD/analysis2/MakeMCCorr.C          
224                 FORWARD/analysis2/OtherData.C
225            DESTINATION PWGLF/FORWARD/analysis2 )
226
227 # Install corrections 
228 install ( DIRECTORY FORWARD/corrections/DoubleHit
229                     FORWARD/corrections/ELossFits
230                     FORWARD/corrections/Emperical
231                     FORWARD/corrections/MergingEfficiency
232                     FORWARD/corrections/SecondaryMap
233                     FORWARD/corrections/VertexBias
234                     FORWARD/corrections/Acceptance
235                     FORWARD/corrections/Normalization
236                     FORWARD/corrections/CentralAcceptance
237                     FORWARD/corrections/CentralSecMap
238           DESTINATION PWGLF/FORWARD/corrections 
239           PATTERN "*~"   EXCLUDE
240           PATTERN ".svn" EXCLUDE)
241
242 # Install shell script 
243 install ( FILES FORWARD/analysis2/Run.sh 
244           DESTINATION PWGLF/FORWARD/analysis2 
245           PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
246                       GROUP_EXECUTE GROUP_READ
247                       WORLD_EXECUTE WORLD_READ )
248
249
250 # --------------------------------------------------------------------
251 #
252 # EOF
253