Refactoring #1471

Envelope task #1606: === Manual and Examples ===

Revise user example demonstrating BornAgain usage from C++

Added by pospelov over 4 years ago. Updated about 4 years ago.

Status:ResolvedStart date:17 Jun 2016
Priority:NormalDue date:
Assignee:wuttke% Done:

0%

Category:-
Target version:-

Description

We have in the directory ./Examples/cpp an example demonstrating how to simulate from C++.
It has to be repaired/revised, including CMakeList.txt which comes along.

The suggestion is to combine this with the major restructuring of our header files.

  • Define minimal amount of header files which goes in the <installation>/header directory.
  • Make sure that none of these files refer to gsl/boost/fftw headers.
  • Use this opportunity to remove unnecessary headers along the whole code base.
  • Include validation of cpp example in the release procedure.

History

#1 Updated by wuttke over 4 years ago

For the time being, I inserted into the README:

THIS C++ EXAMPLE DIRECTORY IS CURRENTLY NOT MAINTAINED AND MAY BE OUT OF PHASE.

Is there a user demand? Wouldn't these users be happier with the Py API? Do they want to use Root?

#2 Updated by wuttke about 4 years ago

  • Parent task set to #1290

#3 Updated by wuttke about 4 years ago

  • Parent task changed from #1290 to #861

#4 Updated by wuttke about 4 years ago

  • Parent task changed from #861 to #1606

#5 Updated by wuttke about 4 years ago

  • Status changed from Backlog to Sprint
  • Assignee set to wuttke

#6 Updated by wuttke about 4 years ago

  • Status changed from Sprint to Resolved

Resolved in 33e970a: Example can be compiled, and generates simulated detector image that can be visualized with our standard Python script. README files are updated.

The files CylindersAndPrisms/CMakeLists.txt and modules/FindROOT.cmake demonstrate how to link with the installed BornAgain library (typically located at /usr/local/include/BornAgain-<version>).

Note that the BornAgain version number is hard-coded in modules/FindROOT.cmake; this is unsatisfactory, and needs to be addressed together with the entire installation and versioning scheme.

For the time being, this example is not put under continuous testing. There is no obvious way to do so, because we do not want to link with the »build« version of the BornAgain library, but with the installed version.

Also available in: Atom PDF