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!
Simulation Home
Sim Codes
Event Generators
Bogus/BgsApp
SimApp
Bear
Moose
Fast Simulation
Geant4 Home
Subsystems
PEP
SVT
DCH
DRC
EMC
IFR
Mixing/Trigger
Backgrounds
Mixing
Trigger Simulation
MC Truth/QA
MC Truth
Micro/Mini
QA Histograms
Sim Error Reports
REMEDY
MC Production
Production Home
Test Production
Tools
Database
CERNLIB
CLHEP
Event display
RandControl
Scripts
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

Geometry data movement to C++: Geometry database

Changes made to implement moving of geometry (.db file) data to XDR output:
  • dbio extended to support 'database mode', currently done by dbin, so dbio's I/O facilities are available for the geometry data.
  • geometry data block defined for the XDR output file header, ready to test when geometry is read via dbio. OR simultaneously read geometry with both dbin and dbio (data spaces are different).
  • BBSIM code using the geometry database has to be modified for dbio-style references. Extensive Fortran changes required. UNLESS dbin/dbio used simultaneously.

Geometry data movement to C++: Derived data

Implementation of moving derived data to C++ via the XDR event file (header):
  • Data structure definition mechanism of dbio extended to support versioned derived data structures
  • working example provided for defining data structures to transfer derived geometry constants from the simulation to reconstruction and other C++ codes.
  • XDR file I/O code and versioning mechanism extended to support I/O of a version-protected set of derived data structures in the run header.

Example of use of derived data structures:

!
!  ******* Structures to save derived data
!
!  Derived data version number used to support versioning. Must be 
!  incremented when the derived data structures change, and the
!  data handling code in derived_data.c and data_to_xdr.c modified
!  accordingly to support the new ID.
!

incprefix DbiEvent

incname DerivedData
parameter DerivedDataVsn  1     ! Derived data version number.

include TestData.ds

TestData.ds

incname TestData
!
!  Data structure definition for derived data. The 'nocode' directive
!  specifies that the C++ code to create a class corresponding to this
!  template is not needed.
template TestData nocode
  int indx
  real x
  real y
  real z
end template

dimension TestDataMax 500
record TestData(TestDataMax)

DataToDs.F

      subroutine DataToDs
      implicit none
      print *,'Writing derived data block to XDR file'
      call TestDataToDs
      end

TestDataToDs.F

      subroutine TestDataToDs
************************************************************************
*
*       Move derived data to the I/O data structures
*
************************************************************************
      implicit none
#include "gnbase/run_db.inc"
#include "DbiEvent/TestData.inc"
*
      integer i
*
      n_obj_TestData = 100
      do i=1,100
        TestData(i).indx = 1
        TestData(i).x = i*10.
        TestData(i).y = i*100.
        TestData(i).z = i*200.
      enddo
      end