diff --git a/CMakeLists.txt b/CMakeLists.txt index 41a6862630a89098fdd671cf28707e382fc9e28f..6b09fd57febb61e6285da8d1ca690dd4af3bd563 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,9 +11,11 @@ find_package(Acts REQUIRED COMPONENTS Core Fatras DigitizationPlugin Identifica #TGeoPlugin IdentificationPlugin DigitizationPlugin DD4hepPlugin JsonPlugin ) find_package(DD4hep REQUIRED COMPONENTS DDCore) +find_package(HepMC3 REQUIRED ) include_directories(/usr/local/include) include_directories(/usr/local/include/Acts) include_directories(/usr/local/include/ActsFatras) +include_directories($ENV{HOME}/include/ActsFatras) set(Boost_NO_BOOST_CMAKE ON) # disable new cmake features from Boost 1.70 on find_package(Eigen3 3.3 REQUIRED NO_MODULE) @@ -23,11 +25,8 @@ find_package(Threads) add_subdirectory(thirdparty/dfelibs) - - - -add_subdirectory(Algorithms) -add_subdirectory(Detectors) +#add_subdirectory(Algorithms) +#add_subdirectory(Detectors) add_subdirectory(Framework) -add_subdirectory(Io) -add_subdirectory(Run) +#add_subdirectory(Io) +#add_subdirectory(Run) diff --git a/Framework/CMakeLists.txt b/Framework/CMakeLists.txt index 61543db6d27c82d0be4934ddf4952a0884c887ac..97410d6c655a9e0b048b90688043d8b90cbc7a51 100644 --- a/Framework/CMakeLists.txt +++ b/Framework/CMakeLists.txt @@ -16,7 +16,6 @@ add_library( src/Validation/ResPlotTool.cpp) target_include_directories( ActsExamplesFramework - PUBLIC ${ACTSFatras_INCLUDES} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> PRIVATE ${TBB_INCLUDE_DIRS}) target_link_libraries( diff --git a/Io/HepMC3/CMakeLists.txt b/Io/HepMC3/CMakeLists.txt index e1e8534f345b9b463f760eed1da8d62dd8bb46bc..6507a44d807e39f0ca46f3fde466c3a88efefd81 100644 --- a/Io/HepMC3/CMakeLists.txt +++ b/Io/HepMC3/CMakeLists.txt @@ -1,4 +1,3 @@ -find_package(HepMC3 REQUIRED) add_library( ActsExamplesIoHepMC3 SHARED src/HepMC3Event.cpp diff --git a/Io/HepMC3/src/HepMC3Event.cpp b/Io/HepMC3/src/HepMC3Event.cpp index 33f00a8f97a6b99900b4b8fb107a3ddaed644f75..e8ae7b7cbf2b0348d64b380863ee61918a76751a 100644 --- a/Io/HepMC3/src/HepMC3Event.cpp +++ b/Io/HepMC3/src/HepMC3Event.cpp @@ -233,10 +233,10 @@ std::vector<std::unique_ptr<FW::SimParticle>> FW::HepMC3Event::particles( // Translate all particles for (auto& genParticle : genParticles) - actsParticles.push_back(std::move( - simPart.particle(std::make_shared<HepMC3::GenParticle>(*genParticle)))); + actsParticles.push_back( + simPart.particle(std::make_shared<HepMC3::GenParticle>(*genParticle))); - return std::move(actsParticles); + return actsParticles; } std::vector<std::unique_ptr<FW::SimVertex>> FW::HepMC3Event::vertices( @@ -248,10 +248,10 @@ std::vector<std::unique_ptr<FW::SimVertex>> FW::HepMC3Event::vertices( // Translate all vertices for (auto& genVertex : genVertices) { - actsVertices.push_back(std::move(simVert.processVertex( - std::make_shared<HepMC3::GenVertex>(*genVertex)))); + actsVertices.push_back( + simVert.processVertex(std::make_shared<HepMC3::GenVertex>(*genVertex))); } - return std::move(actsVertices); + return actsVertices; } std::vector<std::unique_ptr<FW::SimParticle>> FW::HepMC3Event::beams( @@ -263,9 +263,9 @@ std::vector<std::unique_ptr<FW::SimParticle>> FW::HepMC3Event::beams( // Translate beam particles and store the result for (auto& genBeam : genBeams) - actsBeams.push_back(std::move( - simPart.particle(std::make_shared<HepMC3::GenParticle>(*genBeam)))); - return std::move(actsBeams); + actsBeams.push_back( + simPart.particle(std::make_shared<HepMC3::GenParticle>(*genBeam))); + return actsBeams; } std::vector<std::unique_ptr<FW::SimParticle>> FW::HepMC3Event::finalState( diff --git a/Io/HepMC3/src/HepMC3Particle.cpp b/Io/HepMC3/src/HepMC3Particle.cpp index 6ba3840ea9e1a2a64960a418c868bcf8135faecc..737425d14914ab97d301489c9088db9be2911882 100644 --- a/Io/HepMC3/src/HepMC3Particle.cpp +++ b/Io/HepMC3/src/HepMC3Particle.cpp @@ -34,8 +34,8 @@ std::unique_ptr<FW::SimVertex> FW::HepMC3Particle::productionVertex( // Return the vertex if it exists if (particle->production_vertex()) - return std::move(simVert.processVertex( - std::make_shared<HepMC3::GenVertex>(*particle->production_vertex()))); + return simVert.processVertex( + std::make_shared<HepMC3::GenVertex>(*particle->production_vertex())); else return nullptr; } @@ -46,8 +46,8 @@ std::unique_ptr<FW::SimVertex> FW::HepMC3Particle::endVertex( // Return the vertex if it exists if (particle->end_vertex()) - return std::move(simVert.processVertex( - std::make_shared<HepMC3::GenVertex>(*(particle->end_vertex())))); + return simVert.processVertex( + std::make_shared<HepMC3::GenVertex>(*(particle->end_vertex()))); else return nullptr; } diff --git a/Io/Root/CMakeLists.txt b/Io/Root/CMakeLists.txt index 771909b8b018a9dec6982353fdb86e98bdf2b5e1..382f19a3cc35f4566cc2fbbb089aff81d4f8299b 100644 --- a/Io/Root/CMakeLists.txt +++ b/Io/Root/CMakeLists.txt @@ -9,9 +9,10 @@ add_library( src/RootPropagationStepsWriter.cpp src/RootSimHitWriter.cpp src/RootTrackParameterWriter.cpp - src/RootVertexAndTracksWriter.cpp - src/RootVertexAndTracksReader.cpp - src/RootTrajectoryWriter.cpp) + #src/RootVertexAndTracksWriter.cpp + #src/RootVertexAndTracksReader.cpp + #src/RootTrajectoryWriter.cpp + ) target_include_directories( ActsExamplesIoRoot PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>) @@ -19,7 +20,8 @@ target_link_libraries( ActsExamplesIoRoot PUBLIC ActsCore ActsDigitizationPlugin ActsIdentificationPlugin - ActsExamplesFramework ActsExamplesPropagation ActsExamplesTruthTracking + ActsExamplesFramework + #ActsExamplesPropagation ActsExamplesTruthTracking Threads::Threads PRIVATE ROOT::Core ROOT::Hist ROOT::Tree) diff --git a/Run/CMakeLists.txt b/Run/CMakeLists.txt index 83220461743ae719db2f62857dac7ab6edebb020..77eb371a4a54e665d5b0d454f6c69e3402c926bc 100644 --- a/Run/CMakeLists.txt +++ b/Run/CMakeLists.txt @@ -2,16 +2,16 @@ add_subdirectory(Common) # tools -add_subdirectory(EventGenerator) -add_subdirectory(Geant4) -add_subdirectory(Fatras) -add_subdirectory(Geometry) +#add_subdirectory(EventGenerator) +#add_subdirectory(Geant4) +#add_subdirectory(Fatras) +#add_subdirectory(Geometry) add_subdirectory(HelloWorld) add_subdirectory(HepMC3) -add_subdirectory(MagneticField) -add_subdirectory(MaterialMapping) -add_subdirectory(Misc) -add_subdirectory(Propagation) -add_subdirectory(ReadCsv) -add_subdirectory(Reconstruction) -add_subdirectory(Vertexing) +#add_subdirectory(MagneticField) +#add_subdirectory(MaterialMapping) +#add_subdirectory(Misc) +#add_subdirectory(Propagation) +#add_subdirectory(ReadCsv) +#add_subdirectory(Reconstruction) +#add_subdirectory(Vertexing) diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..7afef53b25cb83acdce3b07801e1d7c36df27cee --- /dev/null +++ b/docs/CMakeLists.txt @@ -0,0 +1,24 @@ +# from https://devblogs.microsoft.com/cppblog/clear-functional-c-documentation-with-sphinx-breathe-doxygen-cmake/ +find_package(Doxygen REQUIRED) + +# Find all the public headers +get_target_property(CAT_CUTIFIER_PUBLIC_HEADER_DIR CatCutifier INTERFACE_INCLUDE_DIRECTORIES) +file(GLOB_RECURSE CAT_CUTIFIER_PUBLIC_HEADERS ${CAT_CUTIFIER_PUBLIC_HEADER_DIR}/*.h) + +set(DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR}/CatCutifier) +set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/docs/doxygen) +set(DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/html/index.html) +set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) +set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) + +#Replace variables inside @@ with the current values +configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY) + +file(MAKE_DIRECTORY ${DOXYGEN_OUTPUT_DIR}) #Doxygen won't create this for us +add_custom_command(OUTPUT ${DOXYGEN_INDEX_FILE} + DEPENDS ${CAT_CUTIFIER_PUBLIC_HEADERS} + COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT} + MAIN_DEPENDENCY ${DOXYFILE_OUT} ${DOXYFILE_IN} + COMMENT "Generating docs") + +add_custom_target(Doxygen ALL DEPENDS ${DOXYGEN_INDEX_FILE}) diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d4bb2cbb9eddb1bb1b4f366623044af8e4830919 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..1173cd895b7bc3852dfcbf43bf749984cc8ffde0 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,98 @@ +import sphinx_rtd_theme +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'NPdet' +copyright = '2020, Whitney Armstrong' +author = 'Whitney Armstrong' + +# The full version, including alpha/beta/rc tags +release = '0.9' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ 'recommonmark','sphinx_rtd_theme', 'breathe', 'exhale' ] +# Setup the breathe extension +breathe_projects = { + "My Project": "./doxyoutput/xml" +} +breathe_default_project = "My Project" + +# Setup the exhale extension +exhale_args = { + # These arguments are required + "containmentFolder": "./api", + "rootFileName": "library_root.rst", + "rootFileTitle": "Library API", + "doxygenStripFromPath": "..", + # Suggested optional arguments + "createTreeView": True, + # TIP: if using the sphinx-bootstrap-theme, you need + # "treeViewIsBootstrap": True, + "exhaleExecutesDoxygen": True, + "exhaleDoxygenStdin": "INPUT = ../src/GenericDetectors/beamline/src" +} + +# Tell sphinx what the primary language being documented is. +primary_domain = 'cpp' + +# Tell sphinx what the pygments highlight language should be. +highlight_language = 'cpp' + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' +html_theme_options = { + 'canonical_url': '', + 'analytics_id': 'UA-XXXXXXX-1', # Provided by Google in your dashboard + 'logo_only': False, + 'display_version': True, + 'prev_next_buttons_location': 'bottom', + 'style_external_links': False, + #'vcs_pageview_mode': '', + 'style_nav_header_background': 'white', + # Toc options + 'collapse_navigation': True, + 'sticky_navigation': True, + 'navigation_depth': 4, + 'includehidden': True, + 'titles_only': False +} + + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] diff --git a/docs/contents.rst b/docs/contents.rst new file mode 100644 index 0000000000000000000000000000000000000000..037ddf411e4a3fa128c95733b12d3c3304401af6 --- /dev/null +++ b/docs/contents.rst @@ -0,0 +1,5 @@ +.. toctree:: + :maxdepth: 2 + + intro + diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..2a765061da45c55872094dd18ac93c2b282406c2 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,21 @@ +.. solid documentation master file, created by + sphinx-quickstart on Tue Jun 2 16:27:33 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Solid Framework +=============== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + contents + api/library_root + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/intro.rst b/docs/intro.rst new file mode 100644 index 0000000000000000000000000000000000000000..e8b5eb2b72015110672affeee773a9afdb5b607e --- /dev/null +++ b/docs/intro.rst @@ -0,0 +1,3 @@ +Introduction +============ + diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000000000000000000000000000000000000..2119f51099bf37e4fdb6071dce9f451ea44c62dd --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..0deec52ddaddc7105623ed4c8cbd346f02e686d1 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,4 @@ +sphinx_rtd_theme +sphinx>=2.0 +breathe>=4.13.0 +exhale