Skip to content

Commit e72dc58

Browse files
committed
first batch of changes for forward compatibility with ROOT6
1 parent 70c6596 commit e72dc58

File tree

17 files changed

+106
-72
lines changed

17 files changed

+106
-72
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ CHECK_EXTERNAL_PACKAGE_INSTALL_DIR()
106106
# For example the framework can run without GEANT4, but ROOT is
107107
# mandatory
108108

109-
find_package(ROOT 5.32.00 REQUIRED)
110-
find_package(PLUTO REQUIRED)
109+
find_package(ROOT 5.34.00 REQUIRED)
110+
# find_package(PLUTO REQUIRED)
111111
find_package(Pythia8 REQUIRED)
112112
find_package(GENERATORS REQUIRED)
113113
find_package(GEANT3 REQUIRED)

ecal/ecalInf.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ ecalInf::ecalInf(const char* filename)
172172
rtdb->getContainer("CbmGeoEcalPar");
173173
}
174174
*/
175-
ifstream file(filename);
175+
std::ifstream file(filename);
176176
Int_t linenum;
177177
Double_t val;
178178
string buffer;

ecal/ecalReconstructed.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ friend class ecalReco;
2323
inline Int_t CellNum() const {return fCellNum;}
2424
inline Int_t ClusterNum() const {return fClusterNum;}
2525
inline Int_t MCTrack() const {return fMCTrack;}
26-
inline Int_t SetMCTrack(Int_t mctrack) {fMCTrack=mctrack;}
26+
inline void SetMCTrack(Int_t mctrack) {fMCTrack=mctrack;}
2727

2828
private:
2929
/** Uncalibrated energy **/

gconfig/basiclibs.C

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ void basiclibs()
2020
gSystem->Load("libMinuit");
2121
gSystem->Load("libMathMore");
2222
gSystem->Load("libpythia8");
23+
gSystem->Load("libgenfit.so");
2324
}

genfit/CMakeLists.txt

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ EndIf (Boost_Avail)
77

88
# Set the build type. Possibilities are None, Debug, Release,
99
# RelWithDebInfo and MinSizeRel
10-
#SET(CMAKE_BUILD_TYPE Debug)
10+
SET(CMAKE_BUILD_TYPE Release)
1111

1212
# either, the environment variable RAVEPATH has to be specified, and RAVE's pkgConfig will be used to determine everything we need
1313
# or, RAVE_LDFLAGS, RAVE_INCLUDE_DIRS and RAVE_CFLAGS have to be set via the command-line
@@ -23,7 +23,7 @@ IF(DEFINED ENV{RAVEPATH})
2323
ELSEIF(DEFINED RAVE_LDFLAGS)
2424
IF(DEFINED RAVE_INCLUDE_DIRS)
2525
IF(DEFINED RAVE_CFLAGS)
26-
MESSAGE("RAVE_LDFLAGS, RAVE_INCLUDE_DIRS and RAVE_CFLAGS are set. Try to build GFRave.")
26+
MESSAGE("RAVE_LDFLAGS, RAVE_INCLUDE_DIRS and RAVE_CFLAGS are set. Try to build GFRave. ${RAVE_LDFLAGS}")
2727
SET(RAVE True)
2828
ENDIF()
2929
ENDIF()
@@ -78,15 +78,20 @@ ENDIF(NOT CMAKE_BUILD_TYPE)
7878
#SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
7979

8080
include(CheckCXXCompilerFlag)
81-
check_cxx_compiler_flag(-std=c++03 HAS_STD_FLAG)
82-
check_cxx_compiler_flag(--std=c++03 HAS_STD_FLAG_ALTERNATIVE)
83-
if (HAS_STD_FLAG)
81+
# ROOT 6 requires c++11 support, enforced via headers
82+
If (ROOT_FOUND_VERSION LESS 59999)
83+
check_cxx_compiler_flag(-std=c++03 HAS_STD_FLAG)
84+
check_cxx_compiler_flag(--std=c++03 HAS_STD_FLAG_ALTERNATIVE)
85+
if (HAS_STD_FLAG)
8486
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03")
85-
elseif (HAS_STD_FLAG_ALTERNATIVE)
87+
elseif (HAS_STD_FLAG_ALTERNATIVE)
8688
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++03")
87-
else()
89+
else()
8890
message("Neither --std=c++03 nor -std=c++03 seem to work. Moving on.")
89-
endif()
91+
endif()
92+
else()
93+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
94+
EndIf()
9095

9196
# require proper c++, standard is C++03, flag reads: c++98
9297
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wno-long-long -Wshadow -Werror=overloaded-virtual" )
@@ -282,7 +287,7 @@ link_directories( ${LINK_DIRECTORIES})
282287
Set(SRCS ${library_sources})
283288
Set(HEADERS)
284289
Set(LIBRARY_NAME genfit)
285-
Set(DEPENDENCIES Cint Core Geom Matrix Eve Gui Physics MathCore EG)
290+
Set(DEPENDENCIES Core Geom Matrix Eve Gui Physics MathCore EG)
286291

287292
Set(LINKDEF
288293
${CMAKE_CURRENT_SOURCE_DIR}/core/src/coreLinkDef.h
@@ -297,14 +302,15 @@ ${CMAKE_CURRENT_SOURCE_DIR}/utilities/src/utilitiesLinkDef.h
297302
if(DEFINED RAVE)
298303
Set(LINKDEF ${LINKDEF} ${CMAKE_CURRENT_SOURCE_DIR}/GFRave/src/GFRaveLinkDef.h)
299304
endif()
300-
ROOT_GENERATE_ROOTMAP()
305+
If (ROOT_FOUND_VERSION LESS 59999)
306+
ROOT_GENERATE_ROOTMAP()
307+
EndIf()
301308

302309
# to not call again ROOT_GENERATE_ROOTMAP
303310
Set(LINKDEF)
304311

305312
GENERATE_LIBRARY()
306313

307-
308314
# the examples, build with "make tests"
309315
ADD_CUSTOM_TARGET( tests )
310316
MACRO( ADD_GENFIT_TEST _testname )

hcal/hcalInf.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ hcalInf::hcalInf(const char* filename)
173173
rtdb->getContainer("CbmGeoHcalPar");
174174
}
175175
*/
176-
ifstream file(filename);
176+
std::ifstream file(filename);
177177
Int_t linenum;
178178
Double_t val;
179179
string buffer;

macro/run_simScript.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@
276276
else: run.SetStoreTraj(ROOT.kFALSE)
277277
# -----Initialize simulation run------------------------------------
278278
run.Init()
279-
fStack = ROOT.gMC.GetStack()
279+
gMC = ROOT.TVirtualMC.GetMC()
280+
fStack = gMC.GetStack()
280281
if not deepCopy : fStack.SetEnergyCut(100.*u.MeV)
281282

282283
if eventDisplay:

muon/muon.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef VETO_H
2-
#define VETO_H
1+
#ifndef MUON_H
2+
#define MUON_H
33

44
#include "FairDetector.h"
55

@@ -121,4 +121,4 @@ class muon: public FairDetector
121121
ClassDef(muon,1)
122122
};
123123

124-
#endif //VETO_H
124+
#endif //MUON_H

nutaudet/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ TargetPoint.cxx
3232
Set(HEADERS )
3333
Set(LINKDEF nutaudetLinkDef.h)
3434
Set(LIBRARY_NAME nutaudet)
35-
Set(DEPENDENCIES Base ShipData GeoBase ParBase Geom Cint Core)
35+
Set(DEPENDENCIES Base ShipData GeoBase ParBase Geom Core)
3636

3737
GENERATE_LIBRARY()

passive/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ ShipGoliath.cxx
3232
Set(HEADERS )
3333
Set(LINKDEF PassiveLinkDef.h)
3434
Set(LIBRARY_NAME Passive)
35-
Set(DEPENDENCIES Base GeoBase ParBase Geom Cint Core)
35+
Set(DEPENDENCIES Base GeoBase ParBase Geom Core)
3636

3737
GENERATE_LIBRARY()

0 commit comments

Comments
 (0)