Skip to content

Commit dc996cc

Browse files
committed
Fix for failing dataflow build
Hybrid generator includes Pythia8, so when the dataflow build happens, without this fix, the Pythia8 header is loaded. It's not found due to the nature of the dataflow build. This fix prevents the Hybrid generator loading if Pythia8 is not found and it includes also HepMC3, given that a similar issue might arise with that generator as well in the future.
1 parent c3ffb66 commit dc996cc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Generators/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ o2_add_library(Generators
2424
src/GeneratorTGenerator.cxx
2525
src/GeneratorExternalParam.cxx
2626
src/GeneratorFromFile.cxx
27-
src/GeneratorHybrid.cxx
28-
src/GeneratorHybridParam.cxx
2927
src/GeneratorFromO2KineParam.cxx
3028
src/GeneratorFileOrCmd.cxx
3129
src/GeneratorFileOrCmdParam.cxx
@@ -50,6 +48,8 @@ o2_add_library(Generators
5048
$<$<BOOL:${HepMC3_FOUND}>:src/GeneratorHepMC.cxx>
5149
$<$<BOOL:${HepMC3_FOUND}>:src/GeneratorHepMCParam.cxx>
5250
$<$<BOOL:${HepMC3_FOUND}>:src/AODToHepMC.cxx>
51+
$<$<AND:$<BOOL:${pythia_FOUND}>,$<BOOL:${HepMC3_FOUND}>>:src/GeneratorHybrid.cxx>
52+
$<$<AND:$<BOOL:${pythia_FOUND}>,$<BOOL:${HepMC3_FOUND}>>:src/GeneratorHybridParam.cxx>
5353
PUBLIC_LINK_LIBRARIES FairRoot::Base O2::SimConfig O2::CommonUtils O2::DetectorsBase O2::ZDCBase
5454
O2::SimulationDataFormat ${pythiaTarget} ${hepmcTarget}
5555
FairRoot::Gen

Generators/src/GeneratorsLinkDef.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@
5252
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::eventgen::DecayerPythia8Param> + ;
5353
#pragma link C++ class o2::eventgen::GeneratorFactory + ;
5454
#endif
55-
#pragma link C++ class o2::eventgen::GeneratorFromFile + ;
56-
#pragma link C++ class o2::eventgen::GeneratorFromO2Kine + ;
55+
#if defined(GENERATORS_WITH_PYTHIA8) && defined(GENERATORS_WITH_HEPMC3)
5756
#pragma link C++ class o2::eventgen::GeneratorHybrid + ;
5857
#pragma link C++ class o2::eventgen::GeneratorHybridParam + ;
58+
#endif
59+
#pragma link C++ class o2::eventgen::GeneratorFromFile + ;
60+
#pragma link C++ class o2::eventgen::GeneratorFromO2Kine + ;
5961
#pragma link C++ class o2::eventgen::GeneratorFromO2KineParam + ;
6062
#pragma link C++ class o2::eventgen::O2KineGenConfig + ;
6163
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::eventgen::GeneratorFromO2KineParam> + ;

0 commit comments

Comments
 (0)