- jwebb's home page
- Posts
- 2019
- 2018
- 2017
- 2016
- 2015
- 2014
- 2013
- November (1)
- October (1)
- September (1)
- July (1)
- June (1)
- April (1)
- March (3)
- February (1)
- January (1)
- 2012
- 2011
- December (2)
- September (3)
- August (5)
- July (6)
- June (6)
- May (1)
- April (5)
- March (5)
- February (2)
- January (2)
- 2010
- December (3)
- October (3)
- September (2)
- August (2)
- June (2)
- May (4)
- April (4)
- March (2)
- February (4)
- January (10)
- 2009
- 2008
- 2007
- 2006
- July (1)
- My blog
- Post new blog entry
- All blogs
Notes on starsim / agml build system
Typical calling sequence:
MACRO kuip4ever DETP GEOM y2020q field=-5.0 GEXEC [path]/geometry.so GCLOS all RETURN
where [path] is the path to the library being loaded. The [path] can be either $STAR_LIB/ or .$STAR_HOST_SYS/lib/, pointing to the geometry compiled as part of the library release or pointing to a locally built copy of the library. In both cases, ALL symbols (i.e. all STAR detectors) must be present in the library, or an error will occur when the library is linked into the executable.
An alternative to the GEXEC command is the MAKE command, which builds the geometry based on the source code in CVS.
MACRO kuip4ever DETP GEOM y2020q field=-5.0 MAKE geometry GCLOS all RETURN
This command will first try to build the code locally in ./pams/geometry. If that directory exists, then it must contain all geometry files. If not, it won't build. If that directory doesn't exist, it will build the code in $STAR/pams/geometry.
Proposed directory layout for AgML:
StarVMC/Geometry/Geometry.h # Master AgML/ROOT geometry file StarVMC/Geometry/Geometry.cxx StarVMC/Geometry/BbcmGeo/BbcmGeo.xml # Directories containing XML files for geometries ... StarVMC/Geometry/ZcalGeo/ZcalGeo.xml StarVMC/Geometry/Compat # Starsim compatability directory containing dummy modules described below...
Two passes will be performed to build the starsim library "xgeometry.so", and the VMC library "StarGeometry.so".
Pass 1 : xgeometry.so (libxgeometry.so)
When cons sees an XML file in the StarVMC/Geometry area, it will run mgr/agmlParser.py --file=$XMLFILE --export=Mortran, piping the result into a ".g" file in the build area.
When it sees a ".g" file in the StarVMC/Geometry area, it will copy it to the build area.
It will then compile using agetof, followed by gfortran... i.e. it will follow the same build procedure which occurs in pams/geometry.
Pass 2: StarGeometry.so (libStarGeometry.so)
When cons sees an XML file, it will run mgr/agmlParser.py --file=$XMLFILE --export=AgROOT --module=$XMLFILE:s/.xml// --path=$BUILD
When cons sees any other type of file, it ignores it
It then compiles using standard c++ / rootcint build.
For starsim integration:
gexec [path]/xgeometry.so
Works if we add a dummy XML module for every ".g" file which needs to be included...
<Export language="Mortran"> #include "pams/geometry/geometry/geometry.g" </Export>
<!-- with a special interface for geometry.g --> <Module name="xgeometry" comment="XML geometry initialization for starsim"> <Export language="Mortran"> call geometry() </Export> </Module>
- jwebb's blog
- Login or register to post comments