Versions Compared

Key

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

API Changes (for C++ users)

Two incompatible API changes have been made that will affect some C++ users (but not Python users). These areinvolve

  1. C++ Histograms
  2. Automatic header includes 

The reason for these changes is to allow installation of psana without requiring an installation of root. (We have replaced psana's build dependency on root with a run time dependency).

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:

Code Block
languagecpp
RootHistoManager::RootHMgr& rhmgr();
PSHist::HManager& hmgr();

rhmgr has been a deprecated function for some time that has now been removed. The interface is now

Code Block
languagecpp
boost::shared_ptr<PSHist::HManager> hmgr();

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.Details of these changes are found below in the section API Changes Details

Psana

  • IDataAllow user to override /reg/d/psdm as default location for data using environment variable SIT_PSDM_DATA
  • pypsalg: Added many new python wrappers to C methods in psalg.
  • pdscalibdata
    • AndorBaseV1.h - set Rows=0, Cols=0 in order to support variable shape for 514x512 and 2048x2048 data (PSAS-6, PSAS-121)
    •  in NDArrIOV1.cpp - in constructor 2 set m_size = nda_def.size(), other things are cosmetic.
  • ImgAlgos: add module EventCodeFilter (PSAS-122) 
  • CalibManager:
    • add option to select dark events in any run using event code filter (PSAS-122)
    • add GUIAlignment, and widget wrapper GUIROIMask (PSAS-6, PSAS-11). In many modules use class Frame in stead of QFrame + many cosmetic changes.
  • psana_test: minor update
  • psana_python: add boost converters for Event,Env,Source.
  • PSQt: Add modules WdgColorBar, WdgRadHist, WdgSpecHist, add multiple protections - the 1st stable version with all basic features (PSAS-11). Improve doxygen documentation, cleenup code.
  • PSCalib: add support for calibration types pixel_mask, pixel_bkgd; fix problem with different ndarray size/shape for common_mode.
  • pytopsana: add C++ class Detector with python wrapper for direct access to calibration data. 
  • Translator, ImgPixSpectra: minor changes due to root header files previously including some standard C++ declarations (PSAS-131)
  • RootHist: add factory function to return instance of PSHist::HManager to allow dynamic loading of RootHist (PSAS-131)
  • PSEnv: API changes as discussed above (remove rhmgr, change hmgr to return pointer, remove root header files) (PSAS-131)
  • psana: remove using statement for RootHistoManager::AxisDef (since package deprecated and has been removed) (PSAS-131)
  • psana_examples: update one example for new hmgr API (PSAS-131)
  • TimeTool: update Analyze, Check and Setup to use new hmgr API. Report non-fatal errors if histogram service is not available, but otherwise continue (PSAS-131)

...

RootHistoManager: use of this, through PSEnv::Env::rhmgr() has been deprecated in favor of PSEnv::Env::hmgr() for some time now. With this release it has now been removed so users will need to use hmgr() (note API change to hmgr above). (PSAS-131)

External Packages

API Changes Details
Anchor
api_change_details
api_change_details

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:

Code Block
languagecpp
RootHistoManager::RootHMgr& rhmgr();
PSHist::HManager& hmgr();

rhmgr has been a deprecated function for some time that has now been removed. The interface is now

Code Block
languagecpp
boost::shared_ptr<PSHist::HManager> hmgr();

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.

Bugs fixed

  • PSCalib: GeometryObject - delete and make new array pointers only if array size is changing (PSAS-11)
  • ImgAlgos PixCoordsProducer - move calls of savePixCoordsInCalibStore(env) in checkCalibPars(...) (PSAS-11)

...