Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Below we document details of the two API changes affecting C++ users.

C++ Histograms

Psana provides a histogram mechanism that is available to C++ modules. (This mechanism is not part of the Python interface where one can use numpy or scipy). The API to use this mechanism has changed. The old API implemented the following two methods of PSEnv::Env:

...

Clients of hmgr() need to check that they have a valid pointer before using histogram services, and be cognizant of the change from a reference to a pointer in the return argument of hmgr. Otherwise, there is no change to user code. The histogram service should work as expected. However in the future, we may install psana in computing centers where hmgr() returns null and no histogram service is available for C++ modules.

Automatic Header Includes

Psana used to include certain header files from the root C++ library. These headers in turn included numerous items from the standard C++ library, and used using std statements. For example, a psana C++ module did not need to include <fstream>, it could just use ofstream without qualifying it as std::ofstream. We have since removed these root headers. Consequently users may need to include the appropriate headers from the C++ library in their own code, and make use of the std:: namespace qualifier.