Versions Compared

Key

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

...

The conditions database is designed to allow a running analysis or reconstruction module to access information about the run "conditions". In our current environment the "conditions" includes include the entire detector description, since this is not hardwired into the framework at all.

The recommended format for storing conditions file collections is in a zip file. The conditions database includes facilities for downloading . zip files from the web and caching them on the user's machine, so no web connection is required when running analysis or reconstruction, as long as the required conditions have been previously accessed.

...

The conditions themselves are stored as an arbitrary collection of files, either stored in a filesystem or in a zip file. The most common files used are property files (name, value pairs) or XML files (e.g. for geometry). However, however there are no constraints placed on the filesas to which file formats can be used for conditions information.

Properties Files

Properties files are simply sets of key, value pairs with the 'equals' as a '=', ':' or ' ' (space). Their The file extension should be '.properties'.

...

The value of the key 'charm' will be 'beauty, truth, strange'. These strings can be read as individual values using the method String.split() .

...

The value of conditions can be any one of the following.

...

  1. Local Zip File

Suppose you want to look up conditions called SmearingParameters for sdjan03.

These could be specified in any of these three ways.

  1. As a zip file on a website.
    No Format
    sdjan03: http://www.example.com/path/to/sdjan03.zip
    
  1. As a local Local directory.
    No Format
    sdjan03: file:/path/to/my/sdjan03/
    
  1. As a local Local zip file.
    No Format
    sdjan03: file:/path/to/my/sdjan03.zip
    
  1. Alias to another detector name.
    No Format
    sdjan03_custom: sdjan03
    

In the case of an alias, the program will use the

Multiple detector tags can be used used in the same alias.properties file, but each detector tag should be listed only once.

...

  1. If the name is a URL with a file: protocol, the local file (zip format) or directory path specified is assumed to contain the conditions.
    Here is an example zipfile location. No Format sdjan03: file:/path/to/sdjan03.zip Here is an example directory. No Format sdjan03: file:/path/to/sdjan03
  2. If the name is a zip file at a remote URL then , an attempt is made to download a zip the file from that location (if , unless the zip file is already in the local cache and up-to-date it is used from there).
    This is an example URL. No Format http://www.example.com/path/to/sdjan03.zip (~/.lcsim/cache). In this case, the local copy is used instead.
  3. If the name is not a URL, we search then it is an alias. The algorithm searches for a directory or zip file with that name in the following "canonical" locations:
    1. ~/.lcsim/detectors
    2. Within the lcsim.jar file at
      No Format
      /org/lcsim/detector/
    3. At
      No Format
      http://www.lcsim.org/detectors/

If none of these succeed in finding the conditions for the specied detector the program will terminate with an error. (In Java, this is a ConditionsNotFoundException).

Java Example

Here is an example of accessing conditions of the sdjan03 detector from Java code.

...