# Presentation: 073126

## C++ Overall Libraries Projects

- ZOOM / FNAL-CLHEP “Export”
- “ZOOM Reorganization” is included in this
- ZOOM Automated Validation
- Making these libraries available for practical use beyond Run II
- Other FNAL-centric experiments
- HEP worldwide community
- General C++ community
- These projects also aim at making maintenance more efficient

## We should not plan to declare these libraries to be “completed, no further attention paid, no further effort spent”  

*“**Maintenance is a **solution**, not a **problem**”*
- R. L. Glass
- Corrections ...
- Necessary corrections are always discovered at a declining but not vanishing rate.
- New Platforms ...
- Even a “perfect” package needs attention when moving to new platforms.
- Opportunities for enhancement ...
- The ability to enhance and evolve common code to cope with newly discovered needs should be perceived as an opportunity, not a burden.

**Notes:**
Necessary corrections are always discovered at a declining but not vanishing rate.
Even a “perfect” package needs attention when moving to new platforms.
The ability to enhance and evolve common code to cope with newly discovered needs should be perceived as an opportunity, not a burden.

## These projects have been seriously delayed

- The imagined schedule:
- Suitable re-organization of CLHEP was to be in place quickly
- ZOOM export was to be done by now
- CLHEP and ZOOM integration completed by now
- Large (but not complete) body of automated ZOOM validation
- CLHEP issues ...
- We had areas where the best and easiest solution for us required changes CHLEP was unwilling to make.
- We spent a fair amount of time searching for a solution that met all our constraints – ended up with compromises.
- The ZOOM export was found to depend on CLHEP...
- So it was infeasible to progress fully on the former before the issues concerning the latter were resolved
- Much less manpower devoted to this than anticipated ...
- Vacations
- Effort switched to CMS
- The increase in administrative overhead does not come for free

**Notes:**
We had areas where the best and easiest solution for us required changes CHLEP was unwilling to make.
Spent a fair amount of time searching for a solution that met all our constraints – ended up with compromises.

## Where we are on the schedule:

- Re-organization of CLHEP is done, and final testing is about completed
- ZOOM export is mostly done; significant final steps are to be done now that the CLHEP issues are fully settled
- The matter of CLHEP and ZOOM integration is automatic by design
- Automated ZOOM validation scaffolding is present, but body of actually conforming validation suites is not

## CLHEP Portion of CLHEP/ZOOM

- Goal is
- single thread of maintenance
- single point of distribution
- single versioning convention
- universal build procedures
- straightforward incorporation of ZOOM packages into CLHEP (when appropriate)
- as little impact on existing FNAL users as possible

## Organization of CLHEP and ZOOM

- CLHEP consists of distinct “packages” with well-defined dependencies
- The sources are available from cvs at CERN
- Build using procedures familiar to general Unix community
- Normative CLHEP distribution consists of one “deliverable” combining all packages
- Source code tarball
- Build is simple matter of running *configure* and *make*
- This is the usual channel of distribution

## Organization of ZOOM Packages

- ZOOM consists of distinct “packages” with well-defined dependencies
- not yet accepted into “CLHEP”
- sources available from a FNAL cvs repository
- build using the identical familiar procedures
- In both cases, there is completely unified maintenance philosophy:
- No longer are packages released “in lockstep”
- We can (and will) still rtag overall release numbers, for convenience of Run II and possibly other experiments
- Obtaining and using the “ZOOM” packages entails *precisely* the same steps as for the “CLHEP” packages

## Using CLHEP and ZOOM

- Obtain the packages, either individually or as a single distribution
- Run the familiar sequence of scripts:
*configure* ...
*make ... *
*make check ...*
*make install* ...
- This can be done once for the whole distribution, or individually by package
- If building by package, you will have to understand and respect dependencies to build in the proper order

**Notes:**
configure – this figures out needed tweaks based on your system
make – this builds the compilable software
make check (optional) – this builds and executes validation suites
   make install – this places libraries and headers in appropriate places

## Platform Issues

- Notice that “build ISOcxx” is conspicuously absent from the build procedures
- ISOcxx is obsoleted by these changes
- Tailoring for platform particulars is done through the *configure* script
*configure* is not a replacement for ISOcxx:
- CLHEP and ZOOM will no longer provide a crutch for older compilers which do not support C++ well enough to deal with the constructs used in these packages

## (FNAL-specific) Using ZOOM and CLHEP

- There will be a Kit of CLHEP + ZOOM
- We don’t intend separate kits of individual packages ...
- User code may need to adapt to the new organization
- Paths to package headers ...
- Forwarding headers to avoid needing changes in general user source files are being developed
- Looks like this will work, but there is no guarantee of success
- Use of namespaces ...
- We will try to provide mechanisms to eliminate or minimize the burden on users

**Notes:**
Organization of paths to package headers
Forwarding headers to avoid needing changes in general user source files are being developed
Looks like this will work, but there is no guarantee of success 
Use of namespaces
ZOOM pressed this issue 4 years ago
But Run II code is still generally careless of it
CLHEP at this point is demanding namespaces
and they are not in the wrong!
But CLHEP 1.9 is backward compatible in this regard

## Vetted CLHEP

- Point is: we have put CLHEP into a form which is something sensible to unify with the ZOOM packages...
- What this entailed
- Build procedures more in line with best and most common practices
- Elimination of organizational features that would unnecessarily force impact on our users
- Lynn Garren doing (did) much of the principal work
- In close touch with CERN people
- In coordination with W. Brown’s work on ZOOM
- Status – pretty much complete
- Running some tests to verify that the build procedures go smoothly
- The vetted packages *are* the CLHEP you would get from the CERN repository now.

## ZOOM Validation 

- The scaffolding is in place
- Validations to be run via *make check*
- Individual tests must report success –
- silently
- with no side effects or spoor
- We know how to wrap individual tests of various kinds so that they conform to these requirements
- We have concrete schemes for organization of material needed for validation
- test code
- test input
- output comparison files
- scripts wrapping the tests

## Status of Package Validation Suites

- Extensive suites of test programs exist
- Many are suitable for turning into validations
- Need to “prune” to provide not-too-lengthy suites
- Turning the existing tests for each package into validations that meet our criteria has barely begun
- Re-organization of ZOOM with regard to CLHEP was a pre-requisite for creating final validations
- The task of creating automated validation is felt not to have high priority, so it may not be assigned significant  effort even when it *can* sensibly proceed

## CLHEP Validation

- Since ZOOM and CLHEP packages are now organized along the same lines, the same validation philosophies and scripts can apply to CLHEP
- In particular, *make check* exists
- Each CLHEP package is required to have at least nominal validation
- But we are shooting for a much more meaningful level
- We have provided meaningful validation suites for some CLHEP packages for which we are editors
- There is no commitment on our part to fill in the validation suites for each CLHEP package in general
- We are not tightly involved with every package
- We are not the CLHEP software quality police

## Status Summary

- (this slide added based on post-talk discussion)
- Zoom export and Zoom/CLHEP re-orgnization are actually the same project
- Although it may look like this has been “ongoing” (open-ended) it does have a defined completion point (active)
- And that completion point is just about here
- Zoom validation suites will remain an active effort
- we may need to ask for a specific project designation
- validation suites are unlikely to be completed rapidly due to low priority
- There *is* an ongoing project in this area, namely maintenance and enhancement of ZOOM/CLHEP.