GLAST LAT Data Format \n (LDF) \n parser package

v06-02-00

glast_galaxie.gif

Introduction

This package contains a set of C++ classes for navigating LAT Data Format (LDF) event data. It also includes code necessary for exposing these C++ classes to Python (the sip files).

The LDF data format is defined in:

Also Online System Science Data Format (LDF) may be of assistance.

Building LDF libraries and example code

If you're interested in building only the libraries and test code for either of the supported platforms, you don't need LATTE, Python or sip as described below. Just the compilation tools listed are sufficient.

Windows XP

Required software:

Building with Visual Studio .NET 7.1 is supported (.sln files). The 7.0 project files (.vcproj) are also included but are no longer supported, so may be out of date.

Library: Open VS and load the LDF project. Build.
Example code: Open VS and load test/LDFdump. Build.

SLAC Linux (ex: libra3.slac.stanford.edu)

Required software:

You'll be building in a build directory, e.g. LDF-BUILD. If at any point you don't like it's contents, delete it and start over. This doesn't affect the source tree in LDF.

> cvs checkout Online/LDF
> mkdir Online/LDF-BUILD  # substitute BUILD with whatever you like
> cd Online/LDF

Execute the following shell script. This needs to be done only on a fresh cvs check-out or if the configure.in file changed or any change in the m4 macros in config/m4.

> ./autogen
> cd ../LDF-BUILD

Run the configure procedure. If you're building in AFS space give it the option --disable-libtool-lock. If python is not installed in the default location, add the option --with-python-include=<python path> in the configure line. You can influence where the products are installed with the --prefix option. Do configure --help for more details.

> ../LDF/configure
All the checks this procedure makes should pass. This procedure will use automake to read the Makefile.am files and generates the Makefile.in files, and autoconf to generate the configure script. The configure script will then generate the Makefiles and some other files that need configuration.

> make
will create the shared library files libLDFc.so, which C++ programs use and LDF.so, which can be imported from python. It will also build the test executables are in test/.

You can build the html documentation using

> make docs
Typically there is no need to do this since the documentation will be kept up to date at the GLAST LAT I&T/Online web site.

Use

> make install
to install the package in the directory given with the --prefix option to configure. If it was omitted, this command will install into /usr/local.

Using LDF example code:

Executable

On Windows, the executable is located in either test/Debug or test/Release, and is named LDFdump.exe. On Linux, the executable is test/LDFdump. Both have the similar syntax:
LDFdump.exe <ldf filename>
This executable can only dump datagram encapsulated files (such as .ldf or .arch files)

FITS files can be run through RunControl/fits2Arch.py to generate an .ldf or .arch file that can be dumped using test/LDFdump.

Python

On either Windows or Linux, cd to test and execute the following from the command line:
> python -i LDFdump.py
At the python prompt the following functions are available:
>>> testRaw(<file>)      # dump a .ldf or .arch file
>>> testFITS(<file>)     # dump a FITS format file
>>> testEBF(<file>)      # dump a file containing "pure" EBF events,
                         # without datagram encapsulation
>>> testHex(<file>)      # dump a hex dump from a text file
                         # (Cut and paste the event dump generated
                         # by evtCli or od -t x4.)
>>> test(<buffer>)       # dump a binary buffer.  Several are defined in
                         # LDFdump.py:  temBuf(), aemBuf(), evtBuf(), etc.
>>> testRaw_Dist(server) # Dump events from a multicast server

As well, the following runs testRaw(<file>) from the command line:

> python LDFdump.py <file>

Writing your own

For an example of the C++ API, take a look at LDFdump.cpp in the test directory. Another example might go as follows:

For an example of the Python API, take a look at LDFdumper.py.

Releases

See Release notes for changes, new features and bug fixes.
Generated on Mon Jul 31 17:48:10 2006 for LDF v06-02-00 by doxygen 1.4.7