Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The default main method can be used when you are processing LCIO files using XML steering configurations.

Finding the Fieldmap

Most of the HPS detector geometries require a magnetic field map for the reconstruction or analysis to run. These maps must be located in a directory called fieldmap located in the directory from which you are running the executable or accessible via a symbolic link. The fieldmaps can be found online at: http://www.lcsim.org/resources/hps/fieldmap/

On Windows, you can create a symbolic link as follows:

Open a Command Prompt window with administrator privileges by clicking on Start -> All Programs -> Accessories and then right - clicking on Command Prompt and selecting Run as administrator. Navigate to the directory from which you will be running your program and create the symbolic link using mklink. Instead of linking directly to a specific fieldmap file, it's suggested that you link to a directory in which you maintain copies of all of the HPS fieldmaps. In the following example command, /D specifies linking to a directory and C:\work\hpsAnalysis\fieldmap is a common working directory (customize it to your installation).

Code Block
 mklink /D fieldmap C:\work\hpsAnalysis\fieldmap

Running a Specified Class's Main

...

  • It must be marked as public.
  • It must have a public static method called main (as shown above).
  • The main method must have an array of strings as an input variable.

Assuming that MyClass was bundled inside the distribution (which it isn't because it is just a dummy example!), it could be run from the command line via its main method as follows.

Code Block
languagebash
java -cp ./distribution/target/hps-distribution-bin.jar org.example.MyClass arg1 arg2 [...]

...

The handler and the level should not be assigned in the code, as this will instead be configured in the logging config file.