[Feedback][Tutorial Contents][hep.lcd Home]
![]()
Although in principle JAS can read the ASCII files produced by GISMO directly, in practice this is very slow, so instead we first convert the ASCII files to a special "lcd" format which JAS can read much faster. The code for performing this conversion is included in the lcd.jar file you downloaded and installed in the first tutorial. To convert files from ASCII to lcd format it is convenient to use a simple front-end script which sets up the necessary environment and runs the conversion program. Two versions of the script are available, one for Windows and one for Unix.
Download the appropriate script by pushing one of the buttons below, and store it in the directory where you have your ASCII files.
Note that after downloading the files in may be necessary to make some changes to them if your JAS or lcd.jar files are not installed in the default location.
To run the program just issue the command:
ascii2lcd inputfile.dat outputfile.lcd
where inputfile and outputfile are replaced with appropriate names. ascii2lcd can also directly read compressed (.gz) versions of the ascii file, just use the -g option if your input files are compressed.
ascii2lcd -g inputfile.dat.gz outputfile.lcd
If you have a large number of ASCII files you want to convert to .lcd files, it might be convenient to use a makefile to run ascii2lcd. An example of a suitable makefile (for use with gmake) is given here.
| # Convert all the .gz files to .lcd files DATADIR
:= /nfs/surrey01/work/richard GZFILES := $(wildcard $(DATADIR)/*.dat) all: $(LCDFILES) $(LCDFILES): $(LCDDIR)%.lcd: $(DATADIR)%.dat |