SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Det. Search
Who's who?
Meetings
FAQ
Images
Archive
Systems
Performance
Intern. region
Vertex Tracker
Drift chamber
DIRC
Calorimeter
IFR
LST
Magnet
Electronics
Trigger
Operations
Run Coordination
Contact Experts
Shift Takers Info
Operations Manual
Electronic Logbook
Ops Hypernews
Shift Signup
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

Compiling the ZPD libraries

There are 3 private ZPD testing libraries for offline, dual-use, and online.

L1ZpdTools Offline library. Contains tools for interfacing with L1DczTest to dump text files with ZPD simulation information.
L1ZpdCommon Dual-Use
L1ZpdDoDah Online

Getting the packages

Make an online release (I called mine teststand). You probably want to use whatever is the latest online release rather than 10.20.0; see $BFDIST/online_releases.

  newrel -t -o 10.20.0 teststand
  cd teststand
  srtpath
  addpkg -h workdir
  gmake workdir.setup
  gmake installdirs

Get the BaBar packages. L1DctOdf and L1DctOnline are part of the release and you might not need them depending on how recent your release is in comparison to changes in the other packages.

  addpkg -h L1DczTest
  addpkg -h L1DctDiagOnline
  addpkg -h L1DctTeststand
  addpkg PackageList
  addpkg -h L1DctOdf
  addpkg -h L1DctOnline

Get our private packages:

  setenv ZPDCVS /afs/slac.stanford.edu/g/babar/detector/trg/Zpd2/cvsroot
  cvs -d $ZPDCVS checkout L1ZpdDoDah
  cvs -d $ZPDCVS checkout L1ZpdCommon
  cvs -d $ZPDCVS checkout L1ZpdTools

Edit the PackageList to tell it about our secret packages.
In the file PackageList/link_all_reco.mk, find the section which begins with

PACKAGELIST += L1ZpdAnal

and insert this immediately before the L1ZpdAnal section:

PACKAGELIST += L1ZpdTools
ifneq ($(LINK_L1ZpdTools),)
  LINKLISTDEPENDS += [LINK_L1ZpdTools, $(LINK_L1ZpdTools)]
  override LOADLIBES += -lL1ZpdTools
  -include L1ZpdTools/link_L1ZpdTools.mk
endif

also add this before the L1DctCalOnline section:

PACKAGELIST += L1ZpdCommon
ifneq ($(LINK_L1ZpdCommon),)
  LINKLISTDEPENDS += [LINK_L1ZpdCommon, $(LINK_L1ZpdCommon)]
  override LOADLIBES += -lL1ZpdCommon
  -include L1ZpdCommon/link_L1ZpdCommon.mk
endif

Compile the offline libraries and binaries

Make the Offline libraries and binaries on a Linux machine (L1DczTest is broken on Sun...)

  [srtpath if you are returning to this as a new session]
  gmake L1DczTest.lib
  gmake L1DctDiagOnline.lib
  gmake L1ZpdCommon.lib
  gmake L1ZpdTools.clean
  gmake L1ZpdTools.lib
  gmake L1ZpdTools.bin

If you got any root related errors while compiling L1DczTest, it might be due to having previously defined a ROOTSYS and/or putting root in your path (e.g., in a .cshrc file). This is apparently a BaBar no-no.

Compile the online libraries

Make the Online / ROM libraries on a Sun machine (e.g. shire or bbr-refsun)

cd to your release and setup the environment (change 10.20.0 to whatever online release you used for newrel...)

  [cd to your release directory]
  source $BFROOT/package/WindRiver/windSolaris-1.0.1.d
  setenv ODF_BASE $BFROOT/dist/online_releases/10.20.0

Compile the libraries (you may not need the L1DctOnline and L1DctOdf steps if you online library is recent enough in comparison with your other packages):


  gmake -f Makefile L1DctOnline.segment
  gmake -f Makefile L1DctOdf.segment
  gmake -f Makefile L1DctDiagOnline.segment
  gmake -f Makefile L1DctTeststand.segment
  gmake -f Makefile L1ZpdCommon.segment
  gmake -f Makefile L1ZpdDoDah.segment

This will create a VxWorks library lib/segment/vxworks/libL1ZpdCommon.o and lib/segment/vxworks/libdodah.o.

These are loaded onto a ROM by using commands like those in /nfs/bbr-srv02/dataflow/7F/06/app/zpd/zpdlib:

unld odfPath("app/zpd/libL1ZpdCommon.o",odfScratchBuffer)
unld odfPath("app/zpd/libdodah.o",odfScratchBuffer)

ld 0,0,odfPath("app/zpd/libL1ZpdCommon.o",odfScratchBuffer)
ld 0,0,odfPath("app/zpd/libdodah.o",odfScratchBuffer)

makemap