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!
Comp. Search
Who's who?
Meetings
FAQ Homepage
Archive
Environment
Administration
New User Info.
Web Info/Tools
Monitoring
Training
Tools & Utils
Programming
C++ Standard
SRT, AFS, CVS
QA and QC
Remedy
Histogramming
Operations
PromptReco
Simulation Production
Online SW
Dataflow
Detector Control
Evt Processing
Run Control
Calibration
Databases
Offline
Workbook
Coding Standards
Simulation
Reconstruction
Prompt Reco.
BaBar Grid
Data Distribution
Beta & BetaTools
Kanga & Root
Analysis Tools
RooFit Toolkit
Data Management
Data Quality
Event display
Event Browser
Code releases
Databases
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

A fix for clashing "bool" typedefs

[updated 11/11/98 for Solaris 2.6 using STL from RogueWave 7.0.8]

For compilers which do not have the built-in bool type, BaBar created a typedef equating bool to char. The RogueWave STL (which is the default implementation on BaBar platforms, except OSF1) solved the same problem by using typedef bool int. The two typedefs cannot coexist in an executable.

The OSF1 cxx and HP-UX aCC compilers have built-in bool type, and so there should be no clash between the BaBar typedef and the STL's typedef (neither typedef is used).
On Solaris and AIX: There is a work-around now available for testing. Basically, we replaced RogueWave's STL's bool typedef with the BaBar one, and recompiled the accompanying RogueWave library. We chose this solution, rather than changing the BaBar typedef to int, because there would be problems of function signatures being confused if we now changed from char to int.

The patched versions have been tested (to some extent) on Solaris and minimally on AIX. They are now the defaults (from SoftRelTools V00-06-78 onward).

For another site to implement this, you must modify stdcomp.h in the RogueWave include directory, copy the BaBarBool.hh file to that directory, and recompile the standard library. (Of course, RogueWave code is proprietary; you must have purchased a license to get it. The following is intended to illustrate how to do the modifications at other licensed sites.)

  • The bool typedef (in BaBarBool.hh) used can be found in the BaBar package, V00-05-00.
  • [updated 11/11/98] The modified piece of stdcomp.h file for Solaris can be seen here
    At SLAC, the Sun include directory is
    $BFROOT/package/RogueWave/708/workspaces/SOLARIS26/SUNPRO42/15s/include
    The recompiled library is ../lib/libstd15s.a (this is a multithreaded version).
  • The modified piece stdcomp.h file for AIX can be seen here
    At SLAC, the AIX include directory is $BFROOT/package/RogueWave/testSTL703/stdlib/include. The recompiled library is ../lib/libstdns.a ("not shared" version), along with a standard RogueWave link (libstd.a). This is RogueWave version 7.0.3.
Note that RogueWave's bool typedef and #defines have been commented out, and the file BaBarBool.hh has been included. (The slight differences between the two examples are accidental and unimportant.)

For more information on using STL in BaBar code, see the STL macro page.

Created: 18 August 1998
Last updated: 11 November 1998

By John Bartelt