Page History
This section will guide you trough the steps necessary to perform simple analysis in a C++ analysis framework (psana). For more detailed description of psana consult Psana User Manual - Old.
User modules in psana are the instances of the C++ class which must inherit from a special base class psana::Module
. There are several methods in the base class which can be overriden in the subclass (event() must always be implemented):
...
Code Block |
---|
% psana /reg/d/psdm/AMO/amo14110/xtc/e43-r0100-s0* [info:my_ana_pkg.my_ana_mod:thresh4390] Fraction of events with energy>4390 is 55.613% [info:my_ana_pkg.my_ana_mod:thresh4400] Fraction of events with energy>4400 is 15.9316% |
External Libraries and scons Build Customization
For the standard SIT packages it is usually sufficient to call standardSConscript() for customization such as linking to external libraries and adding compiler flags. These customizations apply to all build targets in the package. Here is a complete list of options for standardSConscript():
LIBS - list of additional libraries needed by this package
LIBPATH - list of directories for additional libraries
BINS - dictionary of executables and their corresponding source files
TESTS - dictionary of test applications and their corresponding source files
SCRIPTS - list of scripts in app/ directory
UTESTS - names of the unit tests to run, if not given then all tests are unit tests
PYEXTMOD - name of the Python extension module, package name used by default
CCFLAGS - additional flags passed to C/C++ compilers
NEED_QT - set to True to enable Qt support
For example, to link to the Gnu Scientific Library (which is installed on the analysis machines) add
standardSConscript(LIBS='gsl gslcblas')
...