diff --git a/examples/Segmentation/CMakeLists.txt b/examples/Segmentation/CMakeLists.txt index 3b6d5a0aa887f3e1fe0195af3fbacddef1d69a94..0fdb1786f8132b1a2a3a11028adfe7b4f6803adf 100644 --- a/examples/Segmentation/CMakeLists.txt +++ b/examples/Segmentation/CMakeLists.txt @@ -14,9 +14,9 @@ IF(NOT TARGET DD4hep::DDCore) find_package ( DD4hep REQUIRED ) include ( ${DD4hep_DIR}/cmake/DD4hep.cmake ) include ( ${DD4hep_DIR}/cmake/DD4hepBuild.cmake ) - dd4hep_configure_output() ENDIF() +dd4hep_configure_output() dd4hep_set_compiler_flags() #========================================================================== @@ -50,17 +50,12 @@ ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -find_package( ROOT REQUIRED ) -set( ROOT_COMPONENT_LIBRARIES Geom Reflex) - -#------------------------------------------------------------- -# add additional packages here - +find_package ( ROOT REQUIRED COMPONENTS Geom GenVector ) #------------------------------------------------------------- include_directories( ${CMAKE_SOURCE_DIR}/include - ${dd4hep_INCLUDE_DIRS} + ${DD4hep_INCLUDE_DIRS} ${ROOT_INCLUDE_DIR} ) @@ -76,7 +71,7 @@ endif() add_executable(Segmentation SegmentationTest.cpp ${sources}) -target_link_libraries(Segmentation ${dd4hep_LIBRARIES} ) +target_link_libraries(Segmentation ${DD4hep_LIBRARIES} ) #---Rootmap generation-------------------------------------------------------------- # diff --git a/examples/Segmentation/SegmentationTest.cpp b/examples/Segmentation/SegmentationTest.cpp index 77f685b49b6b03186601fba78a593f89937869a4..2ca4a18a334a9710920ccd260ca91c274daf13ab 100644 --- a/examples/Segmentation/SegmentationTest.cpp +++ b/examples/Segmentation/SegmentationTest.cpp @@ -6,6 +6,7 @@ */ #include "DD4hep/Detector.h" +#include "DDSegmentation/BitField64.h" #include "DDSegmentation/SegmentationFactory.h" #include "DDSegmentation/SegmentationParameter.h" @@ -17,7 +18,7 @@ using namespace dd4hep; using namespace detail; using namespace DDSegmentation; -int main(int argc, char** argv) { +int main(int, char**) { SegmentationFactory* f = SegmentationFactory::instance(); @@ -29,16 +30,16 @@ int main(int argc, char** argv) { DDSegmentation::Segmentation* s = f->create(typeName); cout << "\t" << typeName << ", " << s->type() << endl; Parameters parameters = s->parameters(); - Parameters::iterator it; - for (it = parameters.begin(); it != parameters.end(); ++it) { - Parameter p = *it; + Parameters::iterator it2; + for (it2 = parameters.begin(); it2 != parameters.end(); ++it2) { + Parameter p = *it2; cout << "\t\t" << p->name() << " = " << p->value() << endl; } delete s; } DDSegmentation::Segmentation* s = f->create("CartesianGridXY", "system:8,barrel:3,module:4,layer:8,slice:5,x:32:-16,y:-16"); - BitField64& d = *s->decoder(); + BitField64 d = s->decoder(); d["system"] = 1; d["barrel"] = 0; d["module"] = 5; @@ -56,4 +57,4 @@ int main(int argc, char** argv) { } delete s; return 0; -}; +}