...
The value of the key 'charm' will be 'beauty, truth, strange'. These can be read as individual values using the method String.split() .
Accessing Conditions
The current system uses the following algorithm for accessing conditions based on detector name.
As an example For the following sections, we will use as an example the SDJan03 detector with corresponding tag of sdjan03 detector.
Detector Alias Files
Recursively translate the detector name using alias files. An alias file is a property file named alias.properties that lists the locations of conditions information for a specific detector tag.
It has the following format.
No Format |
---|
[detector_name]: [conditions]
|
The value of conditions can be any of the following.
- URL Zip File
- Local Directory
- Local Zip File
Suppose you want to look up conditions called SmearingParameters for sdjan03.
These could be specified in any of these three ways.
- As a zip file on a website.
No Format sdjan03: http://www.example.com/path/to/sdjan03.zip
- As a local directory.
No Format sdjan03: file:/path/to/my/sdjan03/
- As a local zip file.
No Format sdjan03: file:/path/to/my/sdjan03.zip
Multiple detector tags can be used used in the same alias.properties file, but each detector tag should be listed only once.
Alias Locations
The alias file is stored in one or more of the following locations.
- The LCSim work directory in the user home directory.
No Format ~/.lcsim/
- Within the lcsim.jar file at the following path.
No Format org/lcsim/detector/
- At a URL on the LCSim website.
No Format http://www.lcsim.org/detectors/
...
as this is likely the only place to which you'll have write access, and your own aliases should be kept separate from the shared ones.
Alias Translation
Once this translation is complete, the resulting name value is checked as follows.
- If the name is a URL with a file: protocol, the file or directory specified is assumed to contain the conditions.
Here is an example zipfile location.
Here is an example directory.No Format sdjan03: file:/path/to/sdjan03.zip
No Format sdjan03: file:/path/to/sdjan03
- If the name is a remote URL then an attempt is made to download a zip file from that location (if 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
- If the name is not a URL, we search for a directory or zip file with that name in the following locations:
- ~/.lcsim/detectors
- Within the lcsim.jar file at
No Format /org/lcsim/detector/
- At
No Format http://www.lcsim.org/detectors/
...