Updates from Redmer
[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 if((DEFINED ALIROOT_SVN_REVISION)) 
30   add_definitions(-DALIROOT_SVN_REVISION=${ALIROOT_SVN_REVISION})
31 endif((DEFINED ALIROOT_SVN_REVISION)) 
32 if((DEFINED ALIROOT_SVN_BRANCH)) 
33   add_definitions(-DALIROOT_SVN_BRANCH=\"${ALIROOT_SVN_BRANCH}\")
34 endif((DEFINED ALIROOT_SVN_BRANCH))
35
36 set ( SRCS   
37   # ZDC tasks
38   FORWARD/GEO/AliAnalysisTaskZDCPbPb.cxx
39   FORWARD/GEO/AliAnalysisTaskZDCTreeMaker.cxx
40   FORWARD/GEO/AliAnalysisTaskZDCpAcalib.cxx
41   # AOD objects
42   FORWARD/analysis2/AliAODCentralMult.cxx
43   FORWARD/analysis2/AliAODForwardEP.cxx
44   FORWARD/analysis2/AliAODForwardMult.cxx
45   # Interface to OADB backed by a TTree 
46   FORWARD/analysis2/AliOADBForward.cxx
47   # Correction managers 
48   FORWARD/analysis2/AliCorrectionManagerBase.cxx 
49   FORWARD/analysis2/AliForwardCorrectionManager.cxx
50   FORWARD/analysis2/AliCentralCorrectionManager.cxx
51   # Central (SPD) code 
52   FORWARD/analysis2/AliCentralCorrAcceptance.cxx 
53   FORWARD/analysis2/AliCentralCorrSecondaryMap.cxx
54   FORWARD/analysis2/AliCentraldNdetaTask.cxx
55   FORWARD/analysis2/AliCentralMCCorrectionsTask.cxx
56   FORWARD/analysis2/AliCentralMCMultiplicityTask.cxx
57   FORWARD/analysis2/AliCentralMultiplicityTask.cxx
58   FORWARD/analysis2/AliSPDMCTrackDensity.cxx
59   # Aux tasks and code 
60   FORWARD/analysis2/AliCopyHeaderTask.cxx
61   FORWARD/analysis2/AliBasedNdetaTask.cxx
62   FORWARD/analysis2/AliBaseMCTrackDensity.cxx
63   FORWARD/analysis2/AliMCTruthdNdetaTask.cxx
64   FORWARD/analysis2/AliDisplacedVertexSelection.cxx
65   FORWARD/analysis2/AliPoissonCalculator.cxx
66   FORWARD/analysis2/AliMCAuxHandler.cxx
67   # Forward Aux
68   FORWARD/analysis2/AliForwardFlowWeights.cxx
69   FORWARD/analysis2/AliForwardUtil.cxx
70   FORWARD/analysis2/AliFMDMultCuts.cxx
71   # FMD corrections
72   FORWARD/analysis2/AliFMDCorrAcceptance.cxx
73   FORWARD/analysis2/AliFMDCorrDoubleHit.cxx
74   FORWARD/analysis2/AliFMDCorrector.cxx 
75   FORWARD/analysis2/AliFMDCorrELossFit.cxx 
76   FORWARD/analysis2/AliFMDCorrMergingEfficiency.cxx
77   FORWARD/analysis2/AliFMDCorrSecondaryMap.cxx 
78   FORWARD/analysis2/AliFMDCorrVertexBias.cxx
79   # FMD algortithmns 
80   FORWARD/analysis2/AliFMDDensityCalculator.cxx
81   FORWARD/analysis2/AliFMDEnergyFitter.cxx
82   FORWARD/analysis2/AliFMDEventInspector.cxx
83   FORWARD/analysis2/AliFMDEventPlaneFinder.cxx
84   FORWARD/analysis2/AliFMDHistCollector.cxx
85   FORWARD/analysis2/AliFMDSharingFilter.cxx
86   # FMD MC algorithms
87   FORWARD/analysis2/AliFMDMCCorrector.cxx
88   FORWARD/analysis2/AliFMDMCDensityCalculator.cxx
89   FORWARD/analysis2/AliFMDMCEventInspector.cxx
90   FORWARD/analysis2/AliFMDMCSharingFilter.cxx
91   FORWARD/analysis2/AliFMDMCTrackDensity.cxx
92   # Forward tasks 
93   FORWARD/analysis2/AliFMDEnergyFitterTask.cxx 
94   FORWARD/analysis2/AliFMDEventPlaneTask.cxx
95   FORWARD/analysis2/AliForwarddNdetaTask.cxx
96   FORWARD/analysis2/AliForwardFlowTaskQC.cxx
97   FORWARD/analysis2/AliForwardMCCorrectionsTask.cxx
98   FORWARD/analysis2/AliForwardMCFlowTaskQC.cxx
99   FORWARD/analysis2/AliForwardMCMultiplicityTask.cxx 
100   FORWARD/analysis2/AliForwardMultiplicityBase.cxx
101   FORWARD/analysis2/AliForwardMultiplicityTask.cxx
102   FORWARD/analysis2/AliForwardQATask.cxx
103   FORWARD/analysis2/AliForwardCreateResponseMatrices.cxx
104   FORWARD/analysis2/AliForwardMultiplicityDistribution.cxx
105   FORWARD/analysis2/AliForwardMultDists.cxx
106   FORWARD/photons/AliAnalysisTaskPMD.cxx
107   FORWARD/photons/AliAnalysisTaskPMDSim.cxx
108 )
109
110 string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" )
111 set ( HDRS ${HDRS} FORWARD/analysis2/AliFMDStripIndex.h )
112
113 set ( EINCLUDE  
114   ANALYSIS 
115   PWGLF/FORWARD/analysis2  
116   PWGLF/FORWARD/GEO 
117   FORWARD/analysis2  
118   FORWARD/GEO 
119   PWG0 
120   STEER/ESD 
121   STEER/STEERBase)
122
123 set ( EXPORT FORWARD/analysis2/AliAODForwardMult.h 
124              FORWARD/analysis2/AliAODCentralMult.h 
125              FORWARD/analysis2/AliOADBForward.h
126              FORWARD/analysis2/AliForwardUtil.h  
127              FORWARD/analysis2/AliFMDEventInspector.h
128              FORWARD/analysis2/AliFMDMCEventInspector.h
129              FORWARD/analysis2/AliForwardCorrectionManager.h
130              FORWARD/analysis2/AliCorrectionManagerBase.h
131              FORWARD/analysis2/AliFMDCorrAcceptance.h
132              FORWARD/analysis2/AliFMDCorrSecondaryMap.h
133              FORWARD/analysis2/AliFMDCorrELossFit.h
134              FORWARD/GEO/AliAnalysisTaskZDCPbPb.h
135              FORWARD/GEO/AliAnalysisTaskZDCpAcalib.h
136              FORWARD/GEO/AliAnalysisTaskZDCTreeMaker.h)
137
138 set ( DHDR  PWGLFforward2LinkDef.h)
139
140 # add_executable(runTrain
141 #   FORWARD/analysis2/trains/runMain.cxx)
142 # target_link_libraries(runTrain 
143 #   ${ARLIBS} ${SHLIBS} ${PBLIBS} ${EXEFLAGS} ${ROOTCLIBS})
144 # install(TARGETS runTrain 
145 #   RUNTIME DESTINATION bin/tgt_${ALICE_TARGET})
146
147 add_executable(runTrain
148   FORWARD/trains/trainMain.cxx)
149 target_link_libraries(runTrain 
150   ${BINLIBDIRS} ${ARLIBS} ${SHLIBS} ${PBLIBS} ${EXEFLAGS} ${ROOTCLIBS} 
151   -lSTEERBase -lESD -lAOD -lOADB -lANALYSIS -lANALYSISalice)
152 install(TARGETS runTrain 
153   RUNTIME DESTINATION bin/tgt_${ALICE_TARGET})
154 add_dependencies(runTrain STEERBase ESD AOD OADB ANALYSIS ANALYSISalice)
155
156 # --------------------------------------------------------------------
157 # Extra targets 
158 #
159 add_custom_command( OUTPUT FORWARD/doc/alice-int-2012-040.pdf 
160                     COMMAND pdflatex alice-int-2012-040
161                     COMMAND pdflatex alice-int-2012-040
162                     COMMAND pdflatex alice-int-2012-040
163                     COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc
164                     COMMAND mv alice-int-2012-040.pdf ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc/
165                     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/FORWARD/doc
166                     MAIN_DEPENDENCY FORWARD/doc/alice-int-2012-040.tex)
167
168 add_custom_command( OUTPUT FORWARD/doc/html/index.html 
169                     COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc
170                     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
171                     COMMAND doxygen ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc/Doxyfile
172                     DEPENDS ${SRCS} ${HDRS})
173
174 add_custom_target( PWGLFforward-doc DEPENDS FORWARD/doc/alice-int-2012-040.pdf )
175 add_custom_target( PWGLFforward-doxy DEPENDS FORWARD/doc/html/index.html )
176
177 add_custom_target( install-PWGLFforward2.par 
178   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${PACKAGE}.par ${CMAKE_INSTALL_PREFIX}
179   COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green --bold "${PACKAGE}.par installed in ${CMAKE_INSTALL_PREFIX}"
180   DEPENDS ${CMAKE_BINARY_DIR}/${PACKAGE}.par
181   DEPENDS test-${PACKAGE}.par)
182
183 # --------------------------------------------------------------------
184 # Extra installation targets 
185 #
186 # Install scripts 
187 install ( DIRECTORY FORWARD/analysis2/scripts 
188           DESTINATION PWGLF/FORWARD/analysis2 
189           USE_SOURCE_PERMISSIONS
190           PATTERN "*~"    EXCLUDE
191           PATTERN ".svn"  EXCLUDE
192           PATTERN "*.d"   EXCLUDE 
193           PATTERN "*.so"  EXCLUDE)
194
195 # install QA scripts 
196 install ( DIRECTORY FORWARD/analysis2/qa
197           DESTINATION PWGLF/FORWARD/analysis2 
198           USE_SOURCE_PERMISSIONS
199           PATTERN "*~"    EXCLUDE
200           PATTERN ".svn"  EXCLUDE
201           PATTERN "*.d"   EXCLUDE 
202           PATTERN "*.so"  EXCLUDE)
203
204 # install correction scripts 
205 install ( DIRECTORY FORWARD/analysis2/corrs
206           DESTINATION PWGLF/FORWARD/analysis2 
207           PATTERN "*~"    EXCLUDE
208           PATTERN ".svn"  EXCLUDE
209           PATTERN "*.d"   EXCLUDE 
210           PATTERN "*.so"  EXCLUDE)
211
212 # install trains 
213 install ( DIRECTORY FORWARD/analysis2/trains 
214           DESTINATION PWGLF/FORWARD/analysis2 
215           PATTERN "*~"   EXCLUDE
216           PATTERN ".svn" EXCLUDE
217           PATTERN "*.d"  EXCLUDE 
218           PATTERN "*.so" EXCLUDE)
219
220 # install trains 
221 install ( DIRECTORY FORWARD/trains 
222           DESTINATION PWGLF/FORWARD 
223           FILES_MATCHING PATTERN "*.C"
224           PATTERN "*~"        EXCLUDE
225           PATTERN ".svn"      EXCLUDE)
226           # PATTERN "*.d"       EXCLUDE 
227           # PATTERN "*.so"      EXCLUDE
228           # PATTERN "*.root"    EXCLUDE
229           # PATTERN "*.png"     EXCLUDE
230           # PATTERN "test*"     EXCLUDE
231           # PATTERN "export*.C" EXCLUDE
232           # PATTERN "dndeta_*.C" EXCLUDE
233           # PATTERN "dndeta_*.root" EXCLUDE
234
235 # Install other scripts
236 install ( FILES FORWARD/analysis2/AddTaskCentraldNdeta.C
237                 FORWARD/analysis2/AddTaskCentralMCCorr.C
238                 FORWARD/analysis2/AddTaskCentralMult.C
239                 FORWARD/analysis2/AddTaskCentralTracks.C
240                 FORWARD/analysis2/AddTaskCopyHeader.C
241                 FORWARD/analysis2/AddTaskFMDELoss.C
242                 FORWARD/analysis2/AddTaskFMDEventPlane.C
243                 FORWARD/analysis2/AddTaskForwardFlow.C
244                 FORWARD/analysis2/AddTaskForwardMCCorr.C
245                 FORWARD/analysis2/AddTaskForwardMult.C
246                 FORWARD/analysis2/AddTaskForwardMultDists.C
247                 FORWARD/analysis2/AddTaskForwardQA.C
248                 FORWARD/analysis2/AddTaskForwarddNdeta.C
249                 FORWARD/analysis2/AddTaskMCTruthdNdeta.C
250                 FORWARD/analysis2/AddTaskMCParticleFilter.C
251                 FORWARD/analysis2/DrawdNdeta.C
252                 FORWARD/analysis2/DrawdNdetaSummary.C
253                 FORWARD/analysis2/DrawMCCorrSummary.C
254                 FORWARD/analysis2/DrawAODSummary.C
255                 FORWARD/analysis2/DrawMultDistsSummary.C
256                 FORWARD/analysis2/ForwardAODConfig.C
257                 FORWARD/analysis2/CentralAODConfig.C
258                 FORWARD/analysis2/MakeAOD.C
259                 FORWARD/analysis2/MakedNdeta.C
260                 FORWARD/analysis2/MakeELossFits.C
261                 FORWARD/analysis2/MakeEvaluateTriggers.C
262                 FORWARD/analysis2/MakeFlow.C
263                 FORWARD/analysis2/MakeFMDEventPlane.C
264                 FORWARD/analysis2/MakeForwardQA.C
265                 FORWARD/analysis2/MakeMCCorr.C          
266                 FORWARD/analysis2/OtherData.C
267            DESTINATION PWGLF/FORWARD/analysis2 )
268
269 # Install corrections 
270 install ( DIRECTORY FORWARD/corrections/DoubleHit
271                     FORWARD/corrections/ELossFits
272                     FORWARD/corrections/Empirical
273                     FORWARD/corrections/MergingEfficiency
274                     FORWARD/corrections/SecondaryMap
275                     FORWARD/corrections/VertexBias
276                     FORWARD/corrections/Acceptance
277                     FORWARD/corrections/Normalization
278                     FORWARD/corrections/CentralAcceptance
279                     FORWARD/corrections/CentralSecMap
280           DESTINATION PWGLF/FORWARD/corrections 
281           PATTERN "*~"   EXCLUDE
282           PATTERN ".svn" EXCLUDE)
283
284 # Install shell script 
285 install ( FILES FORWARD/analysis2/Run.sh 
286                 FORWARD/analysis2/liteAnalysis.sh
287                 FORWARD/analysis2/gridAnalysis.sh
288           DESTINATION PWGLF/FORWARD/analysis2 
289           PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
290                       GROUP_EXECUTE GROUP_READ
291                       WORLD_EXECUTE WORLD_READ )
292
293
294 # --------------------------------------------------------------------
295 #
296 # EOF
297