diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000000000000000000000000000000000000..6f170626fd0ccea43c9caef31d00480274de18bb
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,12 @@
+---
+BasedOnStyle: WebKit
+
+AllowShortIfStatementsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+BreakBeforeBraces: Allman
+ColumnLimit: 100
+IndentWidth: 4
+NamespaceIndentation: None
+SortIncludes: false
+---
diff --git a/.gitignore b/.gitignore
index 378eac25d311703f3f2cd456d8036da525cd0366..c98012c0574bd8e5b645ec283f3c8a874dd66113 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,21 @@
+*.pyc
+.*.swp
+*.Po
+*.Plo
+*.lo
+*.o
+*.so
+*.la
+*.a
+*.cxx
+*.log
+.libs/*
+.deps/*
+*.tar.Z
+*.tar.bz2
+*.tar.gz
build
+docs/source/doxygen
+docs/source/api/class
+docs/source/api/struct
+docs/source/_static/dotfiles
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..8061d128b1e94a7ccc8b663dc299cbf09c483242
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,40 @@
+stages:
+ - lint
+ - test
+ - docs
+
+lint:
+ stage: lint
+ image: 3pia/pxl:latest
+ script:
+ - find core io hep modules pxlrun \( -name "*.hh" -o -name "*.cc" \) ! -name "minijson*" ! -name "AssocVector.hh" | xargs clang-format -style=file -i
+ - if [ -z "$( git diff --name-only )" ]; then echo "code format check succeeded"; exit 0; fi
+ - 2>&1 echo "code format check failed, found errors in the following files:"
+ - 2>&1 git diff --name-only
+ - 2>&1 echo
+ - 2>&1 echo "possible changes:"
+ - 2>&1 git --no-pager diff
+ - exit 1
+
+test:
+ stage: test
+ image: 3pia/pxl:latest
+ script:
+ - mkdir -p build
+ - cd build
+ - cmake ..
+ - make
+ - make test
+
+docs:
+ stage: docs
+ when: manual
+ image: 3pia/pxl:latest
+ script:
+ - cd docs
+ - ./docs.sh build
+ artifacts:
+ paths:
+ - docs/build
+ name: "${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}"
+ expire_in: 1 day
diff --git a/.hgignore b/.hgignore
deleted file mode 100644
index db9ff427ac59b8d7f07efbb52e84d7182a0b34e7..0000000000000000000000000000000000000000
--- a/.hgignore
+++ /dev/null
@@ -1,98 +0,0 @@
-#my global hghignore file
-syntax: glob
-
-*.pyc
-.*.swp
-
-#C++
-*.Po
-*.Plo
-*.lo
-*.o
-*.so
-*.la
-*.a
-.libs/*
-.deps/*
-hg-checklink*
-
-#CMakeStuff
-CMakeFiles/*
-cmake_install.cmake
-CMakeCache.txt
-_CPack_Packages/*
-CPackConfig.cmake
-CPackSourceConfig.cmake
-*.tar.Z
-*.tar.bz2
-*.tar.gz
-
-# autotools stuff
-Makefile.in
-Makefile
-aclocal.m4
-autom4te.cache
-compile
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-intltool-*
-libtool
-ltmain.sh
-missing
-mkinstalldirs
-stamp-h1
-
-
-#automatically generated files
-*.html
-*.png
-*.gif
-*.css
-*.pc
-bin/*
-
-*.cxx
-*.log
-
-pypxl/*.py
-CTestTestfile.cmake
-scripting/swigpyrun.h
-
-# ???
-DartConfiguration.tcl
-CTestCostData.txt
-analysisTestOut.xml
-
-syntax: regexp
-^doc/pxl/xml$
-syntax: regexp
-^doc/pxl/Doxyfile$
-syntax: regexp
-^pypxl/pxl$
-
-glob:doc/pxl/html/*
-glob:doc/pypxl/html/*
-glob:test/pypxl_test*.py
-glob:test/test_healpix_pythonInterface.py
-
-glob:Doxyfile
-
-syntax: regexp
-^build$
-syntax: regexp
-^pypxl/xml$
-glob:test/pypxltest.py
-glob:pypxl/*PYTHON_wrap.h
-glob:pypxl/*.i
-glob:pypxl/Doxyfile
-glob:include/pxl/core/config.hh
-
-syntax: glob
-.*project
\ No newline at end of file
diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index 3f1edbd88139d469fd6f46db71c3e4fea2787f22..0000000000000000000000000000000000000000
--- a/AUTHORS
+++ /dev/null
@@ -1,20 +0,0 @@
-Current PXL Developers:
- Robert Fischer
- Andreas Hinzmann
- Dennis Klingebiel
- Matthias Komm
- Gero Mueller
- Jan Steggemann
- Tobias Winchen
-
-Current PXL Project Managers:
- Martin Erdmann
-
-Former PXL Developers/Advisors:
- Oxana Actis
- Steffen Kappler (project leader)
- Matthias Kirsch
- Tatsiana Klimkovich
- Matthias Plum
- Guenter Quast
- Christophe Saout
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2932ec238dc4b14a61e8cce16ab1720df033b51d..1b5b493273b3bb6f1adbf7c2de79b391e2cae456 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,62 +1,101 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(PXL)
+#
+# project setup
+#
+
+cmake_minimum_required(VERSION 2.6)
+project(PXL)
+
+list(APPEND CMAKE_MODULE_PATH "$ENV{CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/cmake")
+
#
-# define PXL Version
+# define the version
#
-SET(PXLMAJORRELEASEVERSION 3)
-SET(PXLMINORRELEASEVERSION 5)
-SET(BUGFIXRELEASE 4)
-SET(PXLVERSION ${PXLMAJORRELEASEVERSION}.${PXLMINORRELEASEVERSION}.${BUGFIXRELEASE})
-SET(PXLMAINVERSION ${PXLMAJORRELEASEVERSION}.${PXLMINORRELEASEVERSION})
+# read from version file
+file(READ "${CMAKE_SOURCE_DIR}/version.txt" VERSION_STRING)
+string(REGEX MATCHALL "([0-9a-zA-Z]+)" VERSION_LIST "${VERSION_STRING}")
+list(GET VERSION_LIST 0 PXL_VERSION_MAJOR)
+list(GET VERSION_LIST 1 PXL_VERSION_MINOR)
+list(GET VERSION_LIST 2 PXL_VERSION_PATCH)
+set(PXL_VERSION "${PXL_VERSION_MAJOR}.${PXL_VERSION_MINOR}.${PXL_VERSION_PATCH}")
+set(PXL_VERSION_LIB "${PXL_VERSION_MAJOR}.${PXL_VERSION_MINOR}")
-IF(NOT CMAKE_BUILD_TYPE)
- SET(CMAKE_BUILD_TYPE Release)
-ENDIF()
-MESSAGE(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
+message(STATUS "building PXL v${PXL_VERSION}")
+
+
+#
+# define directories
+#
-OPTION(ENABLESWIGDOCSTRINGS "Automatically generate docstrings with swig" ON)
-OPTION(ENABLETESTING "Build tests and enable test target" ON)
+message(STATUS "INSTALL_PREFIX : ${CMAKE_INSTALL_PREFIX}")
+
+if(NOT PXL_BIN_DIR)
+ set(PXL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)
+endif()
+message(STATUS "PXL_BIN_DIR : ${PXL_BIN_DIR}")
+
+if(NOT PXL_LIB_DIR)
+ set(PXL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib)
+endif()
+message(STATUS "PXL_LIB_DIR : ${PXL_LIB_DIR}")
+
+if(NOT PXL_INCLUDE_DIR)
+ set(PXL_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
+endif()
+message(STATUS "PXL_INCLUDE_DIR: ${PXL_INCLUDE_DIR}")
+
+if(NOT PXL_SHARE_DIR)
+ set(PXL_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share)
+endif()
+message(STATUS "PXL_SHARE_DIR : ${PXL_SHARE_DIR}")
-OPTION(ENABLE_COVERAGE_TEST "Build tests and enable test target" OFF)
-IF (ENABLE_COVERAGE_TEST)
- MESSAGE(STATUS "Enable coverage test")
- SET(CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage ${CMAKE_CXX_FLAGS}")
- SET(CMAKE_EXE_LINKER_FLAGS "-lgcov ${CMAKE_EXE_LINKER_FLAGS}")
+if(NOT PXL_PLUGIN_DIR)
+ set(PXL_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/lib/pxl-${PXL_VERSION_LIB})
endif()
+message(STATUS "PXL_PLUGIN_DIR : ${PXL_PLUGIN_DIR}")
-OPTION(USE_PYTHON "enable python bindings and modules" ON)
-IF(USE_PYTHON)
- ADD_DEFINITIONS(-DPXL_USE_PYTHON)
- FIND_PACKAGE(SWIG REQUIRED)
+#
+# duplicates to be compliant to autotools *.in files
+#
+
+set(prefix ${CMAKE_INSTALL_PREFIX})
+set(exec_prefix ${CMAKE_INSTALL_PREFIX})
+set(libdir ${PXL_LIB_DIR})
+set(includedir ${PXL_INCLUDE_DIR})
+set(datadir ${CMAKE_INSTALL_PREFIX}/share/pxl)
- INCLUDE (Python.cmake)
- IF(${PYTHON_DOT_VERSION} VERSION_LESS 2.6)
- MESSAGE(SEND_ERROR " PXL requires Python 2.6 or later. If you have python 2.6 or newer installed but it is not your default python version, you can provide the location of the newer python interpreter e.g. via
- $cmake -DPYTHON_EXECUTABLE=/usr/bin/python2.6")
- ENDIF()
- IF(NOT PYTHON_EXECUTABLE)
- MESSAGE(FATAL_ERROR "PYTHON EXECUTEABLE NOT FOUND! You can set the location of the python interpreter e.g. via
- $cmake -DPYTHON_EXECUTABLE=/usr/bin/python2.6")
- ENDIF()
-ENDIF()
+#
+# furher package setup
+#
-FIND_PACKAGE(Doxygen)
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE Release)
+endif()
+message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
+
+option(ENABLETESTING "Build tests and enable test target" ON)
+
+option(ENABLE_COVERAGE_TEST "Build tests and enable test target" OFF)
+if(ENABLE_COVERAGE_TEST)
+ message(STATUS "Enable coverage test")
+ set(CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage ${CMAKE_CXX_FLAGS}")
+ set(CMAKE_EXE_LINKER_FLAGS "-lgcov ${CMAKE_EXE_LINKER_FLAGS}")
+endif()
-ADD_DEFINITIONS(-DPXL_EXPORT)
+add_definitions(-DPXL_EXPORT)
-INCLUDE(CheckIncludeFile)
+include(CheckIncludeFile)
-MACRO(PXL_CHECK_HEADER filename define)
- CHECK_INCLUDE_FILE(${filename} ${define})
- IF(${define})
- ADD_DEFINITIONS(-D${define})
- ENDIF(${define})
-ENDMACRO(PXL_CHECK_HEADER filename define)
+macro(PXL_CHECK_HEADER filename define)
+ CHECK_INCLUDE_FILE(${filename} ${define})
+ if(${define})
+ add_definitions(-D${define})
+ endif()
+endmacro()
PXL_CHECK_HEADER(winsock2.h HAVE_WINSOCK2_H)
PXL_CHECK_HEADER(sys/socket.h HAVE_SYS_SOCKET_H)
@@ -67,209 +106,178 @@ PXL_CHECK_HEADER(sys/time.h HAVE_SYS_TIME_H)
PXL_CHECK_HEADER(netdb.h HAVE_NETDB_H)
PXL_CHECK_HEADER(Ws2tcpip.h HAVE_WS2TCPIP_H)
-#
-# define include directory
-#
-
-SET(PXLINCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include)
-
-SET(PXLLIBSDIR ${CMAKE_INSTALL_PREFIX}/lib)
-#
-# define the plugindirectory -
-#
-SET(PXLPLUGINDIR ${CMAKE_INSTALL_PREFIX}/lib/pxl-${PXLMAINVERSION})
-#
-# define use healpix option
-#
-OPTION(USE_HEALPIX "Build the healpix library, which is under GPL" TRUE)
+find_package(Threads)
-#
-# the install directories
-#
-#SET(BIN_INSTALLDIR ${CMAKE_INSTALL_PREFIX}/bin)
-#SET(LIB_INSTALLDIR ${CMAKE_INSTALL_PREFIX}/lib)
-#SET(HEADER_INSTALLDIR ${CMAKE_INSTALL_PREFIX}/include)
+if(MSVC)
+ add_definitions( "/wd4290 /wd4251 /nologo" )
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
+endif()
-FIND_PACKAGE(Threads)
+# setup stdint.h
+if(MSVC)
+ find_path(STDINT_H_PATH stdint.h external/stdint)
+ message(STATUS "Use stdint.h from " ${STDINT_H_PATH})
+ include_directories(${STDINT_H_PATH})
+endif()
-IF(MSVC)
- ADD_DEFINITIONS( "/wd4290 /wd4251 /nologo" )
- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
-ENDIF(MSVC)
#
-# DUPLICATIONS TO WORK WITH autotools *.in files
+# check for debug flags
#
-SET(PXL_VERSION ${PXLVERSION})
-SET(PXL_LIB_VERSION ${PXLMAINVERSION})
-SET(includedir ${PXLINCLUDEDIR})
-SET(libdir ${PXLLIBSDIR})
-SET(datadir ${CMAKE_INSTALL_PREFIX}/share/pxl)
-SET(exec_prefix ${CMAKE_INSTALL_PREFIX})
-SET(prefix ${CMAKE_INSTALL_PREFIX})
-# setup stdint.h
-IF(MSVC)
- FIND_PATH(STDINT_H_PATH stdint.h lib/stdint)
- MESSAGE(STATUS "Use stdint.h from " ${STDINT_H_PATH})
- INCLUDE_DIRECTORIES(${STDINT_H_PATH})
-ENDIF()
+option(DEFINE_DEBUG "Build the project using debugging code" OFF)
+if(DEFINE_DEBUG)
+ message(STATUS "Adding Debug flag...")
+ add_definitions(-DDEBUG)
+ set(CMAKE_BUILD_TYPE Debug)
+ message(STATUS "Build type is " ${CMAKE_BUILD_TYPE})
+endif()
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
+set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
+
+if(MSVC)
+ set(OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin/Release")
+else()
+ set(OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
+endif()
+message(STATUS "Output Path: ${OUTPUT_PATH}")
-#
-# check for debug flag
-#
-OPTION(DEFINE_DEBUG "Build the project using debugging code" OFF)
-IF(DEFINE_DEBUG)
- MESSAGE(STATUS "Adding Debug flag...")
- ADD_DEFINITIONS(-DDEBUG)
- SET(CMAKE_BUILD_TYPE Debug)
- MESSAGE(STATUS "Build type is " ${CMAKE_BUILD_TYPE})
-ENDIF()
-
-SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
-SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
-
-IF(MSVC)
- SET(OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin/Release")
-ELSE()
- SET(OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
-ENDIF()
-MESSAGE(STATUS "Output Path: ${OUTPUT_PATH}")
#
# define common macro for installing libraries
#
-MACRO(PXL_INSTALL_LIBRARY name)
- SET_TARGET_PROPERTIES(${name} PROPERTIES VERSION ${PXLMAINVERSION})
- IF(WIN32)
- INSTALL(TARGETS ${name} ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
- INSTALL(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
- ELSE()
- INSTALL(TARGETS ${name} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
- INSTALL(DIRECTORY include/pxl DESTINATION ${PXLINCLUDEDIR} FILES_MATCHING PATTERN "*.hh" PATTERN "Py*.*" EXCLUDE)
-
- #
- # automatically generate pkgconfig file and install it
- #
- IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.pc.in)
- CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${name}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${name}.pc)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
- ENDIF()
- ENDIF()
-ENDMACRO(PXL_INSTALL_LIBRARY name)
+
+macro(PXL_INSTALL_LIBRARY name)
+ set_target_properties(${name} PROPERTIES VERSION ${PXL_VERSION_LIB})
+ if(WIN32)
+ install(TARGETS ${name} ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
+ install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
+ else()
+ install(TARGETS ${name} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
+ install(DIRECTORY include/pxl DESTINATION ${PXL_INCLUDE_DIR} FILES_MATCHING PATTERN "*.hh" PATTERN "Py*.*" EXCLUDE)
+
+ #
+ # automatically generate pkgconfig file and install it
+ #
+ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.pc.in)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${name}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${name}.pc)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
+ endif()
+ endif()
+endmacro()
+
#
# define common macro for installing executables
#
-MACRO(PXL_INSTALL_EXECUTABLE name)
- IF(WIN32)
- INSTALL(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
- ELSE()
- INSTALL(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
- ENDIF()
-ENDMACRO(PXL_INSTALL_EXECUTABLE name)
-
-INCLUDE(Xcode.cmake)
-
-INCLUDE(FindLibSSH.cmake)
-IF(LIB_SSH_FOUND)
- ADD_DEFINITIONS(-DPXL_ENABLE_SFTP)
- SET(PXL_ENABLE_SFTP TRUE)
-ENDIF()
-
-INCLUDE(FindDCAP.cmake)
-IF(LIB_DCAP_FOUND)
- MESSAGE(STATUS "Enable DCAP")
- ADD_DEFINITIONS(-DPXL_ENABLE_DCAP)
- SET(PXL_ENABLE_DCAP TRUE)
-ENDIF()
+
+macro(PXL_INSTALL_EXECUTABLE name)
+ if(WIN32)
+ INSTALL(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
+ else()
+ INSTALL(TARGETS ${name} RUNTIME DESTINATION ${PXL_BIN_DIR})
+ endif()
+endmacro()
+
+
+if(APPLE)
+ # using MACOSX_RPATH is enabled by default (policy CMP0042)
+ # set the variable to an arbitrary value to supress warnings
+ # run "cmake --help-policy CMP0042" for more info
+ set(CMAKE_MACOSX_RPATH 1)
+endif()
+
+
+find_package(LibSSH)
+if(LIB_SSH_FOUND)
+ add_definitions(-DPXL_ENABLE_SFTP)
+ set(PXL_ENABLE_SFTP TRUE)
+endif()
+
+find_package(DCAP)
+if(LIB_DCAP_FOUND)
+ message(STATUS "Enable DCAP")
+ add_definitions(-DPXL_ENABLE_DCAP)
+ set(PXL_ENABLE_DCAP TRUE)
+endif()
#
-# add externals to include directory
+# add externals to include directory
#
-INCLUDE_DIRECTORIES(${PXL_SOURCE_DIR}/lib)
+
+include_directories(${PXL_SOURCE_DIR}/external)
+
#
# add sub projects
#
-IF(ENABLETESTING)
- ENABLE_TESTING()
- ADD_SUBDIRECTORY(test)
- ADD_SUBDIRECTORY(lib/gtest)
-ENDIF()
+
+if(ENABLETESTING)
+ enable_testing()
+ add_subdirectory(test)
+ add_subdirectory(external/gtest)
+endif()
#
# find zlib
#
-SET(ZLIB_INCLUDE_DIR)
-FIND_PACKAGE(ZLIB)
-IF(ZLIB_FOUND)
- MESSAGE(STATUS "Use system zlib")
-ELSE()
- ADD_SUBDIRECTORY(lib/zlib)
- MESSAGE(STATUS "Use internal zlib")
- SET(ZLIB_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/lib/zlib" "${CMAKE_BINARY_DIR}/lib/zlib")
- SET(ZLIB_LIBRARIES zlib)
-ENDIF()
-
-IF(WIN32 AND NOT CYGWIN)
- SET(DEF_INSTALL_CMAKE_DIR CMake)
-ELSE()
- SET(DEF_INSTALL_CMAKE_DIR "lib/cmake/pxl-${PXLMAINVERSION}")
-ENDIF()
-SET(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR})
-
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/PXLConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/PXLConfig.cmake @ONLY)
-INSTALL(FILES
- "${CMAKE_CURRENT_BINARY_DIR}/PXLConfig.cmake"
- DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev)
-
-
-ADD_SUBDIRECTORY(core)
-ADD_SUBDIRECTORY(doc)
-ADD_SUBDIRECTORY(hep)
-ADD_SUBDIRECTORY(xml)
-ADD_SUBDIRECTORY(astro)
-ADD_SUBDIRECTORY(algorithms)
-ADD_SUBDIRECTORY(modules)
-ADD_SUBDIRECTORY(pxlrun)
-ADD_SUBDIRECTORY(examples)
-ADD_SUBDIRECTORY(skeletons)
-
-IF(USE_PYTHON)
- ADD_SUBDIRECTORY(scripting)
- ADD_SUBDIRECTORY(pypxl)
-ENDIF()
-
-INCLUDE(WindowsInstaller.cmake)
-
-IF(UNIX)
- # setup make dist
- ADD_CUSTOM_TARGET(dist
- cd ${CMAKE_SOURCE_DIR} &&
- hg archive -X .hgtags -X .hg_archival.txt -X .hgignore -t tar -p pxl-${PXLVERSION} - |
- gzip > ${CMAKE_BINARY_DIR}/pxl-${PXLVERSION}.tar.gz)
-
- # setup make distcheck
- ADD_CUSTOM_TARGET(distcheck
- cd ${CMAKE_BINARY_DIR} &&
- rm -rf pxl-${PXLVERSION} &&
- gzip -df pxl-${PXLVERSION}.tar.gz &&
- tar -xf pxl-${PXLVERSION}.tar &&
- cd pxl-${PXLVERSION}/ &&
- cmake . && make && make test &&
- cd ${CMAKE_BINARY_DIR} &&
- tar -rf pxl-${PXLVERSION}.tar pxl-${PXLVERSION}/doc/ &&
- gzip ${CMAKE_BINARY_DIR}/pxl-${PXLVERSION}.tar)
- ADD_DEPENDENCIES(distcheck dist)
-ENDIF()
+set(ZLIB_INCLUDE_DIR)
+find_package(ZLIB)
+if(ZLIB_FOUND)
+ message(STATUS "Use system zlib")
+else()
+ add_subdirectory(external/zlib)
+ message(STATUS "Use internal zlib")
+ set(ZLIB_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/external/zlib" "${CMAKE_BINARY_DIR}/external/zlib")
+ set(ZLIB_LIBRARIES zlib)
+endif()
+
+if(WIN32 AND NOT CYGWIN)
+ set(DEF_INSTALL_CMAKE_DIR CMake)
+else()
+ set(DEF_INSTALL_CMAKE_DIR "lib/cmake/pxl-${PXL_VERSION_LIB}")
+endif()
+set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR})
+
+add_subdirectory(core)
+add_subdirectory(io)
+add_subdirectory(hep)
+add_subdirectory(modules)
+add_subdirectory(pxlrun)
+
+if(MSVC)
+ include(${CMAKE_SOURCE_DIR}/cmake/WindowsInstaller.cmake)
+endif()
+
+if(UNIX)
+ # setup make dist
+ add_custom_target(dist
+ cd ${CMAKE_SOURCE_DIR} &&
+ git archive --format tar.gz HEAD > ${CMAKE_BINARY_DIR}/pxl-${PXL_VERSION}.tar.gz
+ )
+
+ # setup make distcheck
+ add_custom_target(distcheck
+ cd ${CMAKE_BINARY_DIR} &&
+ rm -rf pxl-${PXL_VERSION} &&
+ gzip -df pxl-${PXL_VERSION}.tar.gz &&
+ tar -xf pxl-${PXL_VERSION}.tar &&
+ cd pxl-${PXL_VERSION}/ &&
+ cmake . && make && make test &&
+ cd ${CMAKE_BINARY_DIR} &&
+ tar -rf pxl-${PXL_VERSION}.tar pxl-${PXL_VERSION}/doc/ &&
+ gzip ${CMAKE_BINARY_DIR}/pxl-${PXL_VERSION}.tar
+ )
+ add_dependencies(distcheck dist)
+endif()
#
# install additional files
#
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/setup.sh DESTINATION ${CMAKE_INSTALL_PREFIX})
+install(FILES ${CMAKE_SOURCE_DIR}/setup.sh DESTINATION ${CMAKE_INSTALL_PREFIX})
+install(FILES ${CMAKE_SOURCE_DIR}/cmake/FindPXL.cmake DESTINATION ${PXL_SHARE_DIR})
diff --git a/CMakeMacroParseArguments.cmake b/CMakeMacroParseArguments.cmake
deleted file mode 100644
index 4cea370b83580f4cdddd6aaf91b2ddf0c40774d5..0000000000000000000000000000000000000000
--- a/CMakeMacroParseArguments.cmake
+++ /dev/null
@@ -1,90 +0,0 @@
-# This file defines the following macro for developers needing to parse
-# arguments passed to a CMake macro using names.
-#
-# PARSE_ARGUMENTS - parse arguments supplied to a macro
-#
-# The PARSE_ARGUMENTS macro will take the arguments of another macro and define
-# several variables. The first argument to PARSE_ARGUMENTS is a prefix to put
-# on all variables it creates. The second argument is a list of names, and the
-# third argument is a list of options. Both of these lists should be quoted.
-# The rest of PARSE_ARGUMENTS are arguments from another macro to be parsed.
-#
-# PARSE_ARGUMENTS(prefix arg_names options arg1 arg2...)
-#
-# For each item in options, PARSE_ARGUMENTS will create a variable with that
-# name, prefixed with prefix_. So, for example, if prefix is MY_MACRO and
-# options is OPTION1;OPTION2, then PARSE_ARGUMENTS will create the variables
-# MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These variables will be set to true
-# if the option exists in the command line or false otherwise.
-#
-# For each item in arg_names, PARSE_ARGUMENTS will create a variable with that
-# name, prefixed with prefix_. Each variable will be filled with the arguments
-# that occur after the given arg_name is encountered up to the next arg_name
-# or the end of the arguments. All options are removed from these lists.
-# PARSE_ARGUMENTS also creates a prefix_DEFAULT_ARGS variable containing the
-# list of all arguments up to the first arg_name encountered.
-#
-# Here is a simple, albeit impractical, example of using PARSE_ARGUMENTS that
-# demonstrates its behavior.
-#
-# SET(arguments
-# hello OPTION3 world
-# LIST3 foo bar
-# OPTION2
-# LIST1 fuz baz
-# )
-# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "OPTION1;OPTION2;OPTION3" ${arguments})
-#
-# PARSE_ARGUMENTS creates 7 variables and sets them as follows:
-#
-# * ARG_DEFAULT_ARGS: hello;world
-# * ARG_LIST1: fuz;baz
-# * ARG_LIST2:
-# * ARG_LIST3: foo;bar
-# * ARG_OPTION1: FALSE
-# * ARG_OPTION2: TRUE
-# * ARG_OPTION3: TRUE
-#
-# If you don't have any options, use an empty string in its place.
-#
-# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "" ${arguments})
-#
-# Likewise if you have no lists.
-#
-# PARSE_ARGUMENTS(ARG "" "OPTION1;OPTION2;OPTION3" ${arguments})
-#
-#
-# Code and description copied from:
-# http://www.cmake.org/Wiki/CMakeMacroParseArguments
-
-MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
- SET(DEFAULT_ARGS)
- FOREACH(arg_name ${arg_names})
- SET(${prefix}_${arg_name})
- ENDFOREACH(arg_name)
- FOREACH(option ${option_names})
- SET(${prefix}_${option} FALSE)
- ENDFOREACH(option)
-
- SET(current_arg_name DEFAULT_ARGS)
- SET(current_arg_list)
- FOREACH(arg ${ARGN})
- SET(larg_names ${arg_names})
- LIST(FIND larg_names "${arg}" is_arg_name)
- IF (is_arg_name GREATER -1)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
- SET(current_arg_name ${arg})
- SET(current_arg_list)
- ELSE (is_arg_name GREATER -1)
- SET(loption_names ${option_names})
- LIST(FIND loption_names "${arg}" is_option)
- IF (is_option GREATER -1)
- SET(${prefix}_${arg} TRUE)
- ELSE (is_option GREATER -1)
- SET(current_arg_list ${current_arg_list} ${arg})
- ENDIF (is_option GREATER -1)
- ENDIF (is_arg_name GREATER -1)
- ENDFOREACH(arg)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
-ENDMACRO(PARSE_ARGUMENTS)
-
diff --git a/COPYING b/COPYING
deleted file mode 100644
index 101ca3300a2aa7947e7c4a6252992588874c94f5..0000000000000000000000000000000000000000
--- a/COPYING
+++ /dev/null
@@ -1,328 +0,0 @@
-PXL is free software; you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This package is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with this package; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
-
-------------------------------------------------------------------
-This Software uses the Mersenne Twister algorithm for generating random
-numbers. It therfore ships the file MersenneTwister.hh, which is based
-on the MersenneTwister.h, published under following license:
-
-MersenneTwister.h
-Mersenne Twister random number generator -- a C++ class MTRand
-Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus
-Richard J. Wagner v1.0 15 May 2003 rjwagner@writeme.com
-
-The Mersenne Twister is an algorithm for generating random numbers. It
-was designed with consideration of the flaws in various other generators.
-The period, 2^19937-1, and the order of equidistribution, 623 dimensions,
-are far greater. The generator is also fast; it avoids multiplication and
-division, and it benefits from caches and pipelines. For more information
-see the inventors' web page at http://www.math.keio.ac.jp/~matumoto/emt.html
-
-Reference
-M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally
-Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on
-Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
-
-Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
-Copyright (C) 2000 - 2003, Richard J. Wagner
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. The names of its contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The original code included the following notice:
-
- When you use this, send an email to: matumoto@math.keio.ac.jp
- with an appropriate reference to your work.
-
-It would be nice to CC: rjwagner@writeme.com and Cokus@math.washington.edu
-when you write.
-
-------------------------------------------------------------------
-This software ships expat, a small XML parser library written in C
-(http://expat.sourceforge.net/).
-
-Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
- and Clark Cooper
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-~
-
-------------------------------------------------------------------
-This software uses simpleopt for command line parsing. Simpleopt is
-published under the following license:
-
-The licence text below is the boilerplate "MIT Licence" used from:
-http://www.opensource.org/licenses/mit-license.php
-
-Copyright (c) 2006-2007, Brodie Thiesfield
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-------------------------------------------------------------------
-We use a modified version of UseDoxygen by Tobias Rautenkranz
-(http://tobias.rautenkranz.ch/cmake/doxygen/) to generate doxygen
-documentation with cmake. UseDoxygen.cmake is published with the
-following copyright statement:
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index fd360ac2e2d5678a942592790cc50878a9715d81..0000000000000000000000000000000000000000
--- a/ChangeLog
+++ /dev/null
@@ -1,324 +0,0 @@
-This is a summary of the most relevant changes. For a complete list of
-changes see https://forge.physik.rwth-aachen.de/projects/pxl
-
-
-pxl 3.5.4, important changes since 3.5.3
-------------------------------------------------------------------
-
- * Allow multiple paths in PXL_PLUGIN_PATH
- * Add getDescription to modules
- * Fix some Variant operators
- * Allow Variant vectors in user records
- * Introduce USE_PYTHON option
- * Fix LorentzVector operators
-
-
-pxl 3.5.3, important changes since 3.5.2
-------------------------------------------------------------------
-
- * fix SWIG comments
- * Implement python context management for OutputFile, InputFile
- * Make ObjectOwner, ObjectManager, Event and BasicContainer, InputFile iterable in pypxl.
- * Add writeEvery option for OutputModule.
-
-pxl 3.5.2, important changes since 3.5.1
-------------------------------------------------------------------
-
- * add stdin/stdout File IO via schema std:
- * Add getName method to MessageDispatcher.
- * safe integer casts in Variant
- * fix c11 and swig bugs
- * Add SubscriberModule that implements MessageHandler and adds some convenience.
-
-pxl 3.5.1, important changes since 3.5.0
-------------------------------------------------------------------
-
- * fix Module::getVersion: add missing virtual
-
-pxl 3.5.0, important changes since 3.4.0
-------------------------------------------------------------------
-
- * fix Variant toFloat/toDouble for boolean
- * Allow numpy arrays as alien arrays in BasicNVector
- * Add rapidity functions to LorentzVector, extend test_core.cc.
- * use class parameter in PyModule to find class
- * upgrades gtest to latest version 1.7.0 to be compatible with OS X 10.9
- * modifies Python.cmake to make it compatible with OS X 10.9
- * Improve error message on wrong python version
- * Remove obsolete usage of pkgconfig in FindPXL
- * Added option for select module isntall path in FindPXL
- * UserRecord now throws runtime_error if non-exisitng entry is erased. This is now consistent with other methods. Closes: #1240
- * Add support for multiple numpy floats. Closes: #1219
- * make all modules available in python
- * add onPublish callback to pymodule
- * fix CMAKE python lib finding
- * add publish/subscribe to analysis
-
-
-pxl 3.4.0, important changes since 3.3.3
-------------------------------------------------------------------
-
- * Install pkg-config files again, Closes: #1007
- * check for pkgconfig files, fixes #913
- * Improved debug output
- * Check for non string returns in PyModuleModule. Closes: #732.
- * Throw exception in InputFile if open non existing file. Closes: #852
- * Added cmake option to disbale build of python docstrings
- * clears existing value vector before adding new values when setting module option of type vector of strings (fixes vispa ticket #943)
- * Added test for correct removal on connections in analysis if module is removed.
- * Remove status messages on reload of script in PyModule
- * Return ./ as parent directory instead of empty string, Closes: #892
- * Make SoftRelations between two objects of same name unique, Closes: #902
- * Fix treatment of start and end index in output file; closes #398 and #848
- * fixes #893, allow empty source names in PyModules
- * Fix Script::objectToString for python <2.7
- * fix Doxygen generation for Variant
- * add mission to, fix #889
- * fixes #810 (adds convenience methods for Relative: getDaughter() and getMothers()
- * Fix auto decay reconstruction
- * Not interpreting PyObject as unicode in Script::objectToString, Closes: #875, #872
- * CMake throws fatal error if pytohn not found, Closes: #858
- * Added Fisher distribution of vectors on sphere to random
- * Return tuple in pythonwrapping of HealpixMap::getPixelsInCone,Closes: #729
- * Added missing clone method to healpixmap, Closes: #744
- * randNorm default: variance = 1 instead of 0 (standard normal distribution)
- * added index=-1 to randPowerLaw and randBrokenPowerLaw
- * Fixed FTBFS if missing dcap due to double .cc in CmakeLists
- * refactor variant, improve usage
- * fix windows build
- * add sftp file
- * introduce abstract file class
- * improve Stream, add Stream tests
- * fix -builtin use on older SWIG versions
- * make swig interfaces backward compatible (1.3.29)
- * refactor i/o stream
-
-pxl 3.3.3, important changes since 3.3.2
-------------------------------------------------------------------
-
- * fix dcache file implementation
-
-pxl 3.3.2, important changes since 3.3.1
-------------------------------------------------------------------
-
- * fix installation of pxl-doxy.i
-
-pxl 3.3.1, important changes since 3.3.0
-------------------------------------------------------------------
-
- * fix swig 2.0.9 bug
- * fix swig interfaces for all versions
- * update bundled expat version to 2.1.0
- * update bundled zlib version to 1.2.8
- * fix pxlrc crash on windows
-
-pxl 3.3.0, important changes since 3.2.0
-------------------------------------------------------------------
-
- * Added numpy array interface to BasicNVector and BasicMatrix.
- * Added USAGE_TEXT_SELECTION to modules, Closes: #405
- * Add setVector and addVector methods to particle to increase consistency with getVector
- * Do not execute beginJob, endJob, beginRun, endRun on disabled modules. Closes: #1079
- * Fixed Native_toVariant conversion for type(value)==long, Closes: #1026
- * Remove non-existing object from BasicContainer throws exception. Closes: #856
- * Added function to expand enviroment variables
- * Use expansion of enviroment variables in analyis find file and outpmodule. Closes: #1041.
- * Remove empty strings from python search path to avoid security issue
- * Add path of python module to local python search path. Closes: #1037
- * moved skeletons from Vispa to pxl, Closes: #1097
- * Write analysis to tmpfile first and copy on close to avoid corrupted xml files. Closes: #1070
- * Allow python list of variant-able data types in userrecord. Closes #1089
- * Added missing DLL_EXPORT. Should fix windows builds
- * Do not require pkgcfg
- * Print error summary on finish of pxlrun
- * Colored ConsoleHandler
- * Add getDataPath option to pxlrun
- * Use pxlrun instread of pkg-config to provide info on user plugin dir
- * Added conveniance macro to insll pxl modules to FindPXL
- * Add more informations about the pxl installation to pxlrun, and use this in FindPXL
- * Add RootSerializable
- * Add Zmumu example with efficiency correction using a RootSerializable
- * Added missing functionality python interface of SoftRelations
- * Added method to remove objects of type from BasicContainer, Closes: #1153
- * Improved error message on missing python modules. Closes #1150
- * Understand numpy datatypes in userRecord, Closes: #1126
- * Add option to add additional directories to search path in pxlrun, Closes: #1168
- * Added pxlconfiguration file, Closes: #1169
- * add system wide pxlrc, PXL_SYSTEM_RC compiler flag
- * use console colors only when tty is present -> no colors in files.
- * Removed check on compression mode in ChunkWriter
- * move autodecayreconstructor from pxl into own package (fixes #1248)
- * remove neutrino pz solutions and move them to auto decay reconstruction module
- * Added example for user defined types
- * Add reference-based deltaX methods to LorentzVector and Basic3Vector, which should significantly simplify C++ code and avoid statemens such as fv1.deltaR(&fv2)
- * Reset number of objects after file section has been written
- * Allow compression level of zero
- * Install swig .i files needed for user defined data types, like root serializable
- * Fixed healpix order 0, Closes: #1280
- * make loadDefaultPlugins available from within python, Closes: #1250
-
-
-pxl 3.2.0, important changes since 3.1.0
-------------------------------------------------------------------
-
- * Install pkg-config files again, Closes: #1007
- * check for pkgconfig files, fixes #913
- * Improved debug output
- * Check for non string returns in PyModuleModule. Closes: #732.
- * Throw exception in InputFile if open non existing file. Closes: #852
- * Added cmake option to disbale build of python docstrings
- * clears existing value vector before adding new values when setting module option of type vector of strings (fixes vispa ticket #943)
- * Added test for correct removal on connections in analysis if module is removed.
- * Remove status messages on reload of script in PyModule
- * Return ./ as parent directory instead of empty string, Closes: #892
- * Make SoftRelations between two objects of same name unique, Closes: #902
- * Fix treatment of start and end index in output file; closes #398 and #848
- * fixes #893, allow empty source names in PyModules
- * Fix Script::objectToString for python <2.7
- * fix Doxygen generation for Variant
- * add mission to, fix #889
- * fixes #810 (adds convenience methods for Relative: getDaughter() and getMothers()
- * Fix auto decay reconstruction
- * Not interpreting PyObject as unicode in Script::objectToString, Closes: #875, #872
- * CMake throws fatal error if pytohn not found, Closes: #858
- * Added Fisher distribution of vectors on sphere to random
- * Return tuple in pythonwrapping of HealpixMap::getPixelsInCone,Closes: #729
- * Added missing clone method to healpixmap, Closes: #744
- * randNorm default: variance = 1 instead of 0 (standard normal distribution)
- * added index=-1 to randPowerLaw and randBrokenPowerLaw
- * Fixed FTBFS if missing dcap due to double .cc in CmakeLists
- * refactor variant, improve usage
- * fix windows build
- * add sftp file
- * introduce abstract file class
- * improve Stream, add Stream tests
- * fix -builtin use on older SWIG versions
- * make swig interfaces backward compatible (1.3.29)
- * refactor i/o stream
-
-pxl 3.1.0, important changes since 3.0.3
-------------------------------------------------------------------
-
- * Throw exception when write operation fails (Closes: #694)
- * fix order of input files #718
- * bring variant into defined state
- * use Variant inside Module for Options.
- * Fixed angle calculation in Basic3Vector for cases of parallel and antiparallel vectors
- * Astro: Normalize vector in set setGalacticDirectionVector, Closes: #666
- * Increased safety in usage of alien arrays in BasicNVector, Closes: #651
- * Make BasicContainer python iterable, Closes: #714
- * Return const ref instead of const pointer to modules and connection lists in analysis
- * Fix pypxl on swig2.0
- * fixed default build type to Release
- * fixed cmake python search on mingw
- * Fixed setting of string vector analysis, Closes: #655
- * fix memory leak in scripting loader
- * Fixed memory leak in BasicNVector
- * Fixed potential memory leak in analysis
-
-pxl 3.0.3, important changes since 3.0
-------------------------------------------------------------------
-
- * Fixed potential memory leak in BasicNVector and BasicMatrix
- * fixed OutputModule
- * Removed potential error hiding NULL pointer check in AstroObject
- * Fixed memory leak in input module and added warning for empty filenames
- * Fixed angular distance floating point precision for rare circumstances
- * Possible fix for angular distance floating point precision on mac
- * Fixed angular distance calculation on mac
- * added BasicNVector.norm(L)
- * add check if option is available when getting option values
- * Fixed pypxl on SL5
- * Potential fix for workaround swig::stop_iteration, restores python default dlopen behaviour
- * Don't allow PyModules without python code
- * Improved python bindings of healpixmap, python style getNeighbors
- * Fixed python bindings of HealpixMap::getNumberOfPixels
- * uniformDistributionINHealpix
- * Improved seperation of healpix due to license issues, added option USE_HEALPIX
- * improved unzip performance
- * AstroBasicObject has default direction
- * REmoved buggy random direction in pixel from healpixmap:
- * Updated Variant. Can store a vector of variants now
- * Fixed __getitem__, __setitem__ in python wrap of BasicMatrix
- * Improved python interface BasicMatrix, gives correct shape and len
- * Module::setOption throws exception if option not added first. Closes #401
- * Added XYZ setters for SGC and Equatorial Coordinates
- * Added norm to Basic3Vector, Closes: #678
- * Added getAngleTo to Basic3Vector
- * Added rotate to Basic3Vector
-
-pxl 3.0.0, 21.06.10
-------------------------------------------------------------------
- * API Changes:
- The complete Api has been reviewed and adjusted. For a complete list
- of changes see the changelog http://pxl.hg.sourceforge.net/hgweb/pxl/pxl/log,
- or the doxygen documentation
-
- core/ base&io:
- * base and io have been merged into core
- BasicContainer
- * Added typedef std::map ContainerIndex
- * Changed return type inline const map_t& getIndexEntry() const -> inline const ContainerIndex& getIndex() const
- Event
- * Renamed setObject -> insertObject
- Filter
- * Renamed Comparator -> ComparatorInterface
- * Renamed FilterCriterion - > FilterCriterionInterface
- LorentzVector
- * Removed inline void setMass(double m)
- Object
- * Renamed inline bool getLocked() -> inline bool isLocked() const
- * Renamed inline int getWorkflag() -> inline int getWorkFlag()
- * Renamed inline void setWorkflag(int v) -> inline void setWorkFlag(int v)
- UserRecord
- * Renamed UserRecord -> UserRecords
-
- astro:
- AstroBasicObject
- * Removed of setZenith and setAzimuth method
- * Renamed setLongitudeLatitude -> setGalacticLongitudeLatitude
-
- hep:
- Collision:
- * Removed typedef weak_ptr CollisionWkPtr
- Particle:
- * Renamed getParticleId() -> getPdgNumber()
- * Renamed setParticleId() -> setPdgNumber()
- * Renamed setVector() -> getVector()
- AnalysisFork:
- * Changed parameters: virtual void beginJob(const ObjectOwner* input = 0) -> virtual void beginJob(const Serializable* input = 0)
- * Changed parameters: virtual void beginRun(const ObjectOwner* input = 0) -> virtual void beginRun(const Serializable* input = 0)
- * Changed parameters: virtual void endJob(const ObjectOwner* input = 0) -> virtual void endJob(const Serializable* input = 0)
- * Changed parameters: virtual void endRun(const ObjectOwner* input = 0) -> virtual void endRun(const Serializable* input = 0)
- * Changed parameters: virtual void finishEvent(const ObjectOwner* input = 0) -> virtual void finishEvent(const Event* event = 0)
- * Changed parameters: virtual void analyseEvent(const ObjectOwner*
- * input = 0) -> virtual void analyseEvent(const Event* event = 0)
-
- * Starting with pxl 3.0.0 the buildsystem is cmake
-
- * Mechanism to include user classes in pxlrun, Closes: #152
- * Introduction of logging system, Closes: #105
- * python scripts are now classes, Closes: #137, #138
- * pxlrun can execute multiple analysis, one after the other, Closes: #210
- * pypxl returns objects of correct type, Closes: #195, #184, #185
- * Method to store meta information in analysis xml file, Closes: #207
- * Support for astronomical coordinate systems, Closes: #202, #203, #204
- * Random generator is now availeable from python, Closes: #181
- * Fixed operator overloading in python, Closes: #160, #100
- * Userrecord can carry serializables, Closes:
- * Introduced Analysis Class, Closes: #148
- * Make InputFile.close() save if not InputFile.good(), Closes: #132
- * In layout of orphans, increase distance to borders, Closes: #113
- * Introduced N Dimensional Vector and Matrix, Closes: #101, #102
- * Make ad-hoc AutoLayout work for several large decay trees, Closes: #98
- * Create and submit ILC filler, Closes: #18
- * design meta info for scriptfilter modules, Closes: #31
- * pxlrun can change module parameters via cmdline, Closes: #146
- * Remove layout from particle, Closes: #175
- * Document Id, InformationChunk, Layout, Relations, Closes: #176
- * Version information in pxl.hh, Closes: #144
-
-
-
-
-
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000000000000000000000000000000000000..85c7c6967647e2e085d7fb803c38695d049bc3e2
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,636 @@
+# GNU GENERAL PUBLIC LICENSE
+Version 3, 29 June 2007
+
+Copyright (C) 2007 [Free Software Foundation, Inc.](http://fsf.org/)
+
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+## Preamble
+
+The GNU General Public License is a free, copyleft license for software and
+other kinds of works.
+
+The licenses for most software and other practical works are designed to take
+away your freedom to share and change the works. By contrast, the GNU General
+Public License is intended to guarantee your freedom to share and change all
+versions of a program--to make sure it remains free software for all its users.
+We, the Free Software Foundation, use the GNU General Public License for most
+of our software; it applies also to any other work released this way by its
+authors. You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for them if you wish), that you
+receive source code or can get it if you want it, that you can change the
+software or use pieces of it in new free programs, and that you know you can do
+these things.
+
+To protect your rights, we need to prevent others from denying you these rights
+or asking you to surrender the rights. Therefore, you have certain
+responsibilities if you distribute copies of the software, or if you modify it:
+responsibilities to respect the freedom of others.
+
+For example, if you distribute copies of such a program, whether gratis or for
+a fee, you must pass on to the recipients the same freedoms that you received.
+You must make sure that they, too, receive or can get the source code. And you
+must show them these terms so they know their rights.
+
+Developers that use the GNU GPL protect your rights with two steps:
+
+ 1. assert copyright on the software, and
+ 2. offer you this License giving you legal permission to copy, distribute
+ and/or modify it.
+
+For the developers' and authors' protection, the GPL clearly explains that
+there is no warranty for this free software. For both users' and authors' sake,
+the GPL requires that modified versions be marked as changed, so that their
+problems will not be attributed erroneously to authors of previous versions.
+
+Some devices are designed to deny users access to install or run modified
+versions of the software inside them, although the manufacturer can do so. This
+is fundamentally incompatible with the aim of protecting users' freedom to
+change the software. The systematic pattern of such abuse occurs in the area of
+products for individuals to use, which is precisely where it is most
+unacceptable. Therefore, we have designed this version of the GPL to prohibit
+the practice for those products. If such problems arise substantially in other
+domains, we stand ready to extend this provision to those domains in future
+versions of the GPL, as needed to protect the freedom of users.
+
+Finally, every program is threatened constantly by software patents. States
+should not allow patents to restrict development and use of software on
+general-purpose computers, but in those that do, we wish to avoid the special
+danger that patents applied to a free program could make it effectively
+proprietary. To prevent this, the GPL assures that patents cannot be used to
+render the program non-free.
+
+The precise terms and conditions for copying, distribution and modification
+follow.
+
+## TERMS AND CONDITIONS
+
+### 0. Definitions.
+
+*This License* refers to version 3 of the GNU General Public License.
+
+*Copyright* also means copyright-like laws that apply to other kinds of works,
+such as semiconductor masks.
+
+*The Program* refers to any copyrightable work licensed under this License.
+Each licensee is addressed as *you*. *Licensees* and *recipients* may be
+individuals or organizations.
+
+To *modify* a work means to copy from or adapt all or part of the work in a
+fashion requiring copyright permission, other than the making of an exact copy.
+The resulting work is called a *modified version* of the earlier work or a work
+*based on* the earlier work.
+
+A *covered work* means either the unmodified Program or a work based on the
+Program.
+
+To *propagate* a work means to do anything with it that, without permission,
+would make you directly or secondarily liable for infringement under applicable
+copyright law, except executing it on a computer or modifying a private copy.
+Propagation includes copying, distribution (with or without modification),
+making available to the public, and in some countries other activities as well.
+
+To *convey* a work means any kind of propagation that enables other parties to
+make or receive copies. Mere interaction with a user through a computer
+network, with no transfer of a copy, is not conveying.
+
+An interactive user interface displays *Appropriate Legal Notices* to the
+extent that it includes a convenient and prominently visible feature that
+
+ 1. displays an appropriate copyright notice, and
+ 2. tells the user that there is no warranty for the work (except to the
+ extent that warranties are provided), that licensees may convey the work
+ under this License, and how to view a copy of this License.
+
+If the interface presents a list of user commands or options, such as a menu, a
+prominent item in the list meets this criterion.
+
+### 1. Source Code.
+
+The *source code* for a work means the preferred form of the work for making
+modifications to it. *Object code* means any non-source form of a work.
+
+A *Standard Interface* means an interface that either is an official standard
+defined by a recognized standards body, or, in the case of interfaces specified
+for a particular programming language, one that is widely used among developers
+working in that language.
+
+The *System Libraries* of an executable work include anything, other than the
+work as a whole, that (a) is included in the normal form of packaging a Major
+Component, but which is not part of that Major Component, and (b) serves only
+to enable use of the work with that Major Component, or to implement a Standard
+Interface for which an implementation is available to the public in source code
+form. A *Major Component*, in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system (if any) on
+which the executable work runs, or a compiler used to produce the work, or an
+object code interpreter used to run it.
+
+The *Corresponding Source* for a work in object code form means all the source
+code needed to generate, install, and (for an executable work) run the object
+code and to modify the work, including scripts to control those activities.
+However, it does not include the work's System Libraries, or general-purpose
+tools or generally available free programs which are used unmodified in
+performing those activities but which are not part of the work. For example,
+Corresponding Source includes interface definition files associated with source
+files for the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require, such as
+by intimate data communication or control flow between those subprograms and
+other parts of the work.
+
+The Corresponding Source need not include anything that users can regenerate
+automatically from other parts of the Corresponding Source.
+
+The Corresponding Source for a work in source code form is that same work.
+
+### 2. Basic Permissions.
+
+All rights granted under this License are granted for the term of copyright on
+the Program, and are irrevocable provided the stated conditions are met. This
+License explicitly affirms your unlimited permission to run the unmodified
+Program. The output from running a covered work is covered by this License only
+if the output, given its content, constitutes a covered work. This License
+acknowledges your rights of fair use or other equivalent, as provided by
+copyright law.
+
+You may make, run and propagate covered works that you do not convey, without
+conditions so long as your license otherwise remains in force. You may convey
+covered works to others for the sole purpose of having them make modifications
+exclusively for you, or provide you with facilities for running those works,
+provided that you comply with the terms of this License in conveying all
+material for which you do not control copyright. Those thus making or running
+the covered works for you must do so exclusively on your behalf, under your
+direction and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+Conveying under any other circumstances is permitted solely under the
+conditions stated below. Sublicensing is not allowed; section 10 makes it
+unnecessary.
+
+### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+No covered work shall be deemed part of an effective technological measure
+under any applicable law fulfilling obligations under article 11 of the WIPO
+copyright treaty adopted on 20 December 1996, or similar laws prohibiting or
+restricting circumvention of such measures.
+
+When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention is
+effected by exercising rights under this License with respect to the covered
+work, and you disclaim any intention to limit operation or modification of the
+work as a means of enforcing, against the work's users, your or third parties'
+legal rights to forbid circumvention of technological measures.
+
+### 4. Conveying Verbatim Copies.
+
+You may convey verbatim copies of the Program's source code as you receive it,
+in any medium, provided that you conspicuously and appropriately publish on
+each copy an appropriate copyright notice; keep intact all notices stating that
+this License and any non-permissive terms added in accord with section 7 apply
+to the code; keep intact all notices of the absence of any warranty; and give
+all recipients a copy of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey, and you may
+offer support or warranty protection for a fee.
+
+### 5. Conveying Modified Source Versions.
+
+You may convey a work based on the Program, or the modifications to produce it
+from the Program, in the form of source code under the terms of section 4,
+provided that you also meet all of these conditions:
+
+ - a) The work must carry prominent notices stating that you modified it, and
+ giving a relevant date.
+ - b) The work must carry prominent notices stating that it is released under
+ this License and any conditions added under section 7. This requirement
+ modifies the requirement in section 4 to *keep intact all notices*.
+ - c) You must license the entire work, as a whole, under this License to
+ anyone who comes into possession of a copy. This License will therefore
+ apply, along with any applicable section 7 additional terms, to the whole
+ of the work, and all its parts, regardless of how they are packaged. This
+ License gives no permission to license the work in any other way, but it
+ does not invalidate such permission if you have separately received it.
+ - d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your work need
+ not make them do so.
+
+A compilation of a covered work with other separate and independent works,
+which are not by their nature extensions of the covered work, and which are not
+combined with it such as to form a larger program, in or on a volume of a
+storage or distribution medium, is called an *aggregate* if the compilation and
+its resulting copyright are not used to limit the access or legal rights of the
+compilation's users beyond what the individual works permit. Inclusion of a
+covered work in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+### 6. Conveying Non-Source Forms.
+
+You may convey a covered work in object code form under the terms of sections 4
+and 5, provided that you also convey the machine-readable Corresponding Source
+under the terms of this License, in one of these ways:
+
+ - a) Convey the object code in, or embodied in, a physical product (including
+ a physical distribution medium), accompanied by the Corresponding Source
+ fixed on a durable physical medium customarily used for software
+ interchange.
+ - b) Convey the object code in, or embodied in, a physical product (including
+ a physical distribution medium), accompanied by a written offer, valid for
+ at least three years and valid for as long as you offer spare parts or
+ customer support for that product model, to give anyone who possesses the
+ object code either
+ 1. a copy of the Corresponding Source for all the software in the product
+ that is covered by this License, on a durable physical medium
+ customarily used for software interchange, for a price no more than your
+ reasonable cost of physically performing this conveying of source, or
+ 2. access to copy the Corresponding Source from a network server at no
+ charge.
+ - c) Convey individual copies of the object code with a copy of the written
+ offer to provide the Corresponding Source. This alternative is allowed only
+ occasionally and noncommercially, and only if you received the object code
+ with such an offer, in accord with subsection 6b.
+ - d) Convey the object code by offering access from a designated place
+ (gratis or for a charge), and offer equivalent access to the Corresponding
+ Source in the same way through the same place at no further charge. You
+ need not require recipients to copy the Corresponding Source along with the
+ object code. If the place to copy the object code is a network server, the
+ Corresponding Source may be on a different server operated by you or a
+ third party) that supports equivalent copying facilities, provided you
+ maintain clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the Corresponding
+ Source, you remain obligated to ensure that it is available for as long as
+ needed to satisfy these requirements.
+ - e) Convey the object code using peer-to-peer transmission, provided you
+ inform other peers where the object code and Corresponding Source of the
+ work are being offered to the general public at no charge under subsection
+ 6d.
+
+A separable portion of the object code, whose source code is excluded from the
+Corresponding Source as a System Library, need not be included in conveying the
+object code work.
+
+A *User Product* is either
+
+ 1. a *consumer product*, which means any tangible personal property which is
+ normally used for personal, family, or household purposes, or
+ 2. anything designed or sold for incorporation into a dwelling.
+
+In determining whether a product is a consumer product, doubtful cases shall be
+resolved in favor of coverage. For a particular product received by a
+particular user, *normally used* refers to a typical or common use of that
+class of product, regardless of the status of the particular user or of the way
+in which the particular user actually uses, or expects or is expected to use,
+the product. A product is a consumer product regardless of whether the product
+has substantial commercial, industrial or non-consumer uses, unless such uses
+represent the only significant mode of use of the product.
+
+*Installation Information* for a User Product means any methods, procedures,
+authorization keys, or other information required to install and execute
+modified versions of a covered work in that User Product from a modified
+version of its Corresponding Source. The information must suffice to ensure
+that the continued functioning of the modified object code is in no case
+prevented or interfered with solely because modification has been made.
+
+If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as part of a
+transaction in which the right of possession and use of the User Product is
+transferred to the recipient in perpetuity or for a fixed term (regardless of
+how the transaction is characterized), the Corresponding Source conveyed under
+this section must be accompanied by the Installation Information. But this
+requirement does not apply if neither you nor any third party retains the
+ability to install modified object code on the User Product (for example, the
+work has been installed in ROM).
+
+The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates for a
+work that has been modified or installed by the recipient, or for the User
+Product in which it has been modified or installed. Access to a network may be
+denied when the modification itself materially and adversely affects the
+operation of the network or violates the rules and protocols for communication
+across the network.
+
+Corresponding Source conveyed, and Installation Information provided, in accord
+with this section must be in a format that is publicly documented (and with an
+implementation available to the public in source code form), and must require
+no special password or key for unpacking, reading or copying.
+
+### 7. Additional Terms.
+
+*Additional permissions* are terms that supplement the terms of this License by
+making exceptions from one or more of its conditions. Additional permissions
+that are applicable to the entire Program shall be treated as though they were
+included in this License, to the extent that they are valid under applicable
+law. If additional permissions apply only to part of the Program, that part may
+be used separately under those permissions, but the entire Program remains
+governed by this License without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option remove any
+additional permissions from that copy, or from any part of it. (Additional
+permissions may be written to require their own removal in certain cases when
+you modify the work.) You may place additional permissions on material, added
+by you to a covered work, for which you have or can give appropriate copyright
+permission.
+
+Notwithstanding any other provision of this License, for material you add to a
+covered work, you may (if authorized by the copyright holders of that material)
+supplement the terms of this License with terms:
+
+ - a) Disclaiming warranty or limiting liability differently from the terms of
+ sections 15 and 16 of this License; or
+ - b) Requiring preservation of specified reasonable legal notices or author
+ attributions in that material or in the Appropriate Legal Notices displayed
+ by works containing it; or
+ - c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in reasonable
+ ways as different from the original version; or
+ - d) Limiting the use for publicity purposes of names of licensors or authors
+ of the material; or
+ - e) Declining to grant rights under trademark law for use of some trade
+ names, trademarks, or service marks; or
+ - f) Requiring indemnification of licensors and authors of that material by
+ anyone who conveys the material (or modified versions of it) with
+ contractual assumptions of liability to the recipient, for any liability
+ that these contractual assumptions directly impose on those licensors and
+ authors.
+
+All other non-permissive additional terms are considered *further restrictions*
+within the meaning of section 10. If the Program as you received it, or any
+part of it, contains a notice stating that it is governed by this License along
+with a term that is a further restriction, you may remove that term. If a
+license document contains a further restriction but permits relicensing or
+conveying under this License, you may add to a covered work material governed
+by the terms of that license document, provided that the further restriction
+does not survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you must place,
+in the relevant source files, a statement of the additional terms that apply to
+those files, or a notice indicating where to find the applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the form of a
+separately written license, or stated as exceptions; the above requirements
+apply either way.
+
+### 8. Termination.
+
+You may not propagate or modify a covered work except as expressly provided
+under this License. Any attempt otherwise to propagate or modify it is void,
+and will automatically terminate your rights under this License (including any
+patent licenses granted under the third paragraph of section 11).
+
+However, if you cease all violation of this License, then your license from a
+particular copyright holder is reinstated
+
+ - a) provisionally, unless and until the copyright holder explicitly and
+ finally terminates your license, and
+ - b) permanently, if the copyright holder fails to notify you of the
+ violation by some reasonable means prior to 60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is reinstated
+permanently if the copyright holder notifies you of the violation by some
+reasonable means, this is the first time you have received notice of violation
+of this License (for any work) from that copyright holder, and you cure the
+violation prior to 30 days after your receipt of the notice.
+
+Termination of your rights under this section does not terminate the licenses
+of parties who have received copies or rights from you under this License. If
+your rights have been terminated and not permanently reinstated, you do not
+qualify to receive new licenses for the same material under section 10.
+
+### 9. Acceptance Not Required for Having Copies.
+
+You are not required to accept this License in order to receive or run a copy
+of the Program. Ancillary propagation of a covered work occurring solely as a
+consequence of using peer-to-peer transmission to receive a copy likewise does
+not require acceptance. However, nothing other than this License grants you
+permission to propagate or modify any covered work. These actions infringe
+copyright if you do not accept this License. Therefore, by modifying or
+propagating a covered work, you indicate your acceptance of this License to do
+so.
+
+### 10. Automatic Licensing of Downstream Recipients.
+
+Each time you convey a covered work, the recipient automatically receives a
+license from the original licensors, to run, modify and propagate that work,
+subject to this License. You are not responsible for enforcing compliance by
+third parties with this License.
+
+An *entity transaction* is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered work
+results from an entity transaction, each party to that transaction who receives
+a copy of the work also receives whatever licenses to the work the party's
+predecessor in interest had or could give under the previous paragraph, plus a
+right to possession of the Corresponding Source of the work from the
+predecessor in interest, if the predecessor has it or can get it with
+reasonable efforts.
+
+You may not impose any further restrictions on the exercise of the rights
+granted or affirmed under this License. For example, you may not impose a
+license fee, royalty, or other charge for exercise of rights granted under this
+License, and you may not initiate litigation (including a cross-claim or
+counterclaim in a lawsuit) alleging that any patent claim is infringed by
+making, using, selling, offering for sale, or importing the Program or any
+portion of it.
+
+### 11. Patents.
+
+A *contributor* is a copyright holder who authorizes use under this License of
+the Program or a work on which the Program is based. The work thus licensed is
+called the contributor's *contributor version*.
+
+A contributor's *essential patent claims* are all patent claims owned or
+controlled by the contributor, whether already acquired or hereafter acquired,
+that would be infringed by some manner, permitted by this License, of making,
+using, or selling its contributor version, but do not include claims that would
+be infringed only as a consequence of further modification of the contributor
+version. For purposes of this definition, *control* includes the right to grant
+patent sublicenses in a manner consistent with the requirements of this
+License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free patent
+license under the contributor's essential patent claims, to make, use, sell,
+offer for sale, import and otherwise run, modify and propagate the contents of
+its contributor version.
+
+In the following three paragraphs, a *patent license* is any express agreement
+or commitment, however denominated, not to enforce a patent (such as an express
+permission to practice a patent or covenant not to sue for patent
+infringement). To *grant* such a patent license to a party means to make such
+an agreement or commitment not to enforce a patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license, and the
+Corresponding Source of the work is not available for anyone to copy, free of
+charge and under the terms of this License, through a publicly available
+network server or other readily accessible means, then you must either
+
+ 1. cause the Corresponding Source to be so available, or
+ 2. arrange to deprive yourself of the benefit of the patent license for this
+ particular work, or
+ 3. arrange, in a manner consistent with the requirements of this License, to
+ extend the patent license to downstream recipients.
+
+*Knowingly relying* means you have actual knowledge that, but for the patent
+license, your conveying the covered work in a country, or your recipient's use
+of the covered work in a country, would infringe one or more identifiable
+patents in that country that you have reason to believe are valid.
+
+If, pursuant to or in connection with a single transaction or arrangement, you
+convey, or propagate by procuring conveyance of, a covered work, and grant a
+patent license to some of the parties receiving the covered work authorizing
+them to use, propagate, modify or convey a specific copy of the covered work,
+then the patent license you grant is automatically extended to all recipients
+of the covered work and works based on it.
+
+A patent license is *discriminatory* if it does not include within the scope of
+its coverage, prohibits the exercise of, or is conditioned on the non-exercise
+of one or more of the rights that are specifically granted under this License.
+You may not convey a covered work if you are a party to an arrangement with a
+third party that is in the business of distributing software, under which you
+make payment to the third party based on the extent of your activity of
+conveying the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory patent
+license
+
+ - a) in connection with copies of the covered work conveyed by you (or copies
+ made from those copies), or
+ - b) primarily for and in connection with specific products or compilations
+ that contain the covered work, unless you entered into that arrangement, or
+ that patent license was granted, prior to 28 March 2007.
+
+Nothing in this License shall be construed as excluding or limiting any implied
+license or other defenses to infringement that may otherwise be available to
+you under applicable patent law.
+
+### 12. No Surrender of Others' Freedom.
+
+If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not excuse
+you from the conditions of this License. If you cannot convey a covered work so
+as to satisfy simultaneously your obligations under this License and any other
+pertinent obligations, then as a consequence you may not convey it at all. For
+example, if you agree to terms that obligate you to collect a royalty for
+further conveying from those to whom you convey the Program, the only way you
+could satisfy both those terms and this License would be to refrain entirely
+from conveying the Program.
+
+### 13. Use with the GNU Affero General Public License.
+
+Notwithstanding any other provision of this License, you have permission to
+link or combine any covered work with a work licensed under version 3 of the
+GNU Affero General Public License into a single combined work, and to convey
+the resulting work. The terms of this License will continue to apply to the
+part which is the covered work, but the special requirements of the GNU Affero
+General Public License, section 13, concerning interaction through a network
+will apply to the combination as such.
+
+### 14. Revised Versions of this License.
+
+The Free Software Foundation may publish revised and/or new versions of the GNU
+General Public License from time to time. Such new versions will be similar in
+spirit to the present version, but may differ in detail to address new problems
+or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies
+that a certain numbered version of the GNU General Public License *or any later
+version* applies to it, you have the option of following the terms and
+conditions either of that numbered version or of any later version published by
+the Free Software Foundation. If the Program does not specify a version number
+of the GNU General Public License, you may choose any version ever published by
+the Free Software Foundation.
+
+If the Program specifies that a proxy can decide which future versions of the
+GNU General Public License can be used, that proxy's public statement of
+acceptance of a version permanently authorizes you to choose that version for
+the Program.
+
+Later license versions may give you additional or different permissions.
+However, no additional obligations are imposed on any author or copyright
+holder as a result of your choosing to follow a later version.
+
+### 15. Disclaimer of Warranty.
+
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
+LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
+PARTIES PROVIDE THE PROGRAM *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
+QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
+DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
+CORRECTION.
+
+### 16. Limitation of Liability.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
+COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
+PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
+INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
+PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY
+HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+### 17. Interpretation of Sections 15 and 16.
+
+If the disclaimer of warranty and limitation of liability provided above cannot
+be given local legal effect according to their terms, reviewing courts shall
+apply local law that most closely approximates an absolute waiver of all civil
+liability in connection with the Program, unless a warranty or assumption of
+liability accompanies a copy of the Program in return for a fee.
+
+## END OF TERMS AND CONDITIONS ###
+
+### How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible
+use to the public, the best way to achieve this is to make it free software
+which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach
+them to the start of each source file to most effectively state the exclusion
+of warranty; and each file should have at least the *copyright* line and a
+pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program does terminal interaction, make it output a short notice like
+this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w` and `show c` should show the appropriate
+parts of the General Public License. Of course, your program's commands might
+be different; for a GUI interface, you would use an *about box*.
+
+You should also get your employer (if you work as a programmer) or school, if
+any, to sign a *copyright disclaimer* for the program, if necessary. For more
+information on this, and how to apply and follow the GNU GPL, see
+[http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
+
+The GNU General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may consider
+it more useful to permit linking proprietary applications with the library. If
+this is what you want to do, use the GNU Lesser General Public License instead
+of this License. But first, please read
+[http://www.gnu.org/philosophy/why-not-lgpl.html](http://www.gnu.org/philosophy/why-not-lgpl.html).
diff --git a/PXLConfig.cmake.in b/PXLConfig.cmake.in
deleted file mode 100644
index fc48f7c4a934d1e1e4c3499fef77f0967d5e16ac..0000000000000000000000000000000000000000
--- a/PXLConfig.cmake.in
+++ /dev/null
@@ -1,60 +0,0 @@
-# - Config file for the pxl package
-# It defines the following variables
-# PXL_INCLUDE_DIRS - include directories for pxl
-# PXL_LIBRARIES - libraries to link against
-# PXL_EXECUTABLE - the bar executable
-
-SET(PXL_LIBRARY_PATH "@CMAKE_INSTALL_PREFIX@/lib")
-SET(PXL_LIBRARIES "pxl-core")
-SET(PXL_INCLUDE_DIRS "@PXLINCLUDEDIR@")
-
-SET(PXL_AVAILABLE_COMPONENTS core hep astro modules scripting algorithms)
-
-FOREACH(comp ${PXL_FIND_COMPONENTS})
- if (NOT ";${PXL_AVAILABLE_COMPONENTS};" MATCHES ";${comp};" )
- set(PXL_FOUND False)
- set(PXL_NOTFOUND_MESSAGE "Specified unsupported component: ${comp}")
- MESSAGE(STATUS "Specified unsupported component: ${comp}")
- else()
- if (NOT ";${PXL_LIBRARIES};" MATCHES ";pxl-${comp};" )
- LIST(APPEND PXL_LIBRARIES "pxl-${comp}")
- endif()
- MESSAGE(STATUS "Add PXL component: ${comp}")
- endif()
-ENDFOREACH()
-
-
-# define options
-OPTION(PXL_USER_PLUGIN "Install PXL modules in user plugin path" ON)
-
-SET (PXL_USER_PLUGIN_PATH "$ENV{HOME}/.pxl-@PXLMAINVERSION@/plugins")
-SET (PXL_INSTALL_PLUGIN_PATH "@CMAKE_INSTALL_PREFIX@/lib/pxl-@PXLMAINVERSION@/plugins")
-
-# when PXL_PLUGIN_INSTALL_PATH is undefined, try to assign a good default
-IF(NOT DEFINED PXL_PLUGIN_INSTALL_PATH)
- IF(PXL_USER_PLUGIN)
- SET (PXL_PLUGIN_INSTALL_PATH ${PXL_USER_PLUGIN_PATH})
- ELSE(PXL_USER_PLUGIN)
- SET (PXL_PLUGIN_INSTALL_PATH ${PXL_INSTALL_PLUGIN_PATH})
- ENDIF(PXL_USER_PLUGIN)
-ENDIF(NOT DEFINED PXL_PLUGIN_INSTALL_PATH)
-
-MESSAGE(STATUS "Install PXL plugins to " ${PXL_PLUGIN_INSTALL_PATH})
-
-
-# macro to add a new module to cmake
-MACRO(ADD_PXL_PLUGIN name files)
- LINK_DIRECTORIES(${PXL_LIBRARY_PATH})
- INCLUDE_DIRECTORIES(${PXL_INCLUDE_DIRS})
- IF(APPLE)
- ADD_LIBRARY(${name} SHARED MODULE ${files})
- ELSE(APPLE)
- ADD_LIBRARY(${name} SHARED ${files})
- ENDIF(APPLE)
-
- TARGET_LINK_LIBRARIES(${name} ${PXL_LIBRARIES})
-
- SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS -fPIC)
- INSTALL(TARGETS ${name} LIBRARY DESTINATION ${PXL_PLUGIN_INSTALL_PATH})
-ENDMACRO()
-
diff --git a/Python.cmake b/Python.cmake
deleted file mode 100644
index 3b950b0c06a37fca1c618bdc4cd8f751ec175b63..0000000000000000000000000000000000000000
--- a/Python.cmake
+++ /dev/null
@@ -1,102 +0,0 @@
-# SETUP PYTHON
-
-# get default python inerpreter
-FIND_PROGRAM( PYTHON_EXECUTABLE python REQUIRED
- PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
-)
-
-SET(PYTHONINTERP_FOUND TRUE)
-
-# find python include path
-execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_inc())"
- OUTPUT_VARIABLE PYTHON_INCLUDE_PATH
- OUTPUT_STRIP_TRAILING_WHITESPACE
-)
-
-FIND_FILE(PYTHON_H_FOUND Python.h PATHS ${PYTHON_INCLUDE_PATH} NO_DEFAULT_PATH)
-IF(NOT PYTHON_H_FOUND)
- MESSAGE(SEND_ERROR "Python.h not found")
-ENDIF()
-
-IF(APPLE)
-
- # apple changed linking to Python in OS X 10.9 (Mavericks)
- # until 10.8: use Python.framework as part of the SDK (-framework Python)
- # since 10.9: link to Python like any other UNIX
-
- # extract (minor) version number from SDK name (major version always 10 for OS X)
- STRING(REGEX REPLACE ".*MacOSX([0-9]+)[.]([0-9]+)[.]sdk" "\\2" OSX_SDK_MINOR_VERSION "${CMAKE_OSX_SYSROOT}" )
-
- MESSAGE("${CMAKE_OSX_SYSROOT}")
- MESSAGE("Found OS X SDK minor version: ${OSX_SDK_MINOR_VERSION}")
-
- IF(OSX_SDK_MINOR_VERSION LESS 8)
- MESSAGE(STATUS "Running on Mac OS X < 10.9: Linking to Python as framework")
- SET(OSX_USE_PYTHON_FRAMEWORK "True")
-
- INCLUDE(CMakeFindFrameworks)
- # Search for the python framework on Apple.
- MESSAGE(INFO "Looking for python framework as on apple system" )
- CMAKE_FIND_FRAMEWORKS(Python)
- SET (PYTHON_LIBRARIES "-framework Python" CACHE FILEPATH "Python Framework" FORCE)
-
- ELSE(OSX_SDK_MINOR_VERSION LESS 8)
- SET(OSX_USE_PYTHON_FRAMEWORK "False")
- MESSAGE(STATUS "Running on Mac OS X >= 10.9: Linking to Python in UNIX default way")
-
- ENDIF(OSX_SDK_MINOR_VERSION LESS 8)
-
-ENDIF(APPLE)
-
-IF(MSVC)
- execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils import sysconfig; import os; prefix= sysconfig.get_config_var('prefix'); ver = sysconfig.get_python_version().replace('.', ''); lib = os.path.join(prefix,'libs\\python'+ver+'.lib'); sys.stdout.write(lib)"
- OUTPUT_VARIABLE PYTHON_LIBRARIES
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-ENDIF(MSVC)
-
-IF (MINGW)
- execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils import sysconfig; import os; prefix= sysconfig.get_config_var('prefix'); ver = sysconfig.get_python_version().replace('.', ''); lib = os.path.join(prefix,'libs\\libpython'+ver+'.a'); sys.stdout.write(lib)"
- OUTPUT_VARIABLE PYTHON_LIBRARIES
- OUTPUT_STRIP_TRAILING_WHITESPACEsysconfig.get_config_var('LIBDIR')
- )
-ENDIF(MINGW)
-
-IF(NOT OSX_USE_PYTHON_FRAMEWORK AND NOT MSVC AND NOT MINGW)
- execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils import sysconfig; import os; libname = sysconfig.get_config_var('LDLIBRARY'); libdir = sysconfig.get_config_var('LIBPL'); lib = os.path.join(libdir,libname); out = lib if os.path.exists(lib) else os.path.join(libdir, sysconfig.get_config_var('LIBRARY')); sys.stdout.write(out);"
- OUTPUT_VARIABLE PYTHON_LIBRARIES
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-ENDIF(NOT OSX_USE_PYTHON_FRAMEWORK AND NOT MSVC AND NOT MINGW)
-
-#find the site package destinaton
-execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}'))"
- OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
- OUTPUT_STRIP_TRAILING_WHITESPACE
-)
-
-execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(str(sys.version_info[0]))"
- OUTPUT_VARIABLE PYTHON_MAJOR_VERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE
-)
-
-execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(str(sys.version_info[1]))"
- OUTPUT_VARIABLE PYTHON_MINOR_VERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE
-)
-
-SET(PYTHON_VERSION "${PYTHON_MAJOR_VERSION}${PYTHON_MINOR_VERSION}")
-SET(PYTHON_DOT_VERSION "${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION}")
-
-MESSAGE(STATUS "Found Python executeable: " ${PYTHON_EXECUTABLE})
-MESSAGE(STATUS "Found Python include path: " ${PYTHON_INCLUDE_PATH})
-MESSAGE(STATUS "Found Python library: " ${PYTHON_LIBRARIES})
-MESSAGE(STATUS "Using Python site-package directory: " ${PYTHON_SITE_PACKAGES})
-MESSAGE(STATUS "Using Python Version: " ${PYTHON_DOT_VERSION} "/" ${PYTHON_VERSION})
diff --git a/README b/README
deleted file mode 100644
index aaeb8fb0a7f945ee3a9c36cd0ef34ad16ac3caac..0000000000000000000000000000000000000000
--- a/README
+++ /dev/null
@@ -1,120 +0,0 @@
-------------------------------------------------------------------------------
-
- Physics eXtension Library (PXL)
- C++ Toolkit for Physics Analysis, Relation Management
- and Hypothesis Evolution in High Energy and Astroparticle Physics
- Copyright (C) 2006-2015 M. Erdmann
- Web: https://vispa.physik.rwth-aachen.de/pxl
- Contact: vispa@lists.rwth-aachen.de
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA
-
-------------------------------------------------------------------------------
-
-### Requirements:
- PXL is known to run on Linux, MacOSX and Windows. This is the source
- version of PXL - if you don't want to compile PXL yourself check our
- website for binary installers for your operating system.
-
- cmake is required to build PXL, see below.
-
-### Optional:
- For PyPxl to work, you need Python in a version between 2.4 and 2.7.
- Swig (http://www.swig.org), version >= 1.3.36, is required as well
- if pxl is compiled from the repository.
-
- To generate documentation, doxygen is necessary.
-
-
-### Basic installation of the stable PXL release from source
-
- PXL is built using CMAKE - for more information see www.cmake.org
- Use
-
- $cmake . # or ccmake . or qcmake, or ...
-
- to configure and generate the Makefile and
-
- $make to build PXL
-
- For installation into /usr/local/ or your specified location type
-
- $make install
-
- Don't forget to adjust your PATH, PYTHONPATH, and LD_LIBRARY_PATH
- environment variables if you decided to use a different location or
- decided to not use make install at all.
-
- You can also generate doxygen documentation (if doxygen is available) with
-
- $make doc
-
-
-
-### Installation from Mercurial:
-
- For installation from Mercurial PXL requires:
-
- zlib
- python, version 2.4-3.2 (not needed for core packages only)
- swig, version >= 1.3.36 (not needed for core packages only)
- cmake
-
- The latest developer version can be cloned from
-
- https://forge.physik.rwth-aachen.de/hg/pxl
- ssh://forge.physik.rwth-aachen.de/hg/pxl
- https://forge.physik.rwth-aachen.de/public-hg/pxl (read-only)
- (see https://forge.physik.rwth-aachen.de/projects/pxl/repository)
-
-
-### Installation on Mac OS X:
-
- The installation should work as described for Unix systems (tested
- for Snow Leopard and Lion) with cmake. There are also Xcode project
- files provided to compile with Xcode.
-
- If you are running an earlier version of Mac OS X and
- the instructions above do not work, the following information
- may be useful.
-
- You might need to install pkgconfig
- (http://pkg-config.freedesktop.org/wiki/), version >= 0.9.0 (not
- necessary for Lion or Snow Leopard)
-
- PXL does not directly support universal/fat binaries, but Xcode does
- and can be used for this purpose using the provided project files.
- Although not described here, similar steps should work for the power
- pc architectures as well.
-
- Compilation and installation work as described above (cmake).
-
- Setting the ARCHFLAGS environmental variable may prevent warning
- messages when PXL is linked against Python that comes with
- earlier versions of Mac OS X.
-
- Choose one of the following architectures:
-
- - 32 bit Intel
- export CXXFLAGS="-arch i386"
- export ARCHFLAGS="-arch i386"
-
- - 64 bit Intel
- export CXXFLAGS="-arch x86_64"
- export ARCHFLAGS="-arch x86_64"
-
-
-
-
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b6761a06fd8b2269523afcb0de10ef689ae0b367
--- /dev/null
+++ b/README.md
@@ -0,0 +1,70 @@
+# Physics eXtension Library (PXL)
+
+C++ toolkit for physics analysis.
+
+Copyright (C) 2006-2019 Martin Erdmann
+
+Web: https://vispa.physik.rwth-aachen.de/pxl
+
+Contact: vispa@lists.rwth-aachen.de
+
+
+### Requirements
+
+PXL is known to run on Linux, MacOSX and Windows. This is the source version of PXL - if you don't want to compile PXL yourself check our website for binary installers for your operating system.
+
+make is required to build PXL, see below.
+
+
+##### Optional
+
+To generate the documentation, [doxygen](http://www.doxygen.org) and [breathe](https://breathe.readthedocs.io) are required.
+
+
+### Basic installation of the stable PXL release from source
+
+PXL is built using CMAKE - for more information see www.cmake.org. Use
+
+```shell
+cmake .
+make
+make install
+```
+
+Don't forget to adjust your PATH and LD_LIBRARY_PATH environment variables if you decided to use a different location or decided to not use make install at all.
+
+You can also generate doxygen documentation (if doxygen is available) with
+
+```shell
+make doc
+```
+
+
+### Authors
+
+Current PXL Project Managers:
+
+- Martin Erdmann
+
+Current PXL Developers:
+
+- Benjamin Fischer
+- Yannik Rath
+- Marcel Rieger
+
+Former PXL Developers/Advisors:
+
+- Oxana Actis
+- Andreas Hinzmann
+- Steffen Kappler (project leader)
+- Matthias Kirsch
+- Tatsiana Klimkovich
+- Dennis Klingebiel
+- Matthias Komm
+- Matthias Plum
+- Guenter Quast
+- Christophe Saout
+- Jan Steggemann
+- Tobias Winchen
+- Robert Fischer
+- Gero Mueller
diff --git a/WindowsInstaller.cmake b/WindowsInstaller.cmake
deleted file mode 100644
index 6d477b107e5af3245a276cefa5dca71b7d1730e0..0000000000000000000000000000000000000000
--- a/WindowsInstaller.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-IF (MSVC)
- GET_FILENAME_COMPONENT(WIX_INSTALL_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Installer XML\\3.0;InstallRoot]" ABSOLUTE CACHE)
- MESSAGE(STATUS "Windows Installer XML: ${WIX_INSTALL_ROOT}")
-
- FIND_PROGRAM( CANDLE_EXECUTABLE candle
- PATHS ${WIX_INSTALL_ROOT}
- REQUIRED
- )
-
- FIND_PROGRAM( LIGHT_EXECUTABLE light
- PATHS ${WIX_INSTALL_ROOT}
- )
-
- CONFIGURE_FILE(pypxl.wxs.in ${CMAKE_BINARY_DIR}/pypxl.wxs)
-
- add_custom_target( windows_installer_candle
- ${CANDLE_EXECUTABLE} ${CMAKE_BINARY_DIR}/pypxl.wxs
- DEPENDS ${CMAKE_BINARY_DIR}/pypxl.wxs
- )
- add_dependencies(windows_installer_candle pxlrun pxl-modules)
-
- add_custom_target( windows_installer
- ${LIGHT_EXECUTABLE} -ext WixUIExtension ${CMAKE_BINARY_DIR}/pypxl.wixobj -o ${CMAKE_BINARY_DIR}/PyPXL-Py${PYTHON_DOT_VERSION}-${PXLVERSION}.msi
- )
- add_dependencies(windows_installer windows_installer_candle)
-ENDIF(MSVC)
\ No newline at end of file
diff --git a/Xcode.cmake b/Xcode.cmake
deleted file mode 100644
index a01f3e5266534c2318f709c804c5aa9e2564db22..0000000000000000000000000000000000000000
--- a/Xcode.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-# XCODE
-#
-# define macro to set library properties for Mac OS X
-# FRAMEWORK create OS X library framework
-# INSTALL_NAME_DIR value for Xcode INSTALL_PATH variable
-# BUILD_WITH_INSTALL_RPATH make sure INSTALL_PATH gets set
-#
-
-IF(APPLE AND ${CMAKE_GENERATOR} STREQUAL "Xcode")
- SET(GENERATE_FOR_XCODE ON)
-ELSE(APPLE AND ${CMAKE_GENERATOR} STREQUAL "Xcode")
- SET(GENERATE_FOR_XCODE OFF)
-ENDIF(APPLE AND ${CMAKE_GENERATOR} STREQUAL "Xcode")
-
-IF(GENERATE_FOR_XCODE)
- OPTION(FRAMEWORK_SUPPORT "If ON shared libraries will be created as frameworks on Mac OS X" ON)
- OPTION(FRAMEWORK_BUILD_WITH_INSTALL_RPATH "Sets install_name property of shared libraries on Mac OS X" ON)
-ENDIF(GENERATE_FOR_XCODE)
-
-MACRO(SET_XCODE_FRAMEWORK_PROPERTIES name)
- IF(GENERATE_FOR_XCODE)
- SET_TARGET_PROPERTIES(${name} PROPERTIES
- FRAMEWORK ${FRAMEWORK_SUPPORT}
- XCODE_ATTRIBUTE_DYLIB_COMPATIBILITY_VERSION "${PXLMAJORRELEASEVERSION}.${PXLMINORRELEASEVERSION}"
- MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${PXLMAJORRELEASEVERSION}.${PXLMINORRELEASEVERSION}"
- BUILD_WITH_INSTALL_RPATH ${FRAMEWORK_BUILD_WITH_INSTALL_RPATH}
- INSTALL_NAME_DIR "./"
- INSTALL_RPATH_USE_LINK_PATH ON)
- ENDIF(GENERATE_FOR_XCODE)
-ENDMACRO(SET_XCODE_FRAMEWORK_PROPERTIES name)
-
-#
-# create universal binaries on OS X
-# make sure libraries are compatible with OS X Snow Leopard (10.6)
-#
-IF(GENERATE_FOR_XCODE)
- SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64")
- SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
-ENDIF(GENERATE_FOR_XCODE)
-
-#
-# display status information to user
-#
-MESSAGE(STATUS "GENERATE_FOR_XCODE = ${GENERATE_FOR_XCODE}")
-IF(GENERATE_FOR_XCODE)
- MESSAGE(STATUS "FRAMEWORK_SUPPORT = ${FRAMEWORK_SUPPORT}")
- MESSAGE(STATUS "FRAMEWORK_BUILD_WITH_INSTALL_RPATH = ${FRAMEWORK_BUILD_WITH_INSTALL_RPATH}")
-ENDIF(GENERATE_FOR_XCODE)
\ No newline at end of file
diff --git a/algorithms/CMakeLists.txt b/algorithms/CMakeLists.txt
deleted file mode 100644
index ad33c8ab0b7efc30fc1a36e252adb873dcca82eb..0000000000000000000000000000000000000000
--- a/algorithms/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# use local include directory
-#
-include_directories (
- include
- ${PXL_SOURCE_DIR}/hep/include
- ${PXL_SOURCE_DIR}/core/include
- ${CMAKE_BINARY_DIR}/include
-)
-
-#
-# add library using the sources
-#
-add_library(pxl-algorithms SHARED
- src/AutoLayout.cc
-)
-
-#
-# hep depends on pxl, hep and scripting
-#
-add_dependencies(pxl-algorithms pxl-core pxl-hep)
-
-#
-# link to pxl, hep and scripting
-#
-target_link_libraries (pxl-algorithms pxl-core pxl-hep)
-
-#
-# setup install path
-#
-PXL_INSTALL_LIBRARY(pxl-algorithms)
-
-#
-# set library properties for Mac OS X
-#
-SET_XCODE_FRAMEWORK_PROPERTIES(pxl-algorithms)
\ No newline at end of file
diff --git a/algorithms/algorithms.vcproj b/algorithms/algorithms.vcproj
deleted file mode 100644
index 8df1a84483b4b316f5b232068234da803660dec0..0000000000000000000000000000000000000000
--- a/algorithms/algorithms.vcproj
+++ /dev/null
@@ -1,210 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/algorithms/include/pxl/algorithms/AutoLayout.hh b/algorithms/include/pxl/algorithms/AutoLayout.hh
deleted file mode 100644
index 05bd34587421e60e2138f6443f8d85c778ea6177..0000000000000000000000000000000000000000
--- a/algorithms/include/pxl/algorithms/AutoLayout.hh
+++ /dev/null
@@ -1,273 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#ifndef PXL_ALGORITHMS_AUTOLAYOUT_HH
-#define PXL_ALGORITHMS_AUTOLAYOUT_HH
-
-#include
-#include
-#include
-#include
-
-#include "pxl/core/macros.hh"
-
-namespace pxl {
-
-class PXL_DLL_EXPORT Vector2
-{
-public:
- typedef double value_t;
-
- value_t x, y;
-
- Vector2() :
- x(0.0), y(0.0)
- {
- }
- Vector2(const Vector2& copy) :
- x(copy.x), y(copy.y)
- {
- }
- Vector2(value_t a, value_t b) :
- x(a), y(b)
- {
- }
-
- inline Vector2 operator +(const Vector2& op) const
- {
- return Vector2(x + op.x, y + op.y);
- }
-
- inline const Vector2& operator +=(const Vector2& op)
- {
- x += op.x;
- y += op.y;
- return *this;
- }
-
- inline Vector2 operator -(const Vector2& op) const
- {
- return Vector2(x - op.x, y - op.y);
- }
-
- inline const Vector2& operator -=(const Vector2& op)
- {
- x -= op.x;
- y -= op.y;
- return *this;
- }
-
- inline Vector2 operator *(value_t op) const
- {
- return Vector2(x * op, y * op);
- }
-
- inline void normalize()
- {
- value_t ol = 1.0/length();
- x *= ol;
- y *= ol;
- }
-
- inline void scale(value_t d)
- {
- value_t l = d/length();
- x *= l;
- y *= l;
- }
-
- inline Vector2 scaled(value_t d)
- {
- value_t l = d/length();
- return Vector2(x * l, y * l);
- }
-
- inline Vector2 normalized()
- {
- value_t ol = 1.0/length();
- return Vector2(x * ol, y * ol);
- }
-
- inline value_t length() const
- {
- return sqrt(x*x+y*y);
- }
-
- inline value_t length2() const
- {
- return (x*x+y*y);
- }
-
- inline void zero()
- {
- x = 0.0;
- y = 0.0;
- }
-
- bool parallelTo(const Vector2 &b);
-};
-
-
-class PXL_DLL_EXPORT Line
-{
-public:
- Vector2 a, b;
-
- Line()
- {
-
- }
-
- Line(const Vector2& v1, const Vector2& v2) :
- a(v1), b(v2)
- {
-
- }
-
- bool intersection(const Line& line, Vector2& intersection);
-};
-
-
-class PXL_DLL_EXPORT Rect2
-{
-public:
- Vector2 ll;
- Vector2 ur;
-
- Rect2() :
- ll(std::numeric_limits::max(), std::numeric_limits<
- Vector2::value_t>::max()), ur(std::numeric_limits<
- Vector2::value_t>::min(),
- std::numeric_limits::min())
- {
-
- }
-
- Rect2(const Vector2& point) :
- ll(point), ur(point)
- {
-
- }
-
- void expand(const Vector2& point);
-
- void expand(const Rect2& rect)
- {
- expand(rect.ll);
- expand(rect.ur);
- }
-
- bool contains(const Vector2& point, double margin = 0) const;
-
- bool overlaps(const Rect2& rhs) const;
-};
-
-/* class Eventview
-{
- std::vector view;
-};*/
-class PXL_DLL_EXPORT Node
-{
-public:
- Vector2 velocity;
- Vector2 force;
- double mass;
- bool active;
- Rect2 rect;
- bool updated;
- Node* lastvisit;
-
- bool isMotherOf(Node *node);
- bool isDaughterOf(Node *node);
- void updateRect();
-
- int numberchildren;
- int boxednodes;
-
-// std::vector childrenpositionx;
-// std::vector childrenpositiony;
-
-
-
-
- Node();
-
- Vector2 position;
- std::vector mothers;
- std::vector children;
- bool isVertex;
-
-};
-
-/**
- algorithm for automatic layouting of decay trees
- */
-
-class PXL_DLL_EXPORT AutoLayout
-{
- double _friction;
- double _spring;
- double _proximity;
- double _gravity;
- double _mass;
- double _overlap;
- int _steps;
- int _levels;
-
-public:
- std::vector allNodes;
- std::vector initialNodes;
- std::vector activeNodes;
- std::vector orphans;
-
- double margin;
- double grid;
- double border;
-
- AutoLayout();
- ~AutoLayout();
-
- void init(const std::vector& nodes);
- void layout(bool forceBased);
- void layoutSteps();
- void step();
-
- void reset();
- void applyGravity();
- void applyProximityForces();
- void applySpringForce (Node* a, Node* b, double length);
- void applySpringForces();
- void applyFrictionForces();
- void applyInitialConstraints();
- void resolveBackpointingChildren();
- void applyProximityForces(Node* lhs, Node* rhs);
- void applyProximityForcesTree(Node* parent, Node* node);
-
- void resolveOverlap(Node *a1, Node *b1, Node *a2, Node *b2);
- void resolveOverlaps();
- bool isStable();
- void placeInitials();
-// void commitPositions();
- void activateChildren();
-
- int countChildren(Node* Node);
- void layoutChildren(Node* Node, double scale);
- void box(Node* Node, double scale);
- bool box_resolveOverlaps(Node* Node, double scale);
- bool box_resolveOverlap(Node *a1, Node *b1, Node *a2, Node *b2, double scale);
- void layout_children(Node* Node);
- void layout_orphans();
-
- void fillNodeGrid(std::vector >& nodeGrid, Node* node, unsigned int depth);
- void new_initial();
- void drawbox();
-};
-
-} // namespace pxl
-
-#endif // PXL_AUTOLAYOUT_HH
diff --git a/algorithms/pxl-algorithms.pc.in b/algorithms/pxl-algorithms.pc.in
deleted file mode 100644
index 279ed03f4a74264031ea24aaed64e8d296b1d8f8..0000000000000000000000000000000000000000
--- a/algorithms/pxl-algorithms.pc.in
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: PXL Algorithms
-Description: Physics eXtension Library - Algorithms Classes
-Version: @PXL_VERSION@
-URL: https://vispa.physik.rwth-aachen.de/pxl
-Requires: pxl = @PXL_VERSION@
-Libs: -L${libdir} -lpxl-algorithms
-Cflags: -I${includedir}
diff --git a/algorithms/src/AutoLayout.cc b/algorithms/src/AutoLayout.cc
deleted file mode 100644
index ac7389fefdf69483c9a5d463ecf13ead33a7c344..0000000000000000000000000000000000000000
--- a/algorithms/src/AutoLayout.cc
+++ /dev/null
@@ -1,1106 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#include "pxl/algorithms/AutoLayout.hh"
-
-#include
-
-namespace pxl {
-
-bool Vector2::parallelTo(const Vector2 &b)
-{
- if (x == 0)
- {
- if (b.x == 0)
- return true;
- else
- return false;
- }
-
- if (b.x == 0)
- return false;
-
- if (y / x == b.y / b.x)
- return true;
-
- return false;
-}
-
-
-bool Line::intersection(const Line& line, Vector2& intersection)
-{
- Vector2 r1 = b - a;
- Vector2 r2 = line.b - line.a;
- Vector2 s = line.a - a;
-
- double t2 = (r1.x*s.y - r1.y*s.x)/ (r1.y*r2.x - r1.x*r2.y);
-
- double t1 = (s.x + t2 * r2.x) / r1.x;
-
- intersection = line.a + r2 * t2;
-
- if ((t1 > 0.0001) && (t1 < 0.999) && (t2 > 0.0001) && (t2 < 0.999))
- return true;
- else
- return false;
-}
-
-
-void Rect2::expand(const Vector2& point)
-{
- ll.x = std::min(ll.x, point.x);
- ll.y = std::min(ll.y, point.y);
-
- ur.x = std::max(ur.x, point.x);
- ur.y = std::max(ur.y, point.y);
-}
-
-bool Rect2::contains(const Vector2& point, double margin) const
-{
- if (point.x < (ll.x - margin))
- return false;
- if (point.y < (ll.y - margin))
- return false;
-
- if (point.x > (ur.x + margin))
- return false;
- if (point.y > (ur.y + margin))
- return false;
-
- return true;
-}
-
-bool Rect2::overlaps(const Rect2& rhs) const
-{
- if (ur.x < rhs.ll.x)
- return false;
-
- if (ur.y < rhs.ll.y)
- return false;
-
- if (ll.x > rhs.ur.x)
- return false;
-
- if (ll.y > rhs.ur.y)
- return false;
-
- return true;
-}
-
-
-Node::Node() : mass(10.0)
-{
-}
-
-AutoLayout::AutoLayout() :
- _friction(0.9), _spring(0.2), _proximity(0.5),
- _gravity(10.0), _mass(0.1), _overlap(10.0), _steps(400),
- _levels (100000), margin(50.0), grid(100.0), border(100.)
-{
-#if 1
- /* for finding cirrect values */
-/* std::ifstream file("/root/Desktop/autolayout.txt");
- file >> _friction;
- file >> _spring;
- file >> _proximity;
- file >> _gravity;
- file >> _mass;
- file >> _overlap;
- file >> _steps;
- file >> _levels;
- file >>grid;
- file >>margin;
- */
-
-#endif
-}
-
-AutoLayout::~AutoLayout()
-{
-}
-
-void AutoLayout::init(const std::vector& nodes)
-{
- allNodes.clear();
- initialNodes.clear();
- activeNodes.clear();
-
- allNodes.resize(nodes.size());
- std::copy(nodes.begin(), nodes.end(), allNodes.begin());
-
- for (std::vector::iterator i = allNodes.begin(); i != allNodes.end(); i++)
- {
- if ((*i)->mothers.size() == 0)
- {
- (*i)->active = true;
- initialNodes.push_back(*i);
- activeNodes.push_back(*i);
- }
- else
- {
- (*i)->active = false;
- }
-
- }
-
- //while (allNodes.size() > activeNodes.size())
- //activateChildren();
-}
-void Node::updateRect()
-{
- if (updated)
- return;
-
- rect = Rect2(position);
-
- std::vector::iterator i;
- for (i = children.begin(); i != children.end(); i++)
- {
- if ((*i)->active == false)
- continue;
-
- (*i)->updateRect();
- rect.expand((*i)->rect);
- }
-
- updated = true;
-}
-
-void AutoLayout::reset()
-{
- for (std::vector::iterator i = allNodes.begin(); i != allNodes.end(); i++)
- {
- (*i)->force.zero();
- (*i)->updated = false;
- }
-
- for (std::vector::iterator i = initialNodes.begin(); i != initialNodes.end(); i++)
- (*i)->updateRect();
-}
-
-bool Node::isMotherOf(Node *node)
-{
- std::vector::iterator i;
-
- for (i = children.begin(); i != children.end(); i++)
- {
- if (*i == node)
- return true;
- }
-
- return false;
-}
-
-bool Node::isDaughterOf(Node *node)
-{
- std::vector::iterator i;
-
- for (i = mothers.begin(); i != mothers.end(); i++)
- {
- if (*i == node)
- return true;
- }
-
- return false;
-}
-
-void AutoLayout::applyGravity()
-{
- std::vector::iterator i;
- for (i = allNodes.begin(); i != allNodes.end(); i++)
- {
- (*i)->force.x += _gravity;
- }
-}
-/*
- void AutoLayout::applyProximityForces(Node* a, Node* b)
- {
- if (a->rect.overlaps(b->rect) == false)
- return;
-
- for (std::vector::iterator i = initialNodes.begin(); i != initialNodes.end(); i++)
- {
- }
- }
- */
-
-void AutoLayout::applyProximityForces(Node* lhs, Node* rhs)
-{
- if (rhs == lhs)
- return;
-
- Vector2 r = rhs->position - lhs->position;
- double distance = r.length();
- Vector2 direction;
-
- if (distance < 1.0)
- {
- lhs->position += Vector2(0, 1);
- direction = Vector2(0.0, 1);
- }
- else
- direction = r.normalized();
-
- double force = -fabs(grid - distance) * _proximity;
-
- if (distance < grid)
- {
- lhs->force.y += direction.y * force;
- rhs->force.y -= direction.y * force;
- }
-}
-
-void AutoLayout::applyProximityForcesTree(Node* parent, Node* node)
-{
- if (parent->rect.contains(node->position, grid) && (parent->lastvisit
- != node))
- {
- applyProximityForces(parent, node);
- for (std::vector::iterator i = parent->children.begin(); i
- != parent->children.end(); i++)
- {
- Node* child = *i;
- if (child->active == false)
- continue;
- applyProximityForcesTree(child, node);
- }
- parent->lastvisit = node;
- }
-}
-
-void AutoLayout::applyProximityForces()
-{
- for (std::vector::iterator i = allNodes.begin(); i != allNodes.end(); i++)
- {
- Node* node = *i;
-
- if (node->active == false)
- continue;
-
- for (std::vector::iterator j = initialNodes.begin(); j
- != initialNodes.end(); j++)
- {
- Node* initial = *j;
- applyProximityForcesTree(initial, node);
- }
- }
-}
-
-void AutoLayout::applySpringForce (Node* a, Node* b, double length)
-{
- Vector2 r = b->position - a->position;
- double distance = r.length();
-
- Vector2 direction;
- if (distance == 0.0)
- direction = Vector2(1.0, 0.0);
- else
- direction = r.normalized();
-
- double force = _spring * (distance - (length/2.0));
-
- a->force.y += (direction * force).y;
- b->force -= direction * force;
-}
-
-void AutoLayout::applySpringForces()
-{
- std::vector::iterator i;
- for (i = activeNodes.begin(); i != activeNodes.end(); i++)
- {
- Node* mother = *i;
-
-// Node* sib = 0;
- std::vector::iterator j;
- for (j = mother->children.begin(); j != mother->children.end(); j++)
- {
- Node* daughter = *j;
-
- if (daughter->active == false)
- continue;
-
- double range = grid;
- if ((daughter->position.x - mother->position.x) > 0)
- range = sqrt(grid*grid + pow(grid*(daughter->position.y - mother->position.y)/(daughter->position.x - mother->position.x), 2));
- applySpringForce (mother, daughter, range);
- /*
- if (sib)
- applySpringForce (daughter, sib, grid);
-
- sib = daughter;
-*/
- }
- }
-}
-
-void AutoLayout::applyFrictionForces()
-{
- std::vector::iterator i;
- for (i = allNodes.begin(); i != allNodes.end(); i++)
- {
- (*i)->force -= (*i)->velocity * _friction;
- }
-}
-
-void AutoLayout::applyInitialConstraints()
-{
- std::vector::iterator i;
- for (i = initialNodes.begin(); i != initialNodes.end(); i++)
- {
- (*i)->force.x = 0;
- }
-}
-
-void AutoLayout::step()
-{
- std::vector::iterator i;
- for (i = activeNodes.begin(); i != activeNodes.end(); i++)
- {
- (*i)->position += (*i)->velocity * 0.1;
- if ((*i)->force.length() > 100.0)
- (*i)->force.scale(100.0);
- (*i)->velocity += (*i)->force * (0.1 / (*i)->mass);
- }
-}
-
-void AutoLayout::resolveOverlap(Node *a1, Node *b1, Node *a2, Node *b2)
-{
- Line a(a1->position, b1->position);
- Line b(a2->position, b2->position);
-
- Vector2 intersection;
- if (a.intersection(b, intersection))
- {
- //std::cout << "intersection: " << intersection.x << " " << intersection.y << std::endl;
-/*
- Vector2 v = (a1->position - b1->position - a2->position + b2->position) * _overlap;
- b1->force += v;
- b2->force -= v;
-*/
- //b1->force += (a1->position - b1->position).scaled(_overlap);
- //b2->force += (a2->position - b2->position).scaled(_overlap);
- //b1->position = a1->position - (a1->position - intersection) * 0.9;
- Vector2 v1 = b1->position - a1->position;
- Vector2 v2 = b2->position - a2->position;
- if (v1.length2() > v2.length2())
- {
- v2.scale (_overlap);
- b2->force -= v2;
- b1->force += v2;
- }
- else
- {
- v1.scale (_overlap);
- b2->force += v1;
- b1->force -= v1;
- }
- //b1->position = intersection;
- //b2->position = intersection;
- }
-}
-
-void AutoLayout::resolveOverlaps()
-{
- std::vector::iterator i;
- for (i = allNodes.begin(); i != allNodes.end(); i++)
- {
- Node *a = *i;
- if (a->active == false)
- continue;
-
- std::vector::iterator j;
- for (j = a->children.begin(); j != a->children.end(); j++)
- {
- Node *b = *j;
-
- if (b->active == false)
- continue;
-
- std::vector::iterator k = i;
- for (k++; k != allNodes.end(); k++)
- {
- Node *c = *k;
-
- if (c->active == false)
- continue;
-
- if (c->isDaughterOf(a))
- continue;
-
- std::vector::iterator l;
- for (l = c->children.begin(); l != c->children.end(); l++)
- {
- Node *d = *l;
-
- if (d->active == false)
- continue;
-
- resolveOverlap(a, b, c, d);
- }
- }
- }
- }
-}
-
-void AutoLayout::resolveBackpointingChildren()
-{
- for (std::vector::iterator i = allNodes.begin(); i != allNodes.end(); i++)
- {
- Node *mother = *i;
-
- if (mother->active == false)
- continue;
-
- for (std::vector::iterator j = mother->children.begin(); j
- != mother->children.end(); j++)
- {
- Node *daughter = *j;
-
- if (daughter->active == false)
- continue;
-
- if (daughter->position.x < mother->position.x)
- {
- daughter->position.x = mother->position.x;
- //if (daughter->velocity.x < 0)
- daughter->force.x += 10;
- }
- }
- }
-}
-
-bool AutoLayout::isStable()
-{
- std::vector::iterator i;
- for (i = activeNodes.begin(); i != activeNodes.end(); i++)
- {
- if ((*i)->force.length() > 0.1 || (*i)->velocity.length() > 0.1)
- return false;
- }
-
- return true;
-}
-
-void AutoLayout::placeInitials()
-{
- for (std::vector::iterator i = initialNodes.begin(); i != initialNodes.end(); i++)
- {
- (*i)->position.x = margin;
- // (*i)->position.y = 0;
- }
-}
-
-
-// new algorithm
-int AutoLayout::countChildren(Node* object)
-{
- object->numberchildren = 0;
-
- if (object->children.size() != 0)
- {
- std::vector::iterator l;
-
- for (l = object->children.begin(); l != object->children.end(); l++)
- {
- object->numberchildren += countChildren(*l) + 1;
- }
- }
- return object->numberchildren;
-}
-
-void AutoLayout::layoutChildren(Node* object, double scale)
-{
- box(object,1.0);
- box_resolveOverlaps(object,scale);
-/*
- int k = 0;
- std::vector::iterator j;
-
- for (j = object->children.begin(); j != object->children.end(); j++)
- {
- k = k + (*j)->boxednodes;
- }
-
-
- if (object->numberchildren != 0 && (object->children.size() + k) == object->numberchildren)
- {
- std::cout<<"children.size == object->numberchildren"<children.begin(); j != object->children.end(); j++)
- {
-// object->childrenpositionx.push_back((*j)->position.x - object->position.x);
-// object->childrenpositiony.push_back((*j)->position.y - object->position.y);
- }
- boxes.push_back(object);
- }
- else
- {
- for (j = object->children.begin(); j != object->children.end(); j++)
- {
- layoutChildren((*j), scale);
- }
-
- }
-
- box_resolveOverlaps(object,scale);
-*/
-}
-
-bool cmp(Node* object1, Node* object2)
-{
- return object1->children.size() > object2->children.size();
-}
-bool cmp2(Node* object1, Node* object2)
-{
- return object1->numberchildren > object2->numberchildren;
-}
-
-void AutoLayout::box(Node* object, double scale)
-{
- double g = grid * 0.9 ;//* 0.5*object->children.size();
- double y = g/2.0;
- int n = 0;
-
- size_t d;
-
- double step = g / (object->children.size()-1);
-
- std::vector::iterator j;
- std::vector::iterator l;
- std::vector v;
- std::vector w;
- std::vector a;
- std::vector b;
-
- for (j = object->children.begin(); j != object->children.end(); j++)
- {
- v.push_back(*j);
- }
-
-
- std::sort( v.begin(), v.end(), cmp);
-
-
- for(d = 0; d != v.size(); d++ )
- {
- if(d%2 == 0 )
- a.push_back(v[d]);
- else
- b.push_back(v[d]);
- }
-
- for(d = 0; d != a.size(); d++ )
- {
- w.push_back(a[d]);
- }
- for(d = 0; d != b.size(); d++ )
- {
- w.push_back(b[b.size()-1-d]);
- }
-
- for (j = w.begin(); j != w.end(); j++)
- {
- Node* child = *j;
-
- if (object->children.size() == 1)
- child->position = object->position + Vector2(grid,0);
- else
- {
- child->position = object->position + Vector2(grid,scale*(-y + n*step));
- n++;
- }
- }
-
-
- object->boxednodes = object->numberchildren;
-
-}
-
-
-bool AutoLayout::box_resolveOverlaps(Node* object, double scale)
-{
- int n = 0;
- bool overlap;
- std::vector::iterator i;
- for (i = allNodes.begin(); i != allNodes.end(); i++)
- {
- Node *a = *i;
- std::vector::iterator j;
- for (j = a->children.begin(); j != a->children.end(); j++)
- {
- Node *b = *j;
- std::vector::iterator k = i;
- for (k++; k != allNodes.end(); k++)
- {
- Node *c = *k;
-
- if (c->isDaughterOf(a))
- continue;
-
- std::vector::iterator l;
- for (l = c->children.begin(); l != c->children.end(); l++)
- {
- Node *d = *l;
- overlap = box_resolveOverlap(a, b, c, d, scale);
-
-
- do
- {
- overlap = box_resolveOverlap(a, b, c, d, scale*(1+n*0.03));
- n++;
-
-// std::cout << "Overlap= "<< overlap << std::endl;
-// std::cout << "n= "<< n << std::endl;
-
-// return true;
-// break;
- }
- while (overlap == true );//&& n!= 500);
-
- if(overlap == true)
- {
-// box_resolveOverlaps(object, 1.5*scale);
- }
-
- }
- }
-
- }
- }
- return false;
-}
-bool AutoLayout::box_resolveOverlap(Node *a1, Node *b1, Node *a2, Node *b2, double scale)
-{
- Line a(a1->position, b1->position);
- Line b(a2->position, b2->position);
-
- Vector2 intersection;
- if (a.intersection(b, intersection))
- {
- std::vector::iterator i;
- std::vector::iterator j;
-
- for (i = allNodes.begin(); i != allNodes.end(); i++)
- {
-
- Node *c = *i;
-
- if (c->isMotherOf(a1))
- {
- box(c, scale*1.2);
- layout_children(c);
- return true;
- }
- }
-
- }
-
-
- return false;
-}
-void AutoLayout::layout_children(Node* object)
-{
- std::vector::iterator j;
- for (j = object->children.begin(); j != object->children.end(); j++)
- {
- box(*j, 1);
- if((*j)->children.size() != 0)
- {
- layout_children(*j);
- }
- }
-}
-
-void AutoLayout::fillNodeGrid(std::vector >& nodeGrid, Node* node, unsigned int depth)
-{
- // create vector if not present yet
- if (nodeGrid.size() <= depth)
- {
- nodeGrid.push_back(std::vector());
- }
-
- // fill current node (if not present yet)
-
- if (std::find(nodeGrid[depth].begin(), nodeGrid[depth].end(), node) == nodeGrid[depth].end())
- nodeGrid[depth].push_back(node);
-
- depth++;
-
- //loop over daughters and fill those
- for (std::vector::iterator child = node->children.begin(); child != node->children.end(); ++child)
- {
- fillNodeGrid(nodeGrid, *child, depth);
- }
-
- depth--;
-}
-
-/// Initial layout
-void AutoLayout::new_initial()
-{
- std::vector > nodeGrid;
-
- // fill the node grid
- for (std::vector::iterator i = allNodes.begin(); i != allNodes.end(); i++)
- {
- // start at all nodes without mothers and with daughters
- if ((*i)->mothers.size()==0 && (*i)->children.size() > 0 )
- {
- if ( ! ( (*i)->children.size() == 1 && (*i)->children[0]->children.size() == 0) )
- fillNodeGrid(nodeGrid, *i, 0);
- }
- }
-
- if (nodeGrid.size()==0)
- return;
-
- // find longest row
- size_t index_lr = 0;
- size_t maxSize=0;
-
- for (size_t n_x = 0; n_x < nodeGrid.size(); ++n_x)
- {
- size_t size = nodeGrid[n_x].size();
- if (size > maxSize)
- {
- maxSize = size;
- index_lr = n_x;
- }
- }
-
- grid = grid * (1/(1+sqrt(0.1*((double) maxSize))));
-
- // layout longest row
- for (unsigned int n_y = 0; n_y < nodeGrid[index_lr].size(); ++n_y)
- {
- Node* currentNode = nodeGrid[index_lr][n_y];
- currentNode->position.x = margin + 2. * margin * ((double) index_lr);
- // add safety margin according to size of sum of remaining daughter rows
- currentNode->position.y = grid * ((double) n_y + ((double) nodeGrid.size()-index_lr)/2. ) + border;
- }
-
- // layout mother rows, beginning at previous row
- for (size_t n_x = index_lr-1; n_x < nodeGrid.size(); --n_x)
- {
- double previous_y = -grid;
- for (unsigned int n_y = 0; n_y < nodeGrid[n_x].size(); ++n_y)
- {
- Node* currentNode = nodeGrid[n_x][n_y];
- currentNode->position.x = margin + 2. * margin * ((double) n_x);
-
- double mean_y_daughters = 0.;
- size_t n_mothers = 1;
- for (size_t n_child = 0; n_child < currentNode->children.size(); ++n_child)
- {
- mean_y_daughters += currentNode->children[n_child]->position.y;
- if (currentNode->children[n_child]->mothers.size()>1)
- n_mothers = currentNode->children[n_child]->mothers.size();
- }
- mean_y_daughters = mean_y_daughters / ((double) currentNode->children.size());
-
- //place mother at mean y position of all daughters, but at least one grid below previous one
- previous_y = std::max( std::max(0., previous_y + grid - 0.00001), mean_y_daughters + ((1. - (double) n_mothers)/2.)*grid ); // simple double-rounding protection
-
- currentNode->position.y = previous_y;
- }
- }
-
- // layout children rows, beginning at next row
- for (size_t n_x = index_lr+1; n_x < nodeGrid.size(); ++n_x)
- {
- double previous_y = -grid;
- for (unsigned int n_y = 0; n_y < nodeGrid[n_x].size(); ++n_y)
- {
- Node* currentNode = nodeGrid[n_x][n_y];
- currentNode->position.x = margin + 2. * margin * ((double) n_x);
-
- double mean_y_mothers = 0.;
- size_t n_sisters = 0;
- // normally, only one mother should be present
- for (size_t n_mother = 0; n_mother < currentNode->mothers.size(); ++n_mother)
- {
- mean_y_mothers += currentNode->mothers[n_mother]->position.y;
- n_sisters += currentNode->mothers[n_mother]->children.size();
- }
- if (currentNode->mothers.size() > 0)
- n_sisters = n_sisters/currentNode->mothers.size();
- if (currentNode->mothers.size() > 0)
- mean_y_mothers = mean_y_mothers / ((double) currentNode->mothers.size());
-
- //place 1st daughter 1/2 (or 1/n_chilren) grid position above mean y position of all mothers, but at least one grid below previous one
- previous_y = std::max( std::max(0., previous_y + grid - 0.00001), mean_y_mothers + ((1. -(double) n_sisters)/2.)*grid ); // simple double-rounding protection
- currentNode->position.y = previous_y;
- }
- }
-
-/*
- for (std::vector::iterator i = allNodes.begin(); i != allNodes.end(); i++)
- {
- countChildren(*i);
- (*i)->boxednodes = 0;
- }
-
- for (unsigned int n = 0 ; n != 1; n++)
- {
- for (std::vector::iterator i = allNodes.begin(); i != allNodes.end(); i++)
- {
- (*i)->active = true;
- }
-
- std::sort( allNodes.begin(), allNodes.end(), cmp2);
-
-
- layoutChildren(allNodes[0+n], 1.0);
- }
-*/
-}
-
-void AutoLayout::drawbox()
-{
-}
-
-void AutoLayout::layout_orphans()
-{
- double bottom = border;
- std::vector::iterator j;
-
- double max_y = -99999999999999.;
-
- for (j = allNodes.begin(); j != allNodes.end(); j++)
- {
-
-/* if ((*j)->position.y > bottom)
- {
- bottom = (*j)->position.y;
- }
-*/
- if ((*j)->children.size() == 1 && (*j)->mothers.size() == 0)
- {
- if ((*j)->children[0]->children.size() == 0)
- {
- orphans.push_back(*j);
- }
- }
- else
- {
- if ((*j)->children.size() == 0 && (*j)->mothers.size() == 1)
- if ((*j)->mothers[0]->mothers.size()==0)
- continue;
- if ((*j)->position.y > max_y)
- max_y = (*j)->position.y;
- }
- }
-
- bottom += max_y;
-
- int columns = (int)std::ceil(std::sqrt(orphans.size()/2.0));
- int col = 0;
- std::vector::iterator i;
-
- for (i = orphans.begin(); i != orphans.end(); i++)
- {
- (*i)->position.x = (margin + (col * 2 * margin));
- (*i)->position.y = (bottom);
- (*i)->children[0]->position.x = (margin + (col * 2 * margin)) + 70;
- (*i)->children[0]->position.y = (bottom);
- col ++;
-
- if (col == columns)
- {
- bottom += margin;
- col = 0;
- }
- }
-
-}
-// End new algorithm
-
-void AutoLayout::activateChildren()
-{
-
-// int n = 1, m = 1;
- std::vector v;
-
- std::vector::iterator i;
-
- for (i = allNodes.begin(); i != allNodes.end(); i++)
- {
- //v.push_back(*i);
- countChildren(*i);
-
- }
- for (i = allNodes.begin(); i != allNodes.end(); i++)
- {
- //Node* node2 = *i;
- //v.push_back(*i);
- }
-
-
- for (i = activeNodes.begin(); i != activeNodes.end(); i++)
- {
- Node* node = *i;
- double g = grid * 0.9;
- double y = -g/2.0;
-
- const double step = g / node->children.size();
-
- if (node->children.size() == 0)
- y = 0.0;
-
- std::vector::iterator j;
-
-
- for (j = node->children.begin(); j != node->children.end(); j++)
- {
- y += step;
- Node* child = *j;
-
- if (child->active == false)
- {
- child->active = true;
-
- v.push_back(*j);
-
-
- /*
- if (child->numberchildren > 3)
- {
-
- child->position = node->position + Vector2(grid, (50/m)*y*pow(-1,n));
- n++;
- m++;
-// std::cout<< countChildren(*j) << std::endl;
-
- }
- else
- */
- child->position = node->position + Vector2(grid, y);
-
-
-
- }
- }
-
- }
-
- activeNodes.clear();
- for (i = allNodes.begin(); i != allNodes.end(); i++)
- {
-
-
- if ((*i)->active)
- activeNodes.push_back(*i);
- }
-
-
- _levels --;
-}
-
-
-
-void AutoLayout::layoutSteps()
-{
- for (int i = 0; i < _steps; i++)
- {
- reset();
- resolveOverlaps();
- //resolveBackpointingChildren();
- applyGravity();
- applyProximityForces();
- applyFrictionForces();
- applySpringForces();
- applyInitialConstraints();
- step();
-
- if (isStable())
- {
- if (activeNodes.size() == allNodes.size())
- {
- //std::cout << "all nodes stable: " << allNodes.size() << ", activeNodes: " << activeNodes.size() << std::endl;
- break;
- }
- else
- {
- //std::cout << "all nodes activate: " << allNodes.size() << ", activeNodes: " << activeNodes.size() << std::endl;
- activateChildren();
- i = 0;
- }
- }
- else if (i == (_steps-1) && (activeNodes.size() != allNodes.size()) && (_levels >= 0))
- {
- i = 0;
- //std::cout << "all nodes: " << allNodes.size() << ", activeNodes: " << activeNodes.size() << std::endl;
- activateChildren();
- }
- }
-
-}
-void AutoLayout::layout(bool forceBased)
-{
- if (forceBased)
- {
- placeInitials();
- layoutSteps();
- layout_orphans();
- }
- else
- {
- new_initial();
- layout_orphans();
- }
-
-}
-
-/*
-void AutoLayout::commitPositions()
-{
- double offset = 1.0e32;
-
- std::vector::iterator i;
-
- for (i = allNodes.begin(); i != allNodes.end(); i++)
- {
- if ((*i)->position.y < offset)
- offset = (*i)->position.y;
- }
-
- double bottom = 0;
- for (i = allNodes.begin(); i != allNodes.end(); i++)
- {
- (*i)->commitPositions(margin - offset);
- double y = (*i)->position.y + margin - offset;
- if (y > bottom)
- bottom = y;
- }
-
- // layout orphans
- bottom += margin;
- int columns = (int)std::ceil(std::sqrt(orphans.size()/2.0));
- int col = 0;
- std::vector::iterator j;
- for (j = orphans.begin(); j != orphans.end(); j++)
- {
- pxl::Relative *object = *j;
- object->layout()->setA(margin + (col * 2 * margin));
- object->layout()->setB(bottom);
- object->layout()->setC(margin + (col * 2 * margin + margin));
- object->layout()->setD(bottom);
-
- col ++;
-
- if (col == columns)
- {
- bottom += margin;
- col = 0;
- }
- }
-}
-*/
-
-} // namespace pxl
diff --git a/astro/CMakeLists.txt b/astro/CMakeLists.txt
deleted file mode 100644
index 66ab6d6944538ea39be648321b7df93c267c1516..0000000000000000000000000000000000000000
--- a/astro/CMakeLists.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# use local include directory
-#
-include_directories (
- include
- ${PXL_SOURCE_DIR}/core/include
- ${CMAKE_BINARY_DIR}/include
-)
-
-#
-# add library using the sources
-#
-add_library (pxl-astro SHARED
- src/Astro.cc
- src/AstroBasicObject.cc
- src/AstroObject.cc
- src/RegionOfInterest.cc
- src/UHECR.cc
- src/UHECRSource.cc
- src/CoordinateTransformations.cc
-)
-
-
-#
-# astro depends only on pxl core
-#
-add_dependencies(pxl-astro pxl-core)
-
-#
-# link to pxl
-#
-target_link_libraries (pxl-astro pxl-core)
-
-#
-# setup install path
-#
-PXL_INSTALL_LIBRARY(pxl-astro)
-
-
-#
-# set library properties for Mac OS X
-#
-SET_XCODE_FRAMEWORK_PROPERTIES(pxl-astro)
-
-
-#
-# pxl-healpix includes the healpix part, which is under GPL
-#
-OPTION(USE_HEALPIX "Build the healpix library, which is under GPL" TRUE)
-
-if (USE_HEALPIX)
- add_library (pxl-healpix SHARED
- src/Healpix.cc
- src/HealpixMap.cc
- )
- add_dependencies(pxl-healpix pxl-astro pxl-core)
- target_link_libraries (pxl-healpix pxl-astro pxl-core)
-
- PXL_INSTALL_LIBRARY(pxl-healpix)
- SET_XCODE_FRAMEWORK_PROPERTIES(pxl-healpix)
-endif(USE_HEALPIX)
-
-
-
diff --git a/astro/astro.vcproj b/astro/astro.vcproj
deleted file mode 100644
index e5593889b9a7effa7b479534cc38ac23af8b01c2..0000000000000000000000000000000000000000
--- a/astro/astro.vcproj
+++ /dev/null
@@ -1,237 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/astro/include/pxl/astro.hh b/astro/include/pxl/astro.hh
deleted file mode 100644
index 02d366a92a3abf77be4edfd293ec6cfc5f64dd72..0000000000000000000000000000000000000000
--- a/astro/include/pxl/astro.hh
+++ /dev/null
@@ -1,21 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#ifndef astro_hh
-#define astro_hh
-
-#include "pxl/astro/Astro.hh"
-#include "pxl/astro/AstroBasicObject.hh"
-#include "pxl/astro/AstroObject.hh"
-#include "pxl/astro/UHECR.hh"
-#include "pxl/astro/RegionOfInterest.hh"
-#include "pxl/astro/UHECRSource.hh"
-#include "pxl/astro/CoordinateTransformations.hh"
-
-#endif // ----- #ifndef ASTRO_INC -----
-
diff --git a/astro/include/pxl/astro/AstroBasicObject.hh b/astro/include/pxl/astro/AstroBasicObject.hh
deleted file mode 100644
index 6351ffbe2bbc494b7b080beb6f8398bd8c713a6f..0000000000000000000000000000000000000000
--- a/astro/include/pxl/astro/AstroBasicObject.hh
+++ /dev/null
@@ -1,234 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#ifndef PXL_ASTRO_ASTRO_BASIC_OBJECT_HH
-#define PXL_ASTRO_ASTRO_BASIC_OBJECT_HH
-#include "pxl/core/macros.hh"
-
-#include "pxl/core/Basic3Vector.hh"
-#include "pxl/core/Serializable.hh"
-#include "pxl/core/ObjectFactory.hh"
-#include "pxl/core/Id.hh"
-#include "pxl/astro/CoordinateTransformations.hh"
-
-namespace pxl
-{
-class BasicContainer;
-
-/**
- This Class contains basic astrophysical objects, observed at a
- direction at a given time. The direction is stored as a vector with 3
- comonents in galactic coordinates, using longitude (-pi..pi) and
- latitude (-pi/2 .. pi/2). Equatorial Coordinates are calculated on the
- fly and returned as right ascension (-pi..pi) and declination (-pi/2
- .. pi/2).
- */
-class PXL_DLL_EXPORT AstroBasicObject : public Serializable
-{
-public:
- AstroBasicObject() : Serializable(), _time(0),_vector(1,0,0),_dAngularResolution(0),_dDummy(0)
- {
- }
-
- AstroBasicObject(double longitude, double latitude) : Serializable(), _time(0),_vector(1,0,0),_dAngularResolution(0),_dDummy(0)
- {
- setGalacticCoordinates(longitude,latitude);
- }
-
- AstroBasicObject(const Basic3Vector& vector) : Serializable(), _time(0),_vector(vector),_dAngularResolution(0),_dDummy(0)
- {
- }
-
-
- AstroBasicObject(const AstroBasicObject& original) :
- Serializable(), _time(original._time),
- _vector(original._vector),_dAngularResolution(original._dAngularResolution), _dDummy(original._dDummy)
- {
- }
-
- explicit AstroBasicObject(const AstroBasicObject* original) :
- Serializable(), _time(original->_time),
- _vector(original->_vector),_dAngularResolution(original->_dAngularResolution), _dDummy(original->_dDummy)
- {
- }
-
- virtual ~AstroBasicObject()
- {
- }
-
-
- /// Prints out some information about the AstroBasicObject
- virtual std::ostream& print(int level=1, std::ostream& os=std::cout, int pan=1) const;
-
- /// Set position in galactic corrdinates
- void setGalacticCoordinates(double longitude,double latitude);
-
- void setSuperGalacticCoordinates(double longitude,double latitude);
-
- /// Set position in equatorial coordinates
- void setEquatorialCoordinates(double ra,double d, CoordinateTransformations::Epoque_T epoque=CoordinateTransformations::J2000);
-
- void setEquatorialCoordinates( unsigned int hours, unsigned int minutes, double seconds,
- int degree, int moa, double soa, CoordinateTransformations::Epoque_T epoque);
-
- /// Sets an error for the angular resolution
- inline void setAngularResolution(double value)
- {
- _dAngularResolution = value;
- }
-
- /// returns the error on the longitude
- inline double getAngularResolution()
- {
- return _dAngularResolution;
- }
-
- ///Sets a time asoziated with the observation in Unix time format
- inline void setTime(const time_t &time)
- {
- _time = time;
- }
-
- ///Returns the Declination
- double getRightAscension(CoordinateTransformations::Epoque_T epoque=CoordinateTransformations::J2000) const;
-
- ///Returns the Declination
- double getDeclination(CoordinateTransformations::Epoque_T epoque=CoordinateTransformations::J2000) const;
-
- ///Returns the longitude in super galactic coordinates
- double getSuperGalacticLongitude() const;
-
- ///Returns the latitude in super galactic coordinates
- double getSuperGalacticLatitude() const;
-
- ///Returns the longitude in galactic coordinates
- double getGalacticLongitude() const;
-
- ///Returns the latitude in galactic coordinates
- double getGalacticLatitude() const;
-
- ///Sets the components of the direction of the object
- void setSuperGalacticXYZ(double x, double y, double z)
- {
- Basic3Vector v(x,y,z);
- v.normalize();
- setSuperGalacticDirectionVector(v);
- }
-
- ///Sets the components of the direction of the object
- void setEquatorialXYZ(double x, double y, double z)
- {
- Basic3Vector v(x,y,z);
- v.normalize();
- setEquatorialDirectionVector(v);
- }
-
- ///Sets the components of the direction of the object
- void setGalacticXYZ(double x, double y, double z)
- {
- _vector.setXYZ(x,y,z);
- //normalize vector
- _vector.normalize();
- }
-
- ///Sets the direction vector of the object in Galactic Coordinates
- void setGalacticDirectionVector(const Basic3Vector& vector)
- {
- _vector = vector;
- _vector/=sqrt(_vector*_vector);
- }
-
- ///Returns the 3component Vector of the direction of the object in
- ///galactic cordinates
- inline const Basic3Vector& getGalacticDirectionVector() const
- {
- return _vector;
- }
-
- ///Sets the direction vector of the object in super galactic coordinates
- inline void setSuperGalacticDirectionVector(const Basic3Vector& vector)
- {
- _vector = vector;
- _vector = CoordinateTransformations::convertSuperGalactic2Galactic(_vector);
- _vector/=sqrt(_vector*_vector);
- }
-
- ///Returns the 3component Vector of the direction of the object in
- ///super galactic coordinates
- inline Basic3Vector getSuperGalacticDirectionVector() const
- {
- Basic3Vector _result = CoordinateTransformations::convertGalactic2SuperGalactic(_vector);
- return _result;
- }
-
-
- ///Sets the direction vector of the object in equatorial coordinates
- inline void setEquatorialDirectionVector(const Basic3Vector& vector)
- {
- _vector = vector;
- _vector = CoordinateTransformations::convertEquatorial2Galactic(_vector);
- _vector/=sqrt(_vector*_vector);
- }
-
- ///Returns the 3component Vector of the direction of the object in
- ///equatorial coordinates
- inline Basic3Vector getEquatorialDirectionVector() const
- {
- Basic3Vector _result = CoordinateTransformations::convertGalactic2Equatorial(_vector);
- return _result;
- }
-
-
- ///Returns a UNIX time assoziated witnh the object
- inline time_t getTime() const
- {
- return _time;
- }
-
- /// Returns the angular distance to given object
- double angularDistanceTo(const AstroBasicObject &obj) const;
- ///
- double angularDistanceTo(const Basic3Vector &obj) const;
- /// Returns the angular distance to given object
- double angularDistanceTo(const AstroBasicObject *obj) const;
-
- /// Returns the Type Id of the Serializable derivative
- virtual const Id& getTypeId() const
- {
- return getStaticTypeId();
- }
-
- /// Returns the Type Id of the Serializable derivative
- static const Id& getStaticTypeId()
- {
- static const Id id("033dfe86-1a17-767a-8dd9-2877496dab5f");
- return id;
- }
-
- /// Serializes the Object
- virtual void serialize(const OutputStream &out) const;
-
- /// Deserializes the Object
- virtual void deserialize(const InputStream &in);
-
- /// Creates a deep copy and returns a C++ pointer to the newly-created object.
- virtual Serializable* clone() const
- {
- return new AstroBasicObject(*this);
- }
-
-private:
- time_t _time; /// A UNIX time asoziated with the obhject
- Basic3Vector _vector; /// The direction of the Object
- double _dAngularResolution; /// Angluar error
- double _dDummy; /// Currently not used double, not removed due to compatibility
-};
-
-}
-
-#endif // ----- #ifndef ASTROBASICOBJECT_INC -----
diff --git a/astro/include/pxl/astro/AstroObject.hh b/astro/include/pxl/astro/AstroObject.hh
deleted file mode 100644
index c2e59aa092590d05454e7198775b184317c2cd9f..0000000000000000000000000000000000000000
--- a/astro/include/pxl/astro/AstroObject.hh
+++ /dev/null
@@ -1,126 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#ifndef PXL_ASTRO_ASTRO_OBJECT_HH
-#define PXL_ASTRO_ASTRO_OBJECT_HH
-#include "pxl/core/macros.hh"
-
-#include "pxl/core/UserRecord.hh"
-#include "pxl/core/SoftRelations.hh"
-#include "pxl/astro/AstroBasicObject.hh"
-
-namespace pxl
-{
-/**
- AstroBasicObject with UserRecord and SoftRelations.
- */
-
-class PXL_DLL_EXPORT AstroObject : public AstroBasicObject, public UserRecordHelper
-{
-public:
- AstroObject() : AstroBasicObject()
- {
- }
-
- /// Copy constructor. SoftRelations are not copied since they only exist
- /// between individual objects
- AstroObject(const AstroObject& original) :
- AstroBasicObject(original), UserRecordHelper(original)
- {
- }
-
- /// Copy constructor. SoftRelations are not copied since they only exist
- /// between individual objects
- explicit AstroObject(const AstroObject* original) :
- AstroBasicObject(original), UserRecordHelper(*original)
- {
-
- }
-
- AstroObject(const AstroBasicObject& original) :
- AstroBasicObject(original)
- {
- }
-
- explicit AstroObject(const AstroBasicObject* original) :
- AstroBasicObject(original)
- {
- }
-
- AstroObject(double longitude, double latitude) : AstroBasicObject(longitude, latitude)
- {
- }
-
- AstroObject(const Basic3Vector& vector) : AstroBasicObject(vector)
- {
- }
-
-
- virtual ~AstroObject()
- {
- }
-
- virtual void serialize(const OutputStream &out) const;
-
- virtual void deserialize(const InputStream &in);
-
- ///returns the type id of the AstroObject
- virtual const Id& getTypeId() const
- {
- return getStaticTypeId();
- }
-
- ///returns the type id of the AstroObject
- static const Id& getStaticTypeId()
- {
- static const Id id("115a29d6-ecfe-37bc-b647-937d49705165");
- return id;
- }
-
- /// Creates a deep copy and returns a C++ pointer to the newly-created object.
- virtual Serializable* clone() const
- {
- return new AstroObject(*this);
- }
-
- /// Create a bi-directional softlink between two astroobjects
- void linkSoft(AstroObject* astroobject, const std::string& type);
- /// Create a bi-directional softlink between two astroobjects
- void linkSoft(AstroObject& astroobject, const std::string& type);
-
- ///Removes the Softlink from the object
- void unlinkSoft(AstroObject* astroobject, const std::string& type);
- ///Removes the Softlink from the object
- void unlinkSoft(AstroObject& astroobject, const std::string& type);
-
- ///Returns the Soft relations of the object
- const SoftRelations& getSoftRelations() const
- {
- return _softRelations;
- }
-
- ///Returns the Soft relations of the object
- SoftRelations& getSoftRelations()
- {
- return _softRelations;
- }
-
-
-private:
- SoftRelations _softRelations;
-
- // Make AstroObject private since it's not clear how copied
- // SoftRelations should be managed
- AstroObject& operator=(const AstroObject& original)
- {
- return *this;
- }
-};
-
-}
-#endif
diff --git a/astro/include/pxl/astro/CoordinateTransformations.hh b/astro/include/pxl/astro/CoordinateTransformations.hh
deleted file mode 100644
index 15b8e1129d0ce46f125e7074753184e4affd43f2..0000000000000000000000000000000000000000
--- a/astro/include/pxl/astro/CoordinateTransformations.hh
+++ /dev/null
@@ -1,56 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#ifndef PXL_ASTRO_COORDINATETRANSFORMATIONS_HH
-#define PXL_ASTRO_COORDINATETRANSFORMATIONS_HH
-#include "pxl/core/macros.hh"
-
-#include
-#include
-#include "pxl/core/Basic3Vector.hh"
-#include "pxl/core/BasicMatrix.hh"
-namespace pxl
-{
-/// Implements various transformations for astronomical coordinates
-class PXL_DLL_EXPORT CoordinateTransformations
-{
-private:
- ///Rotation matrices for conversion
- static double _R1950[9];
- static double _R2000[9];
- static double _SG[9];
-
-public:
- enum Epoque_T
- {
- J1950, J2000
- };
-
- /// Rotates the direction given by vec from Galactic coordinates to equatorial coordinates
- static Basic3Vector convertGalactic2Equatorial(const Basic3Vector& vec,
- Epoque_T epoque = J2000);
- static Basic3Vector convertEquatorial2Galactic(const Basic3Vector& vec,
- Epoque_T epoque = J2000);
-
- static Basic3Vector convertSuperGalactic2Equatorial(const Basic3Vector& vec,
- Epoque_T epoque = J2000);
- static Basic3Vector convertEquatorial2SuperGalactic(const Basic3Vector& vec,
- Epoque_T epoque = J2000);
-
- static Basic3Vector convertGalactic2SuperGalactic(const Basic3Vector& vec);
-
- static Basic3Vector convertSuperGalactic2Galactic(const Basic3Vector& vec);
- static double timeAngle2Radian(unsigned int hours, unsigned int minutes,
- double seconds);
- static double minutesOfArc2Radian(int degree, int minutes, double seconds);
-
-};
-}
-
-#endif
-
diff --git a/astro/include/pxl/astro/Healpix.hh b/astro/include/pxl/astro/Healpix.hh
deleted file mode 100644
index d194a42a4e0b8d087f9ae6adc67e0f832bf5a2e9..0000000000000000000000000000000000000000
--- a/astro/include/pxl/astro/Healpix.hh
+++ /dev/null
@@ -1,26 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a GPL-2 or later license -
-//-------------------------------------------
-
-#ifndef INITIALIZE_HEALPIX_HH
-#define INITIALIZE_HEALPIX_HH
-
-#include "pxl/core/macros.hh"
-
-namespace pxl
-{
-class PXL_DLL_EXPORT Healpix
-{
-public:
- static void initialize();
- static void shutdown();
-
-};
-
-}
-
-#endif /* INITIALIZE_HEALPIX_HH_*/
diff --git a/astro/include/pxl/astro/HealpixMap.hh b/astro/include/pxl/astro/HealpixMap.hh
deleted file mode 100644
index 527b11733433c95b574a7ec10d3163054969dd7c..0000000000000000000000000000000000000000
--- a/astro/include/pxl/astro/HealpixMap.hh
+++ /dev/null
@@ -1,206 +0,0 @@
-// HealpixMap.hh, 12.06.10
-//
-// This defines the class HealPixMap which provides a very
-// basic Hierarchical Equal Area isoLatitude Pixelization (HEALPIX) of a
-// sphere, based on the original NASA implementation which is available
-// on http://healpix.jpl.nasa.gov.
-//
-// This part of PXL is published unter the GNU GPL v3 as it is based on NASA
-// Healpix, which is published under the GNU GPL v2. It therefore cannot
-// be combined with PXL without making the resulting license GPL.
-//
-// This is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This Software is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this software; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-//
-
-#ifndef PXL_ASTRO_HEALPIXMAP_HH
-#define PXL_ASTRO_HEALPIXMAP_HH
-#include "pxl/core/macros.hh"
-
-#include
-#include
-#include
-#include
-#include "pxl/core/macros.hh"
-#include "pxl/core/Basic3Vector.hh"
-#include "pxl/core/BasicNVector.hh"
-#include "pxl/core/UserRecord.hh"
-
-namespace pxl
-{
-
-class PXL_DLL_EXPORT HealpixMap : public BasicNVector, public UserRecordHelper
-{
-public:
-
- HealpixMap() : BasicNVector(), _order(0), _npix(0), _ncap(0), _nside(0), _npface(0), _fact1(0), _fact2(0)
- {
- _calculateInternalConstants();
- this->setSize(_npix);
- }
-
- HealpixMap(const HealpixMap& original) : BasicNVector(original), UserRecordHelper(original), _order(original._order),
- _npix(original._npix), _ncap(original._ncap), _nside(original._nside), _npface(original._npface),
- _fact1(original._fact1), _fact2(original._fact2)
- {
- }
-
- explicit HealpixMap(const HealpixMap* original) : BasicNVector(original), UserRecordHelper(*original), _order(original->_order),
- _npix(original->_npix), _ncap(original->_ncap), _nside(original->_nside), _npface(original->_npface),
- _fact1(original->_fact1), _fact2(original->_fact2)
- {
- }
-
- /// Creates a deep copy and returns a C++ pointer to the newly-created object.
- virtual Serializable* clone() const
- {
- return new HealpixMap(*this);
- }
-
- HealpixMap(int order);
-
- void serialize(const OutputStream &out) const;
- void deserialize(const InputStream &in);
-
- ///returns the type id of the HealpixMap
- virtual const Id& getTypeId() const
- {
- return getStaticTypeId();
- }
-
- ///returns the type id of the AstroObject
- static const Id& getStaticTypeId()
- {
- // 9ffee9f7-942d-d259-ea98-6ddd0001f549 was used as Id before
- // Octobre 2013. The numbering system was changed between the two
- // versions; it is now compatible with healpy.
- static const Id id("58488649-3229-4c28-a024-f01a8038cd5d");
- return id;
- }
-
- int getOrder() const
- {
- return _order;
- }
-
- int getNumberOfPixels() const
- {
- return _npix;
- }
-
- static int getNumberOfPixels(unsigned int i);
-
- /// Returns pixelnumber of pixel
- int vector2Pixel (const Basic3Vector &vec) const;
-
- /// Get pixelnumbers of neighbors
- void getNeighbors(int pix, std::vector &result) const;
-
- /// Returns Pixels in a cone around Basic3Vector with radius r - this
- /// is the equivalent to healpixbase query_disc
- void getPixelsInCone(const Basic3Vector& coneCenter, double radius, std::vector& listpix) const;
-
- /// returns a vector pointing to center of the given pixel
- Basic3Vector pixel2Vector(int pixel) const;
-
- /// sets Vector if pixels match
- void setVector(const BasicNVector &v)
- {
- if (v.getSize() != _npix)
- throw std::runtime_error("Vector size doesnt match number of pixels");
- BasicNVector::operator=(v);
- }
-
- inline const HealpixMap& operator+=(const HealpixMap& vec)
- {
- BasicNVector::operator+=(vec); return *this;
- }
-
- inline const HealpixMap& operator-=(const HealpixMap& vec)
- {
- BasicNVector::operator-=(vec); return *this;
- }
-
- HealpixMap operator-(const HealpixMap&) const;
- HealpixMap operator+(const HealpixMap&) const;
-
- const HealpixMap& operator*=(double skalar)
- {
- BasicNVector::operator*=(skalar); return *this;
- };
- const HealpixMap& operator/=(double skalar)
- {
- BasicNVector::operator/=(skalar); return *this;
- };
-
-private:
- unsigned int _order; // The Healpix Order (Sometimes refered to as _NSide)
- int _npix; // The number of pixels
- int _ncap;
- int _nside;
- int _npface;
- double _fact1;
- double _fact2;
- void _calculateInternalConstants();
-
- // needed for neighbor calculation
- void ring2xyf (int pix, int &ix, int &iy, int &face_num) const;
- int xyf2ring (int ix, int iy, int face_num) const;
-
- // Returns the remainder of the division v1/v2.
- // The result is non-negative.
- // v1 can be positive or negative; v2 must be positive.
- double fmodulo (double v1, double v2) const
- {
- return (v1>=0) ? ((v1 I imodulo (I v1, I v2) const
- { return (v1>=0) ? ((v1 unsigned int isqrt (I arg) const
- {
- using namespace std;
- if (sizeof(I)<=4)
- return unsigned (sqrt(arg+0.5));
- long double arg2 = arg;
- return unsigned (sqrt(arg2+0.5));
- }
-
- // Returns atan2(y,x) if x!=0 or y!=0; else returns 0.
- double safe_atan2 (double y, double x) const
- {
- using namespace std;
- return ((x==0.) && (y==0.)) ? 0.0 : atan2(y,x);
- }
-
- // Returns the largest integer which is smaller than (or equal to) arg.
- template I ifloor (F arg) const
- {
- return (arg>=0) ? I(arg) : I(arg)-1;
- }
-
- void in_ring(int iz, double phi0, double dphi, std::vector &listir) const;
-
- int ring_above (double z) const;
-
-};
-
-}
-
-#endif
diff --git a/astro/include/pxl/astro/RegionOfInterest.hh b/astro/include/pxl/astro/RegionOfInterest.hh
deleted file mode 100644
index 126f2473637bd5115bf1c914f7744f3167d9b02e..0000000000000000000000000000000000000000
--- a/astro/include/pxl/astro/RegionOfInterest.hh
+++ /dev/null
@@ -1,138 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#ifndef PXL_ASTRO_REGION_OF_INTEREST_HH
-#define PXL_ASTRO_REGION_OF_INTEREST_HH
-#include "pxl/core/macros.hh"
-
-#include "pxl/astro/AstroObject.hh"
-#include
-#include
-
-namespace pxl
-{
-/**
- RegionOfInterest are interesting regions in the sky, which can be
- named and related to other AstroObjects with SoftRelations. The region
- is defined by a cone center, the position of the RegionOfInterest, and
- an angular distance,i.e. the "radius" of the cone.
- */
-
-class PXL_DLL_EXPORT RegionOfInterest: public AstroObject
-{
-public:
-
- RegionOfInterest() : AstroObject(), _coneRadius(0.0), _name("ROI")
- {
- }
-
- RegionOfInterest(const RegionOfInterest& original) :
- AstroObject(original), _coneRadius(original._coneRadius), _name(original._name)
- {
- }
-
- explicit RegionOfInterest(const RegionOfInterest* original) :
- AstroObject(original), _coneRadius(original->_coneRadius), _name(original->_name)
- {
- }
-
- RegionOfInterest(const AstroBasicObject& original,double coneRadius=0.0, std::string name="ROI") :
- AstroObject(original), _coneRadius(coneRadius), _name(name)
- {
- }
-
- explicit RegionOfInterest(const AstroBasicObject* original, double coneRadius=0.0, const std::string &name = "ROI") :
- AstroObject(original), _coneRadius(coneRadius), _name(name)
- {
- }
-
- RegionOfInterest(double longitude, double latitude, double coneRadius=0.0, const std::string &name= "ROI") : AstroObject(longitude, latitude), _coneRadius(coneRadius), _name(name)
- {
- }
-
- RegionOfInterest(const Basic3Vector& vector, double coneRadius=0.0, const std::string &name= "ROI") : AstroObject(vector), _coneRadius(coneRadius), _name(name)
- {
- }
-
- virtual ~RegionOfInterest()
- {
- }
-
- virtual void serialize(const OutputStream &out) const;
-
- virtual void deserialize(const InputStream &in);
-
- virtual const Id& getTypeId() const
- {
- return getStaticTypeId();
- }
-
- static const Id& getStaticTypeId()
- {
- static const Id id("201e9d8b-561a-c349-bb65997c49e757a6");
- return id;
- }
-
- /// Creates a deep copy and returns a C++ pointer to the newly-created object.
- virtual Serializable* clone() const
- {
- return new RegionOfInterest(*this);
- }
-
- /// Prints out some information about the Region Of Interst
- virtual std::ostream& print(int level=1, std::ostream& os=std::cout, int pan=1) const;
-
- ///Returns the size of the RegionOfInterest
- inline double getConeRadius() const
- {
- return _coneRadius;
- }
-
- ///Returns the name of the region of interest
- inline std::string getName() const
- {
- return _name;
- }
-
- /// Sets the size of the region of interest
- inline void setConeRadius(double coneRadius)
- {
- _coneRadius= coneRadius;
- }
-
- ///Names the region of interest
- inline void setName(std::string name)
- {
- _name = name;
- }
-
- /// Return value is true, if the object is within the cone radius
- bool objectInCone(const AstroBasicObject& obj) const;
- /// Return value is true, if the object is nearer than the cone radius
- bool objectInCone(const AstroBasicObject* obj) const;
-
- /// Creates a soft link between the RegionOfInterest, if the object is
- /// nearer than the cone size of the RegionOfInterest
- bool linkIfObjectInCone(AstroObject& obj,std::string name="") ;
- /// Creates a soft link between the RegionOfInterest, if the object is
- /// nearer than the cone size of the RegionOfInterest
- bool linkIfObjectInCone(AstroObject* obj,std::string name="") ;
-
-private:
- double _coneRadius; /// The Cone Size of the ROI
- std::string _name; /// The name of the ROI
-
- RegionOfInterest& operator=(const RegionOfInterest& original)
- {
- return *this;
- }
-};
-}
-//namespace pxl
-
-#endif
diff --git a/astro/include/pxl/astro/UHECR.hh b/astro/include/pxl/astro/UHECR.hh
deleted file mode 100644
index 0e7ce06d6a374ce73c40ec03feb0561f831e5a2d..0000000000000000000000000000000000000000
--- a/astro/include/pxl/astro/UHECR.hh
+++ /dev/null
@@ -1,131 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#ifndef PXL_ASTRO_UHECR_HH
-#define PXL_ASTRO_UHECR_HH
-#include "pxl/core/macros.hh"
-
-#include "pxl/astro/AstroObject.hh"
-#include
-
-namespace pxl
-{
-/**
- A class for Ultra-High-Energy Cosmic Rays, with energy, mass and charge
- */
-
-class PXL_DLL_EXPORT UHECR : public AstroObject
-{
-public:
-
- UHECR() : AstroObject(), _energy(0.), _denergy(0.), _mass(0.), _charge(0.)
- {
- }
-
- UHECR(const UHECR& original) :
- AstroObject(original), _energy(original._energy), _denergy(original._denergy), _mass(original._mass), _charge(original._charge)
- {
- }
-
- explicit UHECR(const UHECR* original) :
- AstroObject(original), _energy(original->_energy), _denergy(original->_denergy), _mass(original->_mass), _charge(original->_charge)
- {
- }
-
- UHECR(double longitude, double latitude, double energy=0.) : AstroObject(longitude, latitude), _energy(energy)
- {
- }
-
- UHECR(const Basic3Vector& vector, double energy=0.) : AstroObject(vector), _energy(energy)
- {
- }
-
-
- virtual ~UHECR()
- {
- }
-
- virtual void serialize(const OutputStream &out) const;
-
- virtual void deserialize(const InputStream &in);
-
- virtual const Id& getTypeId() const
- {
- return getStaticTypeId();
- }
-
- static const Id& getStaticTypeId()
- {
- static const Id id("a4d8433f-fa90-06e9-9c28-8d784974c1f9");
- return id;
- }
-
- /// Creates a deep copy and returns a C++ pointer to the newly-created object.
- virtual Serializable* clone() const
- {
- return new UHECR(*this);
- }
-
- /// Prints out some information about the CR
- virtual std::ostream& print(int level=1, std::ostream& os=std::cout, int pan=1) const;
-
- inline double getEnergyError() const
- {
- return _denergy;
- }
-
- inline double getEnergy() const
- {
- return _energy;
- }
-
- inline double getCharge() const
- {
- return _charge;
- }
-
- inline double getMass() const
- {
- return _mass;
- }
-
- inline void setEnergy(double energy)
- {
- _energy= energy;
- }
-
- inline void setEnergyError(double denergy)
- {
- _denergy= denergy;
- }
-
- inline void setMass(double mass)
- {
- _mass = mass;
- }
-
- inline void setCharge(double charge)
- {
- _charge = charge;
- }
-
-private:
- double _energy;
- double _denergy;
- double _mass;
- double _charge;
-
- UHECR& operator=(const UHECR& original)
- {
- return *this;
- }
-};
-}
-//namespace pxl
-
-#endif
diff --git a/astro/include/pxl/astro/UHECRSource.hh b/astro/include/pxl/astro/UHECRSource.hh
deleted file mode 100644
index b2f305664100675bc94615a4fc0b9964d8aaf3e5..0000000000000000000000000000000000000000
--- a/astro/include/pxl/astro/UHECRSource.hh
+++ /dev/null
@@ -1,145 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#ifndef PXL_ASTRO_SOURCE_HH
-#define PXL_ASTRO_SOURCE_HH
-#include "pxl/core/macros.hh"
-
-#include "pxl/astro/AstroObject.hh"
-#include
-#include
-
-namespace pxl
-{
-/**
- UHECRSource are objects in the sky, which can be
- named and related to other AstroObjects with SoftRelations,but have a distance and a luminosity
- */
-
-class PXL_DLL_EXPORT UHECRSource: public AstroObject
-{
-public:
-
- UHECRSource() : AstroObject(), _luminosity(1.0), _distance(1.0), _name("Source")
- {
- }
-
- UHECRSource(const UHECRSource& original) :
- AstroObject(original), _luminosity(original._luminosity), _distance(original._distance),
- _name(original._name)
- {
- }
-
- explicit UHECRSource(const UHECRSource* original) :
- AstroObject(original),_luminosity(original->_luminosity), _distance(original->_distance),
- _name(original->_name)
- {
- }
-
- UHECRSource(double longitude, double latitude, double distance=1., double luminosity=1.) : AstroObject(longitude, latitude), _luminosity(luminosity), _distance(distance), _name("Source")
- {
- }
-
- UHECRSource(const Basic3Vector& vector, double distance=1., double luminosity=1.) : AstroObject(vector), _luminosity(luminosity), _distance(distance), _name("Source")
- {
- }
-
- virtual ~UHECRSource()
- {
- }
-
- virtual void serialize(const OutputStream &out) const;
-
- virtual void deserialize(const InputStream &in);
-
- virtual const Id& getTypeId() const
- {
- return getStaticTypeId();
- }
-
- static const Id& getStaticTypeId()
- {
- static const Id id("0855b033-8b1a-c7e0-c816e0044b041bff");
- return id;
- }
-
- /// Creates a deep copy and returns a C++ pointer to the newly-created object.
- virtual Serializable* clone() const
- {
- return new UHECRSource(*this);
- }
-
- /// Prints out some information about the CR
- virtual std::ostream& print(int level=1, std::ostream& os=std::cout, int pan=1) const;
-
- inline double getLuminosity() const
- {
- return _luminosity;
- }
-
- inline double getDistance() const
- {
- return _distance;
- }
-
- inline std::string getName() const
- {
- return _name;
- }
-
- inline void setDistance(double distance)
- {
- _distance = distance;
- }
-
- inline void setLuminosity(double luminosity)
- {
- _luminosity = luminosity;
- }
-
- void setName(std::string name)
- {
- _name = name;
- }
-
- void setGalacticXYZ(double x, double y, double z)
- {
- AstroBasicObject::setGalacticXYZ(x,y,z);
- //Set Distance
- _distance = sqrt(x*x + y*y + z*z);
- }
-
- void setSuperGalacticXYZ(double x, double y, double z)
- {
- AstroBasicObject::setSuperGalacticXYZ(x,y,z);
- //Set Distance
- _distance = sqrt(x*x + y*y + z*z);
- }
-
- void setEquatorialXYZ(double x, double y, double z)
- {
- AstroBasicObject::setEquatorialXYZ(x,y,z);
- //Set Distance
- _distance = sqrt(x*x + y*y + z*z);
- }
-
-
-private:
- double _luminosity;
- double _distance;
- std::string _name;
-
- UHECRSource& operator=(const UHECRSource& original)
- {
- return *this;
- }
-};
-}
-//namespace pxl
-
-#endif
diff --git a/astro/include/pxl/healpix.hh b/astro/include/pxl/healpix.hh
deleted file mode 100644
index d9b8e22c3989030db01c239e5f644bb2b27d2353..0000000000000000000000000000000000000000
--- a/astro/include/pxl/healpix.hh
+++ /dev/null
@@ -1,16 +0,0 @@
- //-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#ifndef healpix_hh
-#define healpix_hh
-
-#include "pxl/astro/Healpix.hh"
-#include "pxl/astro/HealpixMap.hh"
-
-#endif // ----- #ifndef healpix_hh
-
diff --git a/astro/pxl-astro.pc.in b/astro/pxl-astro.pc.in
deleted file mode 100644
index 5897db7cfe6833297b463a1dc46d36089bdd4471..0000000000000000000000000000000000000000
--- a/astro/pxl-astro.pc.in
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: PXL Astro
-Description: Physics eXtension Library - Astro Classes
-Version: @PXL_VERSION@
-URL: https://vispa.physik.rwth-aachen.de/pxl
-Requires: pxl-core = @PXL_VERSION@
-Libs: -L${libdir} -lpxl-astro
-Cflags: -I${includedir}
diff --git a/astro/pxl-healpix.pc.in b/astro/pxl-healpix.pc.in
deleted file mode 100644
index 397de0a11bec20da82498b1324e8d37e6ea4f841..0000000000000000000000000000000000000000
--- a/astro/pxl-healpix.pc.in
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: PXL Healpix
-Description: Physics eXtension Library - Healpix
-Version: @PXL_VERSION@
-URL: https://vispa.physik.rwth-aachen.de/pxl
-Requires: pxl-core = @PXL_VERSION@, pxl-astro = @PXL_VERSION@
-Libs: -L${libdir} -lpxl-astro -lpxl-healpix
-Cflags: -I${includedir}
diff --git a/astro/src/Astro.cc b/astro/src/Astro.cc
deleted file mode 100644
index c4a6866251786b90640d9e6cadbf8805a56a8fe9..0000000000000000000000000000000000000000
--- a/astro/src/Astro.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#include "pxl/core.hh"
-#include "pxl/astro.hh"
-
-namespace pxl
-{
-
-static bool _initialized = false;
-
-static ObjectProducerTemplate _AstroBasicObjectProducer;
-static ObjectProducerTemplate _AstroObjectProducer;
-static ObjectProducerTemplate _RegionOfInterestProducer;
-static ObjectProducerTemplate _UHECRProducer;
-static ObjectProducerTemplate _UHECRSourceProducer;
-
-void Astro::initialize()
-{
- if (_initialized)
- return;
-
- _AstroBasicObjectProducer.initialize();
- _AstroObjectProducer.initialize();
- _RegionOfInterestProducer.initialize();
- _UHECRProducer.initialize();
- _UHECRSourceProducer.initialize();
-
- _initialized = true;
-}
-
-void Astro::shutdown()
-{
- if (_initialized == false)
- return;
-
- _AstroBasicObjectProducer.shutdown();
- _AstroObjectProducer.shutdown();
- _RegionOfInterestProducer.shutdown();
- _UHECRProducer.shutdown();
- _UHECRSourceProducer.shutdown();
-
- _initialized = false;
-}
-
-} // namespace pxl
diff --git a/astro/src/AstroBasicObject.cc b/astro/src/AstroBasicObject.cc
deleted file mode 100644
index f6b6e92496484c0255bd9fa30c1bbc30776800f9..0000000000000000000000000000000000000000
--- a/astro/src/AstroBasicObject.cc
+++ /dev/null
@@ -1,136 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#include "pxl/astro/AstroBasicObject.hh"
-#include
-namespace pxl
-{
-
-
- void AstroBasicObject::serialize(const OutputStream &out) const
- {
- Serializable::serialize(out);
- _vector.serialize(out);
- out.writeDouble(_dAngularResolution);
- out.writeDouble(_dDummy);
- out.writeLong((long)_time);
- }
-
- void AstroBasicObject::deserialize(const InputStream &in)
- {
- Serializable::deserialize(in);
- _vector.deserialize(in);
- in.readDouble(_dAngularResolution);
- in.readDouble(_dDummy);
- long t;
- in.readLong(t);
- _time = t;
- }
-
- std::ostream& AstroBasicObject::print(int level, std::ostream& os, int pan) const
- {
- os << " Galactic Latitude : " << getGalacticLatitude() << std::endl;
- os << "Galactic Longitude : " << getGalacticLongitude() << std::endl;
- return os;
- }
-
-
- void AstroBasicObject::setGalacticCoordinates(double longitude,double latitude)
- {
- _vector.setX(cos(longitude) * cos(latitude));
- _vector.setY(sin(longitude) * cos(latitude));
- _vector.setZ(sin(latitude));
- // normalize vector!
- _vector/=sqrt(_vector*_vector);
- }
-
-
- void AstroBasicObject::setEquatorialCoordinates(
- unsigned int hours, unsigned int minutes, double seconds,
- int degree, int moa, double soa,
- CoordinateTransformations::Epoque_T epoque)
- {
- setEquatorialCoordinates(
- CoordinateTransformations::timeAngle2Radian(hours, minutes, seconds),
- CoordinateTransformations::minutesOfArc2Radian(degree,moa,soa),
- epoque);
- }
-
- void AstroBasicObject::setEquatorialCoordinates(double rightascension, double declination, CoordinateTransformations::Epoque_T epoque)
- {
- _vector.setX(cos(rightascension) * cos(declination));
- _vector.setY(sin(rightascension) * cos(declination));
- _vector.setZ(sin(declination));
- _vector = CoordinateTransformations::convertEquatorial2Galactic(_vector);
- _vector/=sqrt(_vector*_vector);
- }
-
- double AstroBasicObject::getRightAscension(CoordinateTransformations::Epoque_T epoque) const
- {
- Basic3Vector t = CoordinateTransformations::convertGalactic2Equatorial(_vector, epoque);
- double ra = atan2(t.getY(),t.getX());
- // RightAscension si between 0 and 2*pi
- if (ra < 0)
- ra+=2*M_PI;
- return ra;
-
- }
-
-void AstroBasicObject::setSuperGalacticCoordinates(double longitude,double latitude)
- {
- _vector.setX(cos(longitude) * cos(latitude));
- _vector.setY(sin(longitude) * cos(latitude));
- _vector.setZ(sin(latitude));
- _vector = CoordinateTransformations::convertSuperGalactic2Galactic(_vector);
- _vector/=sqrt(_vector*_vector);
- }
-
- double AstroBasicObject::getDeclination(CoordinateTransformations::Epoque_T epoque) const
- {
- Basic3Vector t = CoordinateTransformations::convertGalactic2Equatorial(_vector, epoque);
- return asin(t.getZ()/sqrt(t*t));
- }
-
- double AstroBasicObject::getSuperGalacticLongitude() const
- {
- Basic3Vector t = CoordinateTransformations::convertGalactic2SuperGalactic(_vector);
- return atan2(t.getY(),t.getX());
- }
-
- double AstroBasicObject::getSuperGalacticLatitude() const
- {
- Basic3Vector t = CoordinateTransformations::convertGalactic2SuperGalactic(_vector);
- return asin(t.getZ()/sqrt(t*t));
- }
-
- double AstroBasicObject::getGalacticLongitude() const
- {
- return atan2(_vector.getY(),_vector.getX());
- }
-
- double AstroBasicObject::getGalacticLatitude() const
- {
- return asin(_vector.getZ());
- }
-
- double AstroBasicObject::angularDistanceTo(const AstroBasicObject &obj) const
- {
- return angularDistanceTo(obj._vector);
- }
-
- double AstroBasicObject::angularDistanceTo(const Basic3Vector &obj) const
- {
- return _vector.getAngleTo(obj);
- }
-
- double AstroBasicObject::angularDistanceTo(const AstroBasicObject *obj) const
- {
- return angularDistanceTo(obj->_vector);
- }
-
-}
diff --git a/astro/src/AstroObject.cc b/astro/src/AstroObject.cc
deleted file mode 100644
index 61902bfe931987586a9c69d97aa4a144338cc84d..0000000000000000000000000000000000000000
--- a/astro/src/AstroObject.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#include "pxl/astro/AstroObject.hh"
-
-namespace pxl
-{
-
-
-void AstroObject::serialize(const OutputStream &out) const
-{
- AstroBasicObject::serialize(out);
- UserRecordHelper::serialize(out);
- _softRelations.serialize(out);
-}
-
-void AstroObject::deserialize(const InputStream &in)
-{
- AstroBasicObject::deserialize(in);
- UserRecordHelper::deserialize(in);
- _softRelations.deserialize(in);
-}
-
-void AstroObject::linkSoft(AstroObject* astroobject, const std::string& type)
-{
- if (!_softRelations.has(astroobject, type))
- {
- _softRelations.set(astroobject, type);
- astroobject->linkSoft(this, type);
- }
-}
-
-void AstroObject::unlinkSoft(AstroObject* astroobject, const std::string& type)
-{
- _softRelations.remove(astroobject, type);
- astroobject->_softRelations.remove(this, type);
-}
-
-void AstroObject::linkSoft(AstroObject &astroobject, const std::string& type)
-{
- linkSoft(&astroobject, type);
-}
-
-void AstroObject::unlinkSoft(AstroObject &astroobject, const std::string& type)
-{
- unlinkSoft(&astroobject, type);
-}
-
-
-
-
-}
diff --git a/astro/src/CoordinateTransformations.cc b/astro/src/CoordinateTransformations.cc
deleted file mode 100644
index e7deaa029bef5dfa7c4ee749cbcbe913cb1c6d0c..0000000000000000000000000000000000000000
--- a/astro/src/CoordinateTransformations.cc
+++ /dev/null
@@ -1,119 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#include "pxl/astro/CoordinateTransformations.hh"
-namespace pxl
-{
-
-// Rotation matrices for conversion x_galactic = R * x_equatorial,
-// with R in Epoque 1950 or 2000, according to:
-// Murray, C.A., 1989. The transformation of coordinates between
-// systems of B1950.0 and J2000.0 and the principal galactic axes
-// referred to J2000.0, Astron. Astrophys, 218, p.325-329
-// http://adsabs.harvard.edu/abs/1989A&A...218..325M
-double CoordinateTransformations::_R1950[] =
-{ -0.066988739, -0.872755766, -0.483538915, +0.492728466, -0.450346958,
- 0.744584633, -0.867600811, -0.188374602, 0.460199785 };
-double CoordinateTransformations::_R2000[] =
-{ -0.054875539, -0.873437105, -0.483834992, +0.494109454, -0.444829594,
- 0.746982249, -0.867666136, -0.198076390, 0.455983795 };
-
-// Rotation matrix for conversion x_supergalactic = R * x_galactic,
-// is calculated as described in the appendix of
-// John L. Tonry et. al., 2000, The Surface Brightness Fluctuation Survey of Galaxy Distances. II. Local and Large-Scale Flows, doi: 10.1086/308409, The Astrophysical Journal
-// http://iopscience.iop.org/0004-637X/530/2/625
-double CoordinateTransformations::_SG[] =
-{ -0.73574257480437488, +0.67726129641389432, +0.0000000000000000,
- -0.07455377836523376, -0.08099147130697673, +0.9939225903997749,
- +0.67314530210920764, +0.73127116581696450, +0.1100812622247821 };
-
-Basic3Vector CoordinateTransformations::convertGalactic2Equatorial(const Basic3Vector& vec,
- Epoque_T epoque)
-{
- BasicMatrix R;
- R.setColumnBasedStorage();
- if (epoque == J1950)
- {
- R.use(3, 3, _R1950);
- }
- else if (epoque == J2000)
- {
- R.use(3, 3, _R2000);
- }
-
- Basic3Vector out = R * vec;
- return out;
-}
-
-Basic3Vector CoordinateTransformations::convertEquatorial2Galactic(const Basic3Vector& vec,
- Epoque_T epoque)
-{
- BasicMatrix R;
- R.setRowBasedStorage();
- if (epoque == J1950)
- {
- R.use(3, 3, _R1950);
- }
- else if (epoque == J2000)
- {
- R.use(3, 3, _R2000);
- }
-
- Basic3Vector out = R * vec;
- return out;
-}
-
-Basic3Vector CoordinateTransformations::convertEquatorial2SuperGalactic(const Basic3Vector& vec,
- Epoque_T epoque)
-{
- Basic3Vector vt = CoordinateTransformations::convertEquatorial2Galactic(vec, epoque);
- return CoordinateTransformations::convertGalactic2SuperGalactic(vt);
-}
-
-
-Basic3Vector CoordinateTransformations::convertSuperGalactic2Equatorial(const Basic3Vector& vec,
- Epoque_T epoque )
-{
- Basic3Vector vt = CoordinateTransformations::convertSuperGalactic2Galactic(vec);
- return CoordinateTransformations::convertGalactic2Equatorial(vt, epoque);
-}
-
-
-Basic3Vector CoordinateTransformations::convertGalactic2SuperGalactic(const Basic3Vector& vec)
-{
- BasicMatrix R;
- R.setRowBasedStorage();
- R.use(3, 3, _SG);
- Basic3Vector out = R * vec;
- return out;
-}
-
-Basic3Vector CoordinateTransformations::convertSuperGalactic2Galactic(const Basic3Vector& vec)
-{
- BasicMatrix R;
- R.setColumnBasedStorage();
- R.use(3, 3, _SG);
- Basic3Vector out = R * vec;
- return out;
-}
-
-double CoordinateTransformations::timeAngle2Radian(unsigned int hours, unsigned int minutes,
- double seconds)
-{
- return (1. / 12. * hours + 1. / 720. * minutes + 1 / 43200. * seconds)
- * M_PI;
-
-}
-double CoordinateTransformations:: minutesOfArc2Radian(int degree, int minutes, double seconds)
-{
- double s = (degree < 0 ? -1. : 1.);
- return s * (std::abs(degree) + 1. / 60 * minutes + 1. / 3600 * seconds)
- / 180. * M_PI;
-}
-}
-
diff --git a/astro/src/Healpix.cc b/astro/src/Healpix.cc
deleted file mode 100644
index 59b966110b1be5edded24fb445b386d5a26eff59..0000000000000000000000000000000000000000
--- a/astro/src/Healpix.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a GPL-2 or later license -
-//-------------------------------------------
-
-#include "pxl/core.hh"
-#include "pxl/astro/Healpix.hh"
-#include "pxl/healpix.hh"
-
-namespace pxl
-{
-
-static bool _initialized = false;
-
-static ObjectProducerTemplate _HealpixMapProducer;
-
-void Healpix::initialize()
-{
- if (_initialized)
- return;
-
- _HealpixMapProducer.initialize();
-
- _initialized = true;
-}
-
-void Healpix::shutdown()
-{
- if (_initialized == false)
- return;
-
- _HealpixMapProducer.shutdown();
-
- _initialized = false;
-}
-
-} // namespace pxl
diff --git a/astro/src/HealpixMap.cc b/astro/src/HealpixMap.cc
deleted file mode 100644
index 7e22645a9aa6c06ae885eec9213e451e1a343ed8..0000000000000000000000000000000000000000
--- a/astro/src/HealpixMap.cc
+++ /dev/null
@@ -1,454 +0,0 @@
-#include "pxl/astro/HealpixMap.hh"
-
-namespace pxl
-{
-void HealpixMap::_calculateInternalConstants()
-{
- _nside = 1<<_order; // _nside = 2**order
- _npface = _nside << _order; // _nside * 2**order == nside**2
- _ncap = (_npface-_nside)<<1; //(nside**2-nside) * 2**1
- _npix = 12*_npface;
- _fact2 = 4./_npix;
- _fact1 = (_nside<<1)*_fact2; // 2*nside * fact2
-}
-
-int HealpixMap::getNumberOfPixels(unsigned int order)
-{
- int nside = 1<setSize(_npix);
-} // HealpixMap
-
-void HealpixMap::serialize(const OutputStream &out) const
-{
- BasicNVector::serialize(out);
- UserRecordHelper::serialize(out);
- out.writeUnsignedInt(_order);
-}
-
-void HealpixMap::deserialize(const InputStream &in)
-{
- BasicNVector::deserialize(in);
- UserRecordHelper::deserialize(in);
- in.readUnsignedInt(_order);
- _calculateInternalConstants();
-}
-
-int HealpixMap::vector2Pixel (const Basic3Vector &vec) const
-{
- double z = vec.getZ()/sqrt(vec*vec);
- double phi = safe_atan2(vec.getY(),vec.getX());
-
- double za = std::fabs(z);
- double tt = fmodulo(phi,2*M_PI) * 2/M_PI; // in [0,4)
-
- if (za<=2./3.) // Equatorial region
- {
- double temp1 = _nside*(0.5+tt);
- double temp2 = _nside*z*0.75;
- int jp = int(temp1-temp2); // index of ascending edge line
- int jm = int(temp1+temp2); // index of descending edge line
-
- // ring number counted from z=2/3
- int ir = _nside+ 1 + jp - jm; // in {1,2n+1}
- int kshift = 1-(ir&1); // kshift=1 if ir even, 0 otherwise
-
- int ip = (jp+jm- _nside+kshift+1)/2; // in {0,4n-1}
- ip = imodulo(ip,4* _nside);
-
- return _ncap + (ir-1)*4* _nside+ ip;
- }
- else // North & South polar caps
- {
- double tp = tt-int(tt);
- double tmp = _nside*sqrt(3*(1-za));
-
- int jp = int(tp*tmp); // increasing edge line index
- int jm = int((1.0-tp)*tmp); // decreasing edge line index
-
- int ir = jp+jm+1; // ring number counted from the closest pole
- int ip = int(tt*ir); // in {0,4*ir-1}
- ip = imodulo(ip,4*ir);
-
- if (z>0)
- {
- return 2*ir*(ir-1) + ip;
- }
- else
- {
- return _npix - 2*ir*(ir+1) + ip;
- }
- }
-} // vector2Pixel
-
-
-void HealpixMap::getNeighbors(int pix, std::vector &result) const
-{
- result.resize(8);
- static const int xoffset[] = { -1,-1, 0, 1, 1, 1, 0,-1 };
- static const int yoffset[] = { 0, 1, 1, 1, 0,-1,-1,-1 };
- static const int facearray[][12] =
- { { 8, 9,10,11,-1,-1,-1,-1,10,11, 8, 9 }, // S
- { 5, 6, 7, 4, 8, 9,10,11, 9,10,11, 8 }, // SE
- { -1,-1,-1,-1, 5, 6, 7, 4,-1,-1,-1,-1 }, // E
- { 4, 5, 6, 7,11, 8, 9,10,11, 8, 9,10 }, // SW
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11 }, // center
- { 1, 2, 3, 0, 0, 1, 2, 3, 5, 6, 7, 4 }, // NE
- { -1,-1,-1,-1, 7, 4, 5, 6,-1,-1,-1,-1 }, // W
- { 3, 0, 1, 2, 3, 0, 1, 2, 4, 5, 6, 7 }, // NW
- { 2, 3, 0, 1,-1,-1,-1,-1, 0, 1, 2, 3 } }; // N
- static const int swaparray[][12] =
- { { 0,0,0,0,0,0,0,0,3,3,3,3 }, // S
- { 0,0,0,0,0,0,0,0,6,6,6,6 }, // SE
- { 0,0,0,0,0,0,0,0,0,0,0,0 }, // E
- { 0,0,0,0,0,0,0,0,5,5,5,5 }, // SW
- { 0,0,0,0,0,0,0,0,0,0,0,0 }, // center
- { 5,5,5,5,0,0,0,0,0,0,0,0 }, // NE
- { 0,0,0,0,0,0,0,0,0,0,0,0 }, // W
- { 6,6,6,6,0,0,0,0,0,0,0,0 }, // NW
- { 3,3,3,3,0,0,0,0,0,0,0,0 } }; // N
-
- int ix, iy, face_num;
- // We only have the ring scheme!
- //(scheme_==RING) ?
- // ring2xyf(pix,ix,iy,face_num) : nest2xyf(pix,ix,iy,face_num);
- ring2xyf(pix,ix,iy,face_num);
-
- // Some undecipherable math happens here
- const int nsm1 = _nside-1;
- if ((ix>0)&&(ix0)&&(iy=_nside)
- { x-=_nside; nbnum+=1; }
- if (y<0)
- { y+=_nside; nbnum-=3; }
- else if (y>=_nside)
- { y-=_nside; nbnum+=3; }
-
- int f = facearray[nbnum][face_num];
- if (f>=0)
- {
- if (swaparray[nbnum][face_num]&1) x=_nside-x-1;
- if (swaparray[nbnum][face_num]&2) y=_nside-y-1;
- if (swaparray[nbnum][face_num]&4) std::swap(x,y);
-
- result[i] = xyf2ring(x,y,f);
- }
- else
- result[i] = -1;
- }
- }
-} // neighbors
-
-
-void HealpixMap::getPixelsInCone(const Basic3Vector& coneCenter, double radius, std::vector& listpix) const
-{
- double phi = safe_atan2(coneCenter.getY(),coneCenter.getX());
- double theta = acos(coneCenter.getZ());
- listpix.clear();
-
- double dth1 = _fact2;
- double dth2 = _fact1;
- double cosang = cos(radius);
-
- double z0 = cos(theta);
- double xa = 1./sqrt((1-z0)*(1+z0));
-
- double rlat1 = theta - radius;
- double zmax = cos(rlat1);
- int irmin = ring_above (zmax)+1;
-
- if (rlat1<=0) // north pole in the disc
- for (int m=1; m=M_PI)
- {// south pole in the disc
- for (int m=irmax+1; m<(4*_nside); ++m)
- { // rings completely in the disc
- in_ring (m, 0, M_PI, listpix);
- }
- }
-} // getPixelsInCone
-
-
-Basic3Vector HealpixMap::pixel2Vector(int pixel) const
-{
- double z, phi;
-
- if (pixel<_ncap) // North Polar cap
- {
- int iring = int(0.5*(1+isqrt(1+2*pixel))); //counted from North pole
- int iphi = (pixel+1) - 2*iring*(iring-1);
-
- z = 1.0 - (iring*iring)*_fact2;
- phi = (iphi-0.5) * M_PI/2/iring;
- }
- else if (pixel<(_npix-_ncap)) // Equatorial region
- {
- int ip = pixel - _ncap;
- int iring = ip/(4*_nside) + _nside; // counted from North pole
- int iphi = ip%(4*_nside) + 1;
- // 1 if iring+nside is odd, 1/2 otherwise
- double fodd = ((iring+_nside)&1) ? 1 : 0.5;
-
- int nl2 = 2*_nside;
- z = (nl2-iring)*_fact1;
- phi = (iphi-fodd) * M_PI/nl2;
- }
- else // South Polar cap
- {
- int ip = _npix - pixel;
- int iring = int(0.5*(1+isqrt(2*ip-1))); //counted from South pole
- int iphi = 4*iring + 1 - (ip - 2*iring*(iring-1));
-
- z = -1.0 + (iring*iring)*_fact2;
- phi = (iphi-0.5) * M_PI/2/iring;
- }
-
- Basic3Vector res;
- double sintheta = sqrt((1.-z)*(1.+z));
- res.setX(sintheta*cos(phi));
- res.setY(sintheta*sin(phi));
- res.setZ(z);
- return res;
-} // pix2vec
-
-
-void HealpixMap::ring2xyf (int pix, int &ix, int &iy, int &face_num) const
-{
- static const int jrll[] = { 2,2,2,2,3,3,3,3,4,4,4,4 };
- static const int jpll[] = { 1,3,5,7,0,2,4,6,1,3,5,7 };
-
- int iring, iphi, kshift, nr;
-
- int nl2 = 2*_nside;
-
- if (pix<_ncap) // North Polar cap
- {
- iring = int(0.5*(1+isqrt(1+2*pix))); //counted from North pole
- iphi = (pix+1) - 2*iring*(iring-1);
- kshift = 0;
- nr = iring;
- face_num=0;
- int tmp = iphi-1;
- if (tmp>=(2*iring))
- {
- face_num=2;
- tmp-=2*iring;
- }
- if (tmp>=iring) ++face_num;
- }
- else if (pix<(_npix-_ncap)) // Equatorial region
- {
- int ip = pix - _ncap;
- iring = (ip>>(_order+2)) + _nside; // counted from North pole
- iphi = (ip&(4*_nside-1)) + 1;
- kshift = (iring+_nside)&1;
- nr = _nside;
- unsigned int ire = iring-_nside+1;
- unsigned int irm = nl2+2-ire;
- int ifm, ifp;
- ifm = (iphi - ire/2 + _nside -1) >> _order;
- ifp = (iphi - irm/2 + _nside -1) >> _order;
-
- if (ifp == ifm) // faces 4 to 7
- face_num = (ifp==4) ? 4 : ifp+4;
- else if (ifp=(2*nr))
- {
- face_num=10;
- tmp-=2*nr;
- }
- if (tmp>=nr) ++face_num;
- }
-
- int irt = iring - (jrll[face_num]*_nside) + 1;
- int ipt = 2*iphi- jpll[face_num]*nr - kshift -1;
- if (ipt>=nl2) ipt-=8*_nside;
-
- ix = (ipt-irt) >>1;
- iy =(-(ipt+irt))>>1;
-} //ring2xyf
-
-
-int HealpixMap::xyf2ring (int ix, int iy, int face_num) const
-{
-
- static const int jrll[] = { 2,2,2,2,3,3,3,3,4,4,4,4 };
- static const int jpll[] = { 1,3,5,7,0,2,4,6,1,3,5,7 };
-
- int nl4 = 4*_nside;
- int jr = (jrll[face_num]*_nside) - ix - iy - 1;
-
- int nr, kshift, n_before;
- if (jr<_nside)
- {
- nr = jr;
- n_before = 2*nr*(nr-1);
- kshift = 0;
- }
- else if (jr > 3*_nside)
- {
- nr = nl4-jr;
- n_before = _npix - 2*(nr+1)*nr;
- kshift = 0;
- }
- else
- {
- nr = _nside;
- n_before = _ncap + (jr-_nside)*nl4;
- kshift = (jr-_nside)&1;
- }
-
- int jp = (jpll[face_num]*nr + ix - iy + 1 + kshift) / 2;
- if (jp>nl4)
- jp-=nl4;
- else
- if (jp<1) jp+=nl4;
-
- return n_before + jp - 1;
-} //xyf2ring
-
-
-void HealpixMap::in_ring(int iz, double phi0, double dphi, std::vector &listir) const
-{
- int nr, ir, ipix1;
- double shift=0.5;
-
- if (iz<_nside) // north pole
- {
- ir = iz;
- nr = ir*4;
- ipix1 = 2*ir*(ir-1);// lowest pixel number in the ring
- }
- else if (iz>(3*_nside)) // south pole
- {
- ir = 4*_nside - iz;
- nr = ir*4;
- ipix1 = _npix - 2*ir*(ir+1); // lowest pixel number in the ring
- }
- else // equatorial region
- {
- ir = iz - _nside + 1; // within {1, 2*nside + 1}
- nr = _nside*4;
- if ((ir&1)==0) shift = 0;
- ipix1 = _ncap + (ir-1)*nr; // lowest pixel number in the ring
- }
- int ipix2 = ipix1 + nr - 1;// highest pixel number in the ring
-
-
- // ----------- constructs the pixel list --------------
- if (dphi > (M_PI-1e-7))
- {
- for (int i=ipix1; i<=ipix2; ++i)
- {
- listir.push_back(i);
- }
- }
- else
- {
- int ip_lo = ifloor(nr*0.5 / M_PI*(phi0-dphi) - shift)+1;
- int ip_hi = ifloor(nr*0.5 / M_PI*(phi0+dphi) - shift);
- int pixnum = ip_lo+ipix1;
- if (pixnumipix2)
- {
- pixnum -= nr;
- }
- listir.push_back(pixnum);
- }
- }
-} // end ring
-
-
-int HealpixMap::ring_above (double z) const
-{
- double az=std::fabs(z);
- if (az>2./3) // polar caps
- {
- int iring = int(_nside*sqrt(3*(1-az)));
- return (z>0) ? iring : 4*_nside-iring-1;
- }
- else // ----- equatorial region ---------
- return int(_nside*(2-1.5*z));
-}
-
-HealpixMap HealpixMap::operator-(const HealpixMap& vec) const
-{
- HealpixMap out(*this);
- out -= vec;
- return out;
-}
-
-HealpixMap HealpixMap::operator+(const HealpixMap& vec) const
-{
- HealpixMap out(*this);
- out += vec;
- return out;
-}
-
-} // namespace pxl
diff --git a/astro/src/RegionOfInterest.cc b/astro/src/RegionOfInterest.cc
deleted file mode 100644
index 546f876b183cd84b0d36f80d1065a123055dd61b..0000000000000000000000000000000000000000
--- a/astro/src/RegionOfInterest.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#include "pxl/astro/RegionOfInterest.hh"
-
-namespace pxl
-{
-
-std::ostream& RegionOfInterest::print(int level, std::ostream& os, int pan) const
-{
- os << "Name: " << getName() << std::endl;
- os << " Latitude : " << getGalacticLatitude() << std::endl;
- os << " Longitude : " << getGalacticLongitude() << std::endl;
- os << " ConeRadius: " << getConeRadius() << std::endl;
- return os;
-}
-
-void RegionOfInterest::serialize(const OutputStream &out) const
-{
- AstroObject::serialize(out);
- out.writeDouble(_coneRadius);
- out.writeString(_name);
-}
-
-void RegionOfInterest::deserialize(const InputStream &in)
-{
- AstroObject::deserialize(in);
- in.readDouble(_coneRadius);
- in.readString(_name);
-}
-
-bool RegionOfInterest::objectInCone(const AstroBasicObject& obj) const
-{
- return objectInCone(&obj);
-}
-
-bool RegionOfInterest::objectInCone(const AstroBasicObject* obj) const
-{
- return (this->angularDistanceTo(obj) < _coneRadius);
-}
-
-bool RegionOfInterest::linkIfObjectInCone(AstroObject& obj, std::string name)
-{
- return linkIfObjectInCone(&obj, name);
-}
-
-bool RegionOfInterest::linkIfObjectInCone(AstroObject* obj, std::string name)
-{
- if (this->angularDistanceTo(obj) < _coneRadius)
- {
- this->linkSoft(obj, name);
- return true;
- }
- return false;
-}
-}
diff --git a/astro/src/UHECR.cc b/astro/src/UHECR.cc
deleted file mode 100644
index 7dc89468ace7d5bf4f8d02e9840f4eec9474d5d2..0000000000000000000000000000000000000000
--- a/astro/src/UHECR.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#include "pxl/astro/UHECR.hh"
-
-namespace pxl
-{
-
-std::ostream& UHECR::print(int level, std::ostream& os, int pan) const
-{
- os << " Latitude : " << getGalacticLatitude() << std::endl;
- os << "Longitude : " << getGalacticLongitude() << std::endl;
- os << " Energy : " << getEnergy() << std::endl;
- return os;
-}
-
-void UHECR::serialize(const OutputStream &out) const
-{
- AstroObject::serialize(out);
- out.writeDouble(_energy);
- out.writeDouble(_denergy);
- out.writeDouble(_mass);
- out.writeDouble(_charge);
-}
-
-void UHECR::deserialize(const InputStream &in)
-{
- AstroObject::deserialize(in);
- in.readDouble(_energy);
- in.readDouble(_denergy);
- in.readDouble(_mass);
- in.readDouble(_charge);
-}
-
-}
diff --git a/astro/src/UHECRSource.cc b/astro/src/UHECRSource.cc
deleted file mode 100644
index 7882b6626ec343602eb153bbb4f143f3c84f5ae3..0000000000000000000000000000000000000000
--- a/astro/src/UHECRSource.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-//-------------------------------------------
-// Project: Physics eXtension Library (PXL) -
-// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
-// RWTH Aachen, Germany -
-// Licensed under a LGPL-2 or later license -
-//-------------------------------------------
-
-#include "pxl/astro/UHECRSource.hh"
-
-namespace pxl
-{
-
-std::ostream& UHECRSource::print(int level, std::ostream& os, int pan) const
-{
- os << "Name: " << getName() << std::endl;
- os << " Latitude : " << getGalacticLatitude() << std::endl;
- os << " Longitude : " << getGalacticLongitude() << std::endl;
- os << " Distance : " << getDistance() << std::endl;
- os << " Rel. Lum. : " << getLuminosity() << std::endl;
- return os;
-}
-
-void UHECRSource::serialize(const OutputStream &out) const
-{
- AstroObject::serialize(out);
- out.writeDouble(_distance);
- out.writeDouble(_luminosity);
- out.writeString(_name);
-}
-
-void UHECRSource::deserialize(const InputStream &in)
-{
- AstroObject::deserialize(in);
- in.readDouble(_distance);
- in.readDouble(_luminosity);
- in.readString(_name);
-}
-
-}
diff --git a/FindDCAP.cmake b/cmake/FindDCAP.cmake
similarity index 100%
rename from FindDCAP.cmake
rename to cmake/FindDCAP.cmake
diff --git a/FindLibSSH.cmake b/cmake/FindLibSSH.cmake
similarity index 100%
rename from FindLibSSH.cmake
rename to cmake/FindLibSSH.cmake
diff --git a/FindPXL.cmake b/cmake/FindPXL.cmake
similarity index 97%
rename from FindPXL.cmake
rename to cmake/FindPXL.cmake
index 456083ab053c5cb700c0961685a798094c8e3b56..8a8c5fee9cf3eb9de9a5217898c2e75e5fac331f 100644
--- a/FindPXL.cmake
+++ b/cmake/FindPXL.cmake
@@ -2,7 +2,7 @@
# PXL_INCLUDE_DIRS - the PXL include directories
# PXL_LIBRARIES_DIR - link these to use PXL
# PXL_PLUGIN_INSTALL_PATH - path to the default plugins
-# (e.g. $HOME/.pxl-VERSION/plugins)
+# (e.g. $HOME/.pxl-PXL_VERSION_LIB/plugins)
#
# Note that this only configures the pxl-core system to add a pxl
# plugin, use the PXL_add_plugin(name), where name is e.g. pxl-hep
diff --git a/cmake/WindowsInstaller.cmake b/cmake/WindowsInstaller.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..e91e6ca850fcadb58393114d691dd74bfd166acc
--- /dev/null
+++ b/cmake/WindowsInstaller.cmake
@@ -0,0 +1,19 @@
+get_filename_component(WIX_INSTALL_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Installer XML\\3.0;InstallRoot]" ABSOLUTE CACHE)
+message(STATUS "Windows Installer XML: ${WIX_INSTALL_ROOT}")
+
+find_program(CANDLE_EXECUTABLE candle PATHS ${WIX_INSTALL_ROOT} REQUIRED)
+
+find_program(LIGHT_EXECUTABLE light PATHS ${WIX_INSTALL_ROOT})
+
+configure_file(${CMAKE_SOURCE_DIR}/cmake/pypxl.wxs.in ${CMAKE_BINARY_DIR}/pypxl.wxs)
+
+add_custom_target(windows_installer_candle
+ ${CANDLE_EXECUTABLE} ${CMAKE_BINARY_DIR}/pypxl.wxs
+ DEPENDS ${CMAKE_BINARY_DIR}/pypxl.wxs
+)
+add_dependencies(windows_installer_candle pxlrun pxl-modules)
+
+add_custom_target(windows_installer
+ ${LIGHT_EXECUTABLE} -ext WixUIExtension ${CMAKE_BINARY_DIR}/pypxl.wixobj -o ${CMAKE_BINARY_DIR}/PyPXL-Py${PYTHON_DOT_VERSION}-${PXLVERSION}.msi
+)
+add_dependencies(windows_installer windows_installer_candle)
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 30dc213790860eb7d5c423716058190106087cfb..5a77b133f93f9c25f8a6f0d11848f62aafbc428e 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -1,102 +1,61 @@
#
# use local include directory
#
-include_directories (include ${ZLIB_INCLUDE_DIR} ${CMAKE_BINARY_DIR}/include)
-
-set(PXL_CORE_EXTRA_FILES)
-if (PXL_ENABLE_SFTP)
- list(APPEND PXL_CORE_EXTRA_FILES "src/sFTPFileImpl.cc")
- include_directories (${LIB_SSH_INCLUDE_DIR})
-
-endif()
-
-if (PXL_ENABLE_DCAP)
- list(APPEND PXL_CORE_EXTRA_FILES "src/dCapFileImpl.cc")
- include_directories (${LIB_DCAP_INCLUDE_DIR})
-
-endif()
+include_directories(include ${CMAKE_BINARY_DIR}/include)
#
# add library using the sources
#
-add_library (pxl-core SHARED
- src/Basic3Vector.cc
- src/BasicContainer.cc
- src/BasicMatrix.cc
- src/BasicNVector.cc
- src/Core.cc
- src/Configuration.cc
- src/ConfigLoader.cc
- src/Event.cc
- src/File.cc
- src/functions.cc
- src/Id.cc
- src/InformationChunk.cc
- src/logging.cc
- src/LorentzVector.cc
- src/MessageDispatcher.cc
- src/Object.cc
- src/ObjectManager.cc
- src/ObjectOwner.cc
- src/Random.cc
- src/Relations.cc
- src/Relative.cc
- src/SoftRelations.cc
- src/UserRecord.cc
- src/Variant.cc
- src/WkPtrBase.cc
- src/ChunkReader.cc
- src/ChunkWriter.cc
- src/InputHandler.cc
- src/Tokenizer.cc
- src/ObjectFactory.cc
- src/OutputFile.cc
- src/OutputHandler.cc
- src/PluginManager.cc
- src/FileFactory.cc
- src/LocalFileImpl.cc
- src/StdFileImpl.cc
- src/NamedTMPFile.cc
- ${PXL_CORE_EXTRA_FILES}
+add_library(pxl-core SHARED
+ src/Core.cc
+ src/Configuration.cc
+ src/ConfigLoader.cc
+ src/Functions.cc
+ src/Id.cc
+ src/JsonParser.cc
+ src/Logging.cc
+ src/LorentzVector.cc
+ src/MessageDispatcher.cc
+ src/Object.cc
+ src/ObjectOwner.cc
+ src/Random.cc
+ src/Relations.cc
+ src/Relative.cc
+ src/PluginManager.cc
+ src/SerializableFactory.cc
+ src/SoftRelations.cc
+ src/Tokenizer.cc
+ src/UserRecords.cc
+ src/Variant.cc
+ src/Vector3.cc
+ src/WeakPtr.cc
)
#
# link to pxl
#
-target_link_libraries(pxl-core ${ZLIB_LIBRARIES})
+# target_link_libraries(pxl-core ${ZLIB_LIBRARIES})
-add_definitions(-DPXL_PLUGIN_LIBEXEC_DIR=${PXLPLUGINDIR})
+add_definitions(-DPXL_PLUGIN_LIBEXEC_DIR=${PXL_PLUGIN_DIR})
CONFIGURE_FILE(config.hh.in ${CMAKE_BINARY_DIR}/include/pxl/core/config.hh)
INSTALL(FILES ${CMAKE_BINARY_DIR}/include/pxl/core/config.hh DESTINATION ${includedir}/pxl/core)
+
#
# add winmm for timer function on Windows
#
-if (WIN32)
- target_link_libraries (pxl-core winmm ws2_32)
-else (WIN32)
- target_link_libraries (pxl-core dl)
-endif (WIN32)
+if(WIN32)
+ target_link_libraries(pxl-core winmm ws2_32)
+else(WIN32)
+ target_link_libraries(pxl-core dl)
+endif(WIN32)
-if (UNIX AND NOT APPLE)
+if(UNIX AND NOT APPLE)
add_definitions(-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE)
endif()
-if(PXL_ENABLE_SFTP)
- target_link_libraries (pxl-core ${LIB_SSH_LIBRARIES} )
-endif()
-
-if(PXL_ENABLE_DCAP)
- target_link_libraries (pxl-core ${LIB_DCAP_LIBRARIES} )
-endif()
-
#
# setup install path
#
-PXL_INSTALL_LIBRARY(pxl-core)
-
-#
-# set library properties for Mac OS X
-#
-SET_XCODE_FRAMEWORK_PROPERTIES(pxl-core)
+PXL_INSTALL_LIBRARY(pxl-core)
diff --git a/core/config.hh.in b/core/config.hh.in
index 269b4db18a4856faaf31e460df3621d80f273463..626b255f5c7bbee37fcf584d5638fca375e9ccd5 100644
--- a/core/config.hh.in
+++ b/core/config.hh.in
@@ -1,7 +1,7 @@
//-------------------------------------------
// Project: Physics eXtension Library (PXL) -
// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
+// Copyright (C) 2006-2019 Martin Erdmann -
// RWTH Aachen, Germany -
// Licensed under a LGPL-2 or later license -
//-------------------------------------------
@@ -9,13 +9,14 @@
#ifndef PXL_CONFIG_HH
#define PXL_CONFIG_HH
-#define PXL_MAJOR_VERSION "${PXLMAJORRELEASEVERSION}"
-#define PXL_MINOR_VERSION "${PXLMINORRELEASEVERSION}"
-#define PXL_FULL_VERSION "${PXLVERSION}"
+#define PXL_VERSION_MAJOR "${PXL_VERSION_MAJOR}"
+#define PXL_VERSION_MINOR "${PXL_VERSION_MINOR}"
+#define PXL_VERSION_PATCH "${PXL_VERSION_PATCH}"
+#define PXL_VERSION_LIB "${PXL_VERSION_LIB}"
+#define PXL_VERSION "${PXL_VERSION}"
-#define PXL_MAJOR_VERSION_VALUE ${PXLMAJORRELEASEVERSION}
-#define PXL_MINOR_VERSION_VALUE ${PXLMINORRELEASEVERSION}
+#define PXL_VERSION_MAJOR_INT ${PXL_VERSION_MAJOR}
+#define PXL_VERSION_MINOR_INT ${PXL_VERSION_MINOR}
+#define PXL_VERSION_PATCH_INT ${PXL_VERSION_PATCH}
-#define PXL_LIB_VERSION "${PXLMAJORRELEASEVERSION}.${PXLMINORRELEASEVERSION}"
-
-#endif
\ No newline at end of file
+#endif
diff --git a/core/include/pxl/core.hh b/core/include/pxl/core.hh
index 1899af9f373a2e5a0f23fdd6f8421ce8ff847cb3..798a95a6f6a93da321fdc5568107aebcbac80ad7 100644
--- a/core/include/pxl/core.hh
+++ b/core/include/pxl/core.hh
@@ -1,7 +1,7 @@
//-------------------------------------------
// Project: Physics eXtension Library (PXL) -
// http://vispa.physik.rwth-aachen.de/ -
-// Copyright (C) 2006-2015 Martin Erdmann -
+// Copyright (C) 2006-2019 Martin Erdmann -
// RWTH Aachen, Germany -
// Licensed under a LGPL-2 or later license -
//-------------------------------------------
@@ -9,47 +9,29 @@
#ifndef PXL_CORE_HH
#define PXL_CORE_HH
-#include "pxl/core/Basic3Vector.hh"
-#include "pxl/core/BasicNVector.hh"
-#include "pxl/core/BasicMatrix.hh"
-#include "pxl/core/Core.hh"
#include "pxl/core/Configuration.hh"
-#include "pxl/core/RotationMatrix.hh"
-#include "pxl/core/LorentzVector.hh"
-#include "pxl/core/BasicContainer.hh"
-#include "pxl/core/Event.hh"
-#include "pxl/core/File.hh"
-#include "pxl/core/Filter.hh"
-#include "pxl/core/functions.hh"
+#include "pxl/core/Core.hh"
+#include "pxl/core/Functions.hh"
#include "pxl/core/Id.hh"
-#include "pxl/core/InformationChunk.hh"
-#include "pxl/core/logging.hh"
+#include "pxl/core/InfoObject.hh"
+#include "pxl/core/Logging.hh"
+#include "pxl/core/LorentzVector.hh"
+#include "pxl/core/Macros.hh"
#include "pxl/core/MessageDispatcher.hh"
-#include "pxl/core/macros.hh"
-#include "pxl/core/Random.hh"
#include "pxl/core/Object.hh"
-#include "pxl/core/ObjectManager.hh"
#include "pxl/core/ObjectOwner.hh"
+#include "pxl/core/PluginManager.hh"
+#include "pxl/core/Random.hh"
#include "pxl/core/Relations.hh"
#include "pxl/core/Relative.hh"
-#include "pxl/core/SoftRelations.hh"
-#include "pxl/core/UserRecord.hh"
-#include "pxl/core/Variant.hh"
-#include "pxl/core/weak_ptr.hh"
-#include "pxl/core/WkPtrBase.hh"
-#include "pxl/core/ChunkReader.hh"
-#include "pxl/core/ChunkWriter.hh"
-#include "pxl/core/GenericInputHandler.hh"
-#include "pxl/core/GenericOutputHandler.hh"
-#include "pxl/core/InputFile.hh"
-#include "pxl/core/InputHandler.hh"
-#include "pxl/core/ObjectFactory.hh"
-#include "pxl/core/OutputFile.hh"
-#include "pxl/core/OutputHandler.hh"
-#include "pxl/core/PluginManager.hh"
#include "pxl/core/Serializable.hh"
+#include "pxl/core/SerializableFactory.hh"
+#include "pxl/core/SoftRelations.hh"
#include "pxl/core/Stream.hh"
#include "pxl/core/Tokenizer.hh"
-#include "pxl/core/NamedTMPFile.hh"
+#include "pxl/core/UserRecords.hh"
+#include "pxl/core/Variant.hh"
+#include "pxl/core/Vector3.hh"
+#include "pxl/core/WeakPtr.hh"
-#endif // PXL_BASE_HH
+#endif // PXL_CORE_HH
diff --git a/core/include/pxl/core/AssocVector.hh b/core/include/pxl/core/AssocVector.hh
new file mode 100644
index 0000000000000000000000000000000000000000..ad904a90588ee2772e37d8f856b4235d9d7df11e
--- /dev/null
+++ b/core/include/pxl/core/AssocVector.hh
@@ -0,0 +1,381 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+// Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+////////////////////////////////////////////////////////////////////////////////
+#ifndef LOKI_ASSOCVECTOR_INC_
+#define LOKI_ASSOCVECTOR_INC_
+
+// $Id$
+
+
+#include
+#include
+#include
+#include
+#include
+#include