From 31d6a472af04fd81387b8eb6d409197dbadc6f53 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Sun, 16 Aug 2015 16:49:02 +0200 Subject: [PATCH 1/7] Return 0 rather than a random value. Otherwise this causes an error when compiling on Mac with the latest xcode. --- its/ContainerFactory.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/its/ContainerFactory.cxx b/its/ContainerFactory.cxx index f5f117c6a6809..a9615f2196420 100644 --- a/its/ContainerFactory.cxx +++ b/its/ContainerFactory.cxx @@ -39,4 +39,5 @@ FairParSet* ContainerFactory::createContainer(FairContainer* c) // c->GetTitle(),c->getContext()); //} // return p; + return 0; } From 2621d3d281b5a9500fe51e5aedf5fbda4b342570 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Tue, 18 Aug 2015 00:14:15 +0200 Subject: [PATCH 2/7] Fix undefined behaviour. - Return 0 to avoid random result. - Assert in case code cannot / should not be reached. --- Data/MCTrack.cxx | 1 + devices/flp2epn-distributed/FLPSender.cxx | 2 ++ devices/flp2epn-dynamic/O2FLPex.cxx | 2 ++ passive/PassiveContFact.cxx | 1 + tpc/ContainerFactory.cxx | 1 + 5 files changed, 7 insertions(+) diff --git a/Data/MCTrack.cxx b/Data/MCTrack.cxx index 5b0a9b5341801..049ce9970127f 100644 --- a/Data/MCTrack.cxx +++ b/Data/MCTrack.cxx @@ -118,6 +118,7 @@ Int_t MCTrack::getNumberOfPoints(DetectorId detId) const // return 0; // } // + return 0; } void MCTrack::setNumberOfPoints(Int_t iDet, Int_t nPoints) diff --git a/devices/flp2epn-distributed/FLPSender.cxx b/devices/flp2epn-distributed/FLPSender.cxx index 2e39541c9707e..107807ea2d9d7 100644 --- a/devices/flp2epn-distributed/FLPSender.cxx +++ b/devices/flp2epn-distributed/FLPSender.cxx @@ -7,6 +7,7 @@ #include #include // UINT64_MAX +#include #include #include @@ -298,4 +299,5 @@ ptime FLPSender::GetProperty(const int key, const ptime default_, const int slot case OutputHeartbeat: return fOutputHeartbeat.at(slot); } + assert(false); } diff --git a/devices/flp2epn-dynamic/O2FLPex.cxx b/devices/flp2epn-dynamic/O2FLPex.cxx index d63cb1421bef2..1c18dc212e5fc 100644 --- a/devices/flp2epn-dynamic/O2FLPex.cxx +++ b/devices/flp2epn-dynamic/O2FLPex.cxx @@ -14,6 +14,7 @@ #include #include #include +#include #include "O2FLPex.h" #include "FairMQLogger.h" @@ -188,4 +189,5 @@ boost::posix_time::ptime O2FLPex::GetProperty(const int key, const boost::posix_ case OutputHeartbeat: return fOutputHeartbeat.at(slot); } + assert(false); } diff --git a/passive/PassiveContFact.cxx b/passive/PassiveContFact.cxx index b50006dab3a61..a936b636a1179 100644 --- a/passive/PassiveContFact.cxx +++ b/passive/PassiveContFact.cxx @@ -71,5 +71,6 @@ FairParSet* PassiveContFact::createContainer(FairContainer* c) } return p; */ + return 0; } diff --git a/tpc/ContainerFactory.cxx b/tpc/ContainerFactory.cxx index 7a5abc3cbb5f5..337d53a9029fe 100644 --- a/tpc/ContainerFactory.cxx +++ b/tpc/ContainerFactory.cxx @@ -51,4 +51,5 @@ FairParSet* ContainerFactory::createContainer(FairContainer* c) } return p; */ + return 0; } From 40711a06f941be411cfc9be387506ea9a38db24b Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Tue, 18 Aug 2015 00:16:14 +0200 Subject: [PATCH 3/7] Add missing dependencies on ZMQ and ROOT. ZMQ headers referred, but ZMQ not added to include path. --- devices/flp2epn-distributed/CMakeLists.txt | 1 + devices/flp2epn-dynamic/CMakeLists.txt | 1 + devices/flp2epn/CMakeLists.txt | 1 + devices/hough/CMakeLists.txt | 2 ++ devices/roundtrip/CMakeLists.txt | 1 + o2cdb/CMakeLists.txt | 1 + 6 files changed, 7 insertions(+) diff --git a/devices/flp2epn-distributed/CMakeLists.txt b/devices/flp2epn-distributed/CMakeLists.txt index 6a5a9f169089e..c04de292c0d3c 100644 --- a/devices/flp2epn-distributed/CMakeLists.txt +++ b/devices/flp2epn-distributed/CMakeLists.txt @@ -5,6 +5,7 @@ set(INCLUDE_DIRECTORIES set(SYSTEM_INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} + ${ZMQ_INCLUDE_DIR} ${FAIRROOT_INCLUDE_DIR} ${AlFa_DIR}/include ) diff --git a/devices/flp2epn-dynamic/CMakeLists.txt b/devices/flp2epn-dynamic/CMakeLists.txt index b3ce32a0ce626..c6d07842dda8f 100644 --- a/devices/flp2epn-dynamic/CMakeLists.txt +++ b/devices/flp2epn-dynamic/CMakeLists.txt @@ -6,6 +6,7 @@ set(SYSTEM_INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} ${FAIRROOT_INCLUDE_DIR} + ${ZMQ_INCLUDE_DIR} ) include_directories(${INCLUDE_DIRECTORIES}) diff --git a/devices/flp2epn/CMakeLists.txt b/devices/flp2epn/CMakeLists.txt index b2f0dc338bc9d..47cf5c76988ff 100644 --- a/devices/flp2epn/CMakeLists.txt +++ b/devices/flp2epn/CMakeLists.txt @@ -6,6 +6,7 @@ set(SYSTEM_INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} ${FAIRROOT_INCLUDE_DIR} + ${ZMQ_INCLUDE_DIR} ${AlFa_DIR}/include ) diff --git a/devices/hough/CMakeLists.txt b/devices/hough/CMakeLists.txt index a324ecb692d41..44308c5c90bb3 100644 --- a/devices/hough/CMakeLists.txt +++ b/devices/hough/CMakeLists.txt @@ -1,6 +1,7 @@ set(INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} + ${ROOT_INCLUDE_DIR} ${ALIROOT}/include ${SIMPATH}/include/root ) @@ -9,6 +10,7 @@ include_directories(SYSTEM ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${Boost_LIBRARY_DIRS} + ${ROOT_LIBRARY_DIR} ${ALIROOT}/lib ${SIMPATH}/lib/root ) diff --git a/devices/roundtrip/CMakeLists.txt b/devices/roundtrip/CMakeLists.txt index 7d5d0ba8cafa7..a5129d982aa0b 100644 --- a/devices/roundtrip/CMakeLists.txt +++ b/devices/roundtrip/CMakeLists.txt @@ -6,6 +6,7 @@ set(SYSTEM_INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} ${FAIRROOT_INCLUDE_DIR} + ${ZMQ_INCLUDE_DIR} ${AlFa_DIR}/include ) diff --git a/o2cdb/CMakeLists.txt b/o2cdb/CMakeLists.txt index 1e01431b69d4e..23527baf72d59 100644 --- a/o2cdb/CMakeLists.txt +++ b/o2cdb/CMakeLists.txt @@ -6,6 +6,7 @@ set(SYSTEM_INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} ${ROOT_INCLUDE_DIR} + ${FAIRROOT_INCLUDE_DIR} ) include_directories(${INCLUDE_DIRECTORIES}) From 5c5c02774e8a42f386ab12db6590f564f13092bc Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Tue, 18 Aug 2015 00:47:25 +0200 Subject: [PATCH 4/7] Get rid of warning about implicit namespace. std:: is not really defined yet, so clang on mac actually complains about an implicitly defined namespace in the using statement. --- devices/aliceHLTwrapper/AliHLTDataTypes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/devices/aliceHLTwrapper/AliHLTDataTypes.h b/devices/aliceHLTwrapper/AliHLTDataTypes.h index d36e3cae6a41b..bb7cb7b1412b2 100644 --- a/devices/aliceHLTwrapper/AliHLTDataTypes.h +++ b/devices/aliceHLTwrapper/AliHLTDataTypes.h @@ -1433,6 +1433,7 @@ extern "C" { } +namespace std {} using namespace std; ////////////////////////////////////////////////////////////////////////// From 083fd4ffda99537166002fb798dc6f1f2410afd8 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Wed, 19 Aug 2015 10:04:23 +0200 Subject: [PATCH 5/7] Silence warning. --- devices/aliceHLTwrapper/Component.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/aliceHLTwrapper/Component.cxx b/devices/aliceHLTwrapper/Component.cxx index ebbcc2de66762..e0f173f4afef1 100644 --- a/devices/aliceHLTwrapper/Component.cxx +++ b/devices/aliceHLTwrapper/Component.cxx @@ -305,7 +305,7 @@ int Component::process(vector& dataArray, for (; ci != inputBlocks.end(); ci++) { AliHLTUInt8_t* pInputBufferStart = reinterpret_cast(ci->fPtr); AliHLTUInt8_t* pInputBufferEnd = pInputBufferStart + ci->fSize; - if (bValid = (pStart >= pInputBufferStart && pEnd <= pInputBufferEnd)) { + if ((bValid = (pStart >= pInputBufferStart && pEnd <= pInputBufferEnd))) { break; } } From 2223d1d8a91431632f45e4fea5f9b19ce77ab423 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Wed, 19 Aug 2015 10:17:59 +0200 Subject: [PATCH 6/7] Adjust Pythia8 so that it works both with 8175 and 82XX. Since 82XX there is only Pythia::init(). This mimicks the old, multi-argument Pythia::init(..). --- Generators/Pythia8Generator.cxx | 14 ++++++++++++-- Generators/Pythia8Generator.h | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Generators/Pythia8Generator.cxx b/Generators/Pythia8Generator.cxx index 29e850e90305a..c2cadc4d22c34 100644 --- a/Generators/Pythia8Generator.cxx +++ b/Generators/Pythia8Generator.cxx @@ -12,7 +12,7 @@ #include #include "TROOT.h" -#include "Pythia.h" +#include "Pythia8/Pythia.h" #include "FairPrimaryGenerator.h" //#include "FairGenerator.h" @@ -40,7 +40,17 @@ Bool_t Pythia8Generator::Init() fPythia.setRndmEnginePtr(fRandomEngine); cout<<"Beam Momentum "< Date: Wed, 19 Aug 2015 15:04:53 +0200 Subject: [PATCH 7/7] Add PYTHIA6 library path. --- Generators/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Generators/CMakeLists.txt b/Generators/CMakeLists.txt index 3f0131a60a19a..670dc3f631698 100644 --- a/Generators/CMakeLists.txt +++ b/Generators/CMakeLists.txt @@ -21,6 +21,8 @@ include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ${FAIRROOT_LIBRARY_DIR} +${Pythia6_LIBRARY_DIR} +${PYTHIA8_LIBRARY_DIR} ${AlFa_DIR}/lib ${SIMPATH}/lib )