Download GAUDI User Guide
Transcript
GAUDI
Chapter 14 Accessing SICB facilities
User Guide
Version/Issue: 6/3
•
The converter factory must be made known to the system. This in fact depends on the
linking mechanism: If the converter is linked into the executable as an object file, no
action is necessary. However, usually the converter code resides in a shared or
archive library. In this case the library must have an initialisation routine which
creates an artificial reference to the created converter and forces the linker to include
the code in the executable. An example of creating such a reference can be found in
the file
$LHCBSOFT/SicbCnv/<version>/SicbCnv/SicbCnvDll/SicbCnv_load.cpp.
The convention for these initialization files is the following: for any other package
replace the string “SicbCnv” with “OtherPackage”.
•
Compile link, debug
•
Once the converter works, remove unnecessary TODO comments.
14.4 Access to the Magnetic Field
The magnetic field map will be accessible in the future via the transient detector store. For the
time being, as this is not implemented and as access to the magnetic field has been requested,
we have provided a magnetic field service. Again this is effectively just a wrapper which uses
SICB routines to read the information from a .cdf file.
The location of the field.cdf file is provided by the standard.stream file which is read
in by a SICB routine called from Gaudi. This file is in the data base area,
$LHCBDBASE/standard.stream in AFS. For every version the file used in the production
is read in. The location of the standard.stream file will be taken from an environment
variable as per normal SICB operation.
To use the Magnetic field service one should modify the jobOptions.txt file to include the
following:
ApplicationMgr.ExtSvc = { "MagneticFieldSvc"};
Any algorithm which requires the use of the service makes a request via the service()
method of the Algorithm base class:
IMagneticFieldSvc* pIMF= 0;
StatusCode sc = service("MagneticFieldSvc", pIMF );
The service provides a method:
StatusCode fieldVector(HepPoint3D& Pos, HepVector3D& field)
page 164