Analysis Software

Setting up Eclipse for org.lcsim

  • Get the latest Eclipse with JDK - 3.4 (Ganymede) has been tested and is working fine
  • install and update the PATH variable, for example
    export PATH=$PATH:/usr/local/sbin/eclipse/
  • Get Maven2 for project management - 2.0.9 has been tested and is working fine
  • install and update the PATH variable, for example
    export PATH=$PATH:/usr/local/sbin/apache-maven-2.0.9/bin/
  • setting of MAVEN_HOME is not needed. In fact MAVEN_HOME is only needed for maven1 and changing it will prevent maven1 from working correctly.
  • start eclipse
    • add the Q-plugin to eclipse to allow maven2 project management
      • go to Help->Software Updates->Available Software->Add Site and add the site of the Q-plugin to the list
        http://q4e.googlecode.com/svn/trunk/updatesite/
      • add all the Q-plugin software to your eclipse
    • create a new java project for GeomConverter
      • File->New->Java Project
      • enter a project name (GeomConverter) and choose "create project from existing source" and browse to the location of GeomConverter, for example /usr/local/sbin/GeomConverter
      • finish
    • create a new java project for org.lcsim
      • File->New->Java Project
      • enter a project name (LCSim) and choose "create project from existing source" and browse to the location of org.lcsim, for example /usr/local/sbin/org.lcsim
      • add GeomConverter to the required projects on the build path
      • finish
    • let Maven2 manage GeomConverter and LCSim, for each do both steps
      • rightclick the project -> Maven2 -> Use Maven Dependency Management
      • rightclick the project -> Maven2 -> Manage Dependencies
  • create a project using GeomConverter and LCSim
    • File->New->Java Project
    • enter a project name
    • add GeomConverter and LCSim to the projects on the build path
    • finish
    • now the code completion (ctrl+space) should work for classes from org.lcsim
  • test if everything works
    • get the sample code for MainLoop.java and Analysis101.java, as well as the sample data psiMuMu.slcio (all found here)
    • import the files into your project
    • change the input and output paths in the MainLoop.java
    • run the project as a java application (rightclick the project->Run As->Java Application)
    • the output AIDA file can be viewed with JAS3 for example

Analysis using JAS3

  • create an analysis driver in eclipse. A tutorial can be found here. In this case you don't need a MainLoop.
  • open an lcio file in JAS3 including the data you want to analyze (File->Open File)
  • open the java file containing the driver in JAS3 (File->Open File)
  • compile the java file (File->Compile) and load it (File->Load)
  • run the analysis (alt+G)
  • you can also edit the java file in eclipse simultaniously. Jas3 will notice that the file has changed you only need to compile it again and you don't have to load it again.
  • rewind (alt+R) and run the analysis again (alt+G)

Analysis in batch mode

  • Tutorial for using a java or a jython wrapper instead of JAS3
  • follow the tutorial and remember to set the CLASSPATH variable.
    If you use maven2 these are the required paths for the tutorial to run:
    export CLASSPATH=$CLASSPATH:/usr/local/sbin/lcsim/target/lcsim-1.12-SNAPSHOT.jar
    export CLASSPATH=$CLASSPATH:/usr/local/sbin/GeomConverter/target/GeomConverter-1.9-SNAPSHOT.jar
    export CLASSPATH=$CLASSPATH:~/.m2/repository/hep/aida/aida/3.3/aida-3.3.jar
    export CLASSPATH=$CLASSPATH:~/.m2/repository/org/freehep/freehep-physics/2.1/freehep-physics-2.1.jar
    export CLASSPATH=$CLASSPATH:~/.m2/repository/org/freehep/freehep-record/2.0/freehep-record-2.0.jar
  • It seems, that for (t)csh the path ~/ is not resolved correctly. So you have to put the absolute path instead!!!

-- ChristianGrefe - 16 Sep 2008

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2009-10-23 - ChristianGrefe
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CLIC All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback