You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 19 Next »

Building org.lcsim software

To build the org.lcsim software you first need to have the following installed.

SLAC Unix

These tools are all pre-installed on SLAC unix. Just issue the command:

setenv JAVAVER 1.5

to make sure you get Java 1.5

The lcsim software consists of two packages, the geometry package, and the analysis and reconstruction package. You must obtain and build the geometry package first, since the analysis package depends on it.

Here are condensed instructions:

setenv CVSROOT :pserver:anonymous@cvs.freehep.org:/cvs/lcd
cvs login (just hit enter when prompted for password)
cvs co GeomConverter
cvs co lcsim
cd GeomConverter
maven
cd ../lcsim
maven

Testing the installation

Note that, by default, maven will also run the JUnit tests associated with this distribution.
Test reports are written to the

target/test-reports/

directory.

If you wish to build without testing, issue the following command, but do this at your own risk:

maven -Dmaven.test.skip=true

To execute a single test case (e.g. that for org.lcsim.recon.cluster.fixedcone.FixedConeClusterer):

maven test:single -Dtestcase=org.lcsim.recon.cluster.fixedcone.FixedConeClustererTest

Additional Component Tests

There are also other component tests for many of the org.lcsim classes. Until they can be ported to the JUnit structure they need to be manually executed. Do so with the following ant target:

ant -f ctest.xml

Running from the command line

We have defined a maven goal to allow users to run a java class using maven from the command line.

maven run -Drun.class="class to run" -Dargs="arguments to be passed to the class."

For example:

 maven run -Drun.class="org.lcsim.geometry.compact.converter.heprep.Main" -Dargs="test/org/lcsim/geometry/compact/sdjan03_compact.xml tst.heprep"

The documentation for the plugin is in:

http://java.freehep.org/freehep-run-plugin/index.html

Building org.lcsim with NetBeans

In addition to the above you will need:

Installing mevenide

Download this small autoupdate module. To install, start NetBeans and select the "Update Center Wizard" option from the "Tools" menu. Select the "Install Manually Downloaded Modules (.nbm Files)." On the next page, select "Add..." from the "Modules to Install" panel and navigate to the location of the downloaded file. On the next page, transfer that file from the "Available Updates and New Modules:" panel to the "Include in install:" panel and click on the "Finish" button.

Once these are installed you can open the project folders in NetBeans and build using maven from inside netbeans.

Building org.lcsim with Eclipse

Instead of NetBeans, you can also use the Eclipse IDE to build org.lcsim and write your applications.
Download Eclipse: http://eclipse.org/downloads/index.php
I recommend the latest "3.1 Stream Stable Build" (M6 at the time of this writing), because of the better support of Java 1.5 features.
The Mevenide plugin can be installed as follows:
Help->Software Updates->Find and Install...
Select "Search for new features to install", click 'Finish'
Select "New Remote Site"; for Name enter "Mevenide", for Location enter http://mevenide.codehaus.org/release/eclipse/update/site.xml
Select the latest versions of both Maven and the Mevenide plugins, click 'Next'
You will have to agree to a license agreement.
The plugin will then be downloaded.
Confirm the installation with 'Install All'
When finished, you will be asked to restart the workbench.
Click 'Yes'.

Importing org.lcsim directly from CVS

You can now install the CVS project by selecting File->New->Project
Select "CVS project" and enter the information about server and password from above.
org.lcsim will be downloaded into the workbench.

You can add the 'Maven nature' and the 'Java Nature' to your project by right clicking on the project and selecting the entry from the context menu.

Source Path

You may have to change the source path of the project, otherwise Java may be inclined to look for packages src.org.lcsim.* instead of org.lcsim.*. This can be done by right-clicking on the project and selecting Properties->Java Build Path. The src/ folder should be selected as the only source folder.

External Dependencies

When building the project outside of Eclipse, Maven secretly downloads a plethora of external libraries. If you want to build the project inside of Eclipse, you have to add those libraries to the build path. This can be done by right-clicking on the project and selecting "Properties". The JAS libraries can be used alternatively.

Install Custom JARs into JAS3

To use a different version of org.lcsim, you can execute the following from the checkout directory.

maven jas:install

This will copy the lcsim and GeomConverter jars to your JAS3 extension directory at ~/.JAS3/extensions.

  • No labels