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!
Computing Search
Who's who?
Meetings
FAQ Homepage
Archive
Environment
Online SW
Offline
Workbook
Simulation
Reconstruction
Data Distribution
Beta
Beta Tools
Event display
Code releases
Databases:
Hot Items!
About Us
Meetings
General DB info
Conditions DB
Event Store
Online DB
Links
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

The BABAR Event Store Reference Manual

David R. Quarrie

BABAR Database Group
BABAR Computing

 

Version Information

Draft: 22nd June 1998

This document is still under development. If you have any questions or comments, please address them to the author.

Table of Contents

  • ooSession

  • Introduction

    The BABAR Event Store class library provides the low level ability to store and retrieve events from within an event store and to define and locate collections of events. For most BABAR applications much of this functionality is accessed via the appropriate Framework Input and Output Modules and the global AbsEvent object which are described in separate documents.


    BdbAbsCollection<T>

    Description

    A abstract templated collection class supplying the interface to collections. Although it is templated, the only fully supported template parameter is currently BdbEvent

    Inheritance Tree

    BdbAbsCollection<T> > BdbAbsWrapper
    

    Interface

    #include "BdbEventStore/BdbAbsCollection.hh"
    

    Constructors

    BdbAbsCollection( BdbHandle(BdbCollectionP)& theColl )
    

    Create an abstract collection, based upon the specified persistent collection. This constructor is protected.

    Selectors

    d_ULong size( ) const
    

    The number of items in the collection.

    const char* const name( ) const
    

    The collection name.

    Modifiers

    None.

    Operations

    BdbStatus add( BdbHandle(T)& anItem ) 
    BdbStatus add( BdbRef(T)& anItem )
    

    Add the specified item to the collection.

    BdbStatus addCollection( BdbAbsCollection<T>& theOther )
    

    Add the specified other collection to the collection.

    d_Boolean contains( BdbHandle(T)& anItem ) 
    d_Boolean contains( BdbRef(T)& anItem )
    

    Return whether the specified item is contained within the collection.

    d_Boolean containsCollection( BdbAbsCollection<T>& theOther )
    

    Return whether the specified other collections is contained within the collection. This will only ever return a positive (true) result if the collection is a tree collection.

    BdbStatus item( BdbHandle(T)& anItem, d_ULong index ) 
    BdbStatus item( BdbRef(T)& anItem, d_ULong index )
    

    Return the item at the specified index within the collections. The index starts at zero (0 ).

    BdbStatus remove( BdbHandle(T)& anItem ) 
    BdbStatus remove( BdbRef(T)& anItem )
    

    Remove the specified item from the collection.

    BdbStatus removeCollection( BdbAbsCollection<T>& theOther )
    

    Remove the specified other collection from the collection.

    Return to Table of Contents


    BdbAbsWrapper

    Description

    A transient wrapper class providing access to an underlying persistent class.

    Inheritance Tree

    BdbAbsWrapper
    

    Interface

    #include "BdbUtil/BdbAbsWrapper.hh"
    

    Constructors

    BdbAbsWrapper( )
    BdbAbsWrapper( BdbHandleAny& theObj );
    

    Create a wrapper.

    Selectors

    BdbHandleAny object( ) const
    

    Return the underlying persistent object..

    Modifiers

    void setObject( BdbHandleAny& theObj )
    

    Return the underlying persistent object..

    Operations

    void deleteObject( )
    

    Delete the underlying persistent object..

    d_Boolean isNull( )
    

    Return whether the underlying persistent object exists (is NULL).

    void setNull( )
    

    Set the underlying persistent object to NULL.

    Operators

    bool operator==( const BdbAbsWrapper& theOther ) const
    bool operator!=( const BdbAbsWrapper& theOther ) const
    

    Test for equality (or inequality) of the underlying persistent object.

    Return to Table of Contents


    BdbCollection<T>

    Description

    A templated collection class supplying the primary interface to collections. Although it is templated, the only fully supported template parameter is currently BdbEvent

    Inheritance Tree

    BdbCollection<T> > BdbAbsCollection<T> > BdbAbsWrapper
    

    Interface

    #include "BdbEventStore/BdbCollection.hh"
    

    Constructors

    BdbCollection( )
    BdbCollection( const BdbCollection<T>& theOther );
    

    Create an interface collection.

    Selectors

    d_ULong size( ) const
    

    The number of items in the collection.

    const char* const name( ) const
    

    The collection name.

    Modifiers

    None.

    Operations

    BdbStatus add( BdbHandle(T)& anItem )
    BdbStatus add( BdbRef(T)& anItem )
    

    Add the specified item to the collection.

    BdbStatus addCollection( BdbAbsCollection<T>& theOther )
    

    Add the specified other collection to the collection.

    d_Boolean contains( BdbHandle(T)& anItem )
    d_Boolean contains( BdbRef(T)& anItem )
    

    Return whether the specified item is contained within the collection.

    d_Boolean containsCollection( BdbAbsCollection<T>& theOther )
    

    Return whether the specified other collections is contained within the collection. This will only ever return a positive (true) result if the collection is a tree collection.

    BdbStatus item( BdbHandle(T)& anItem, d_ULong index )
    BdbStatus item( BdbRef(T)& anItem, d_ULong index )
    

    Return the item at the specified index within the collections. The index starts at zero (0 ).

    BdbStatus remove( BdbHandle(T)& anItem )
    BdbStatus remove( BdbRef(T)& anItem )
    

    Remove the specified item from the collection.

    BdbStatus removeCollection( BdbAbsCollection<T>& theOther )
    

    Remove the specified other collection from the collection.

    Return to Table of Contents


    BdbCollectionIterator<T>

    Description

    An iterator for event collections. 

    Inheritance Tree

    BdbCollectionIterator<T> > BdbAbsCollectionIterator<T>
    

    Interface

    #include "BdbEventStore/BdbCollectionIterator.hh"
    

    Constructors

    BdbCollectionIterator( BdbCollection<T>& aCollection, d_ULong initialIndex = 0 )
    

    Creates a collection iterator referencing the specified collection, and beginning iteration at the specified initial index.

    Selectors

    None.

    Modifiers

    None.

    Operations

    BdbStatus next( BdbRef(T)& anItem, d_ULong skipItems = 0 )
    

    Return the next item in the collection, skipping over the specified number of items. A function value of BdbcSuccess indicates that the item exists, whereas a value of BdbcError indicates that the end of the collection has been reached.

    void reset(  )
    

    Reset to the start of the current collection.

    void setCollection( BdbCollection<T>& aCollection )
    

    Bind the iterator to the specified collection, dropping any prior binding.

    BdbStatus skip( d_ULong skipItems = 0 )
    

    Skip forwards over the specified number of items in the collection.

    Return to Table of Contents


    BdbCollectionP

    Description

    The abstract persistent collection class. This class is not templated, providing capabilities for persistent objects that inherit from the BdbPersObj class. The transient collection classes provide a type-safe templated wrapper for clients. 

    Inheritance Tree

    BdbCollectionP > BdbPersObj
                     HepExplorable
    

    Interface

    #include "BdbEventStore/BdbCollectionP.hh"
    

    Constructors

    BdbPCollection( const char* const theName )
    BdbCollectionP( BdbHandle(BdbDictionaryP)& theDict, const char* const theName );
    

    Create a persistent collection. These constructors are protected.

    Selectors

    d_ULong size( ) const = 0
    

    The number of items in the collection (abstract).

    const char* const name( ) const
    

    The collection name.

    Modifiers

    None.

    Operations

    BdbStatus add( BdbRefAny& anItem ) = 0
    

    Add the specified item to the collection (abstract).

    BdbStatus addCollection( BdbHandle(BdbCollectionP)& theOther ) = 0
    

    Add the specified other collection to the collection (abstract).

    BdbStatus clear( ) = 0
    

    Clear the collection (abstract).

    d_Boolean contains( BdbRefAny& anItem ) = 0
    

    Return whether the specified item is contained within the collection (abstract).

    d_Boolean containsCollection( BdbHandle(BdbCollectionP)& theOther ) = 0
    

    Return whether the specified other collections is contained within the collection (abstract)

    d_Boolean isCompatible( BdbHandle(BdbCollectionP)& theOther ) const
    

    Returns whether the specified other collection is compatible with the current one. Compatibility is determined by the other collection either being at the same or higher authorization level (e.g. this collection at user level, the other collectiion at group level).

    BdbStatus item( BdbRefAny& anItem, d_ULong index ) = 0
    

    Return the item at the specified index within the collections (abstract). The index starts at zero (0 ).

    BdbStatus remove( BdbRefAny& anItem )
    

    Remove the specified item from the collection (abstract).

    BdbStatus removeCollection( BdbHandle(BdbCollectionP)& theOther )
    

    Remove the specified other collection from the collection (abstract).

    Return to Table of Contents


    BdbDomain

    Description

    An abstract database domain.

    Inheritance Tree

    BdbDomain
    

    Interface

    #include "BdbApplication/BdbDomain.hh"
    

    Constructors

    BdbDomain( Domains theDomain )
    

    Create a domain. This constructor is protected.

    Selectors

    None.

    Modifiers

    None.

    Operations

    BdbStatus abort( )
    

    Abort the current transaction.

    BdbStatus change( d_ULong theMode, d_Boolean forceCommit=d_False )
    

    Change the transaction mode to that specified, which can be one of BdbcNoOpen, BdbcRead or BdbcUpdate. Depending on the curent transaction status, this will commit the existing transaction and start a new one of the specified mode. The optional forceCommit flag can be used to force the current transaction to be committed, even if no change in the mode takes place.

    BdbStatus commit( )
    

    Commit the current transaction.

    BdbStatus commitAndHold( )
    

    Commit the current transaction, but hold onto any locks and continue with the same transaction mode.

    void intialize( ) = 0
    

    Initialize the domain (abstract).

    d_Boolean isAuthorized( Authlevels theAuthLevel=User, const char* const theName=NULL ) = 0
    

    Return whether the current user is authorizated at the specified authorization level and name (protected).

    d_Boolean isAvailable( )
    

    Return whether the federation is marked as being available.

    d_ULong mode( )
    

    The current transaction mode. This can be one of BdbcNoOpen, BdbcRead or BdbcUpdate.

    d_Boolean setInitialAuthLevel( Authlevels theAuthLevel=User, const char* const theName=NULL )
    

    Set the initial authorization level and name to that specified.

    AuthLevels getAuthLevel( const char* const thePath )
    

    Return the authorization level corresponding to the specified path (protected).

    const char* getAuthName( const char* const thePath )
    

    Return the authorization name corresponding to the specified path (protected).

    BdbStatus start( d_ULong theMode, const char* const theTag=0 )
    

    Start a transaction of the specified mode, optionally specifying a chacacter string tag by which it will be identified in error messages. Valid modes are:

    BdbcRead   Read Mode
    BdbcUpdate  Update Mode
    
    BdbStatus startRead( const char* const theTag=0 )
    

    Start a read transaction, optionally specifying a chacacter string tag by which it will be identified in error messages.

    BdbStatus startUpdate( const char* const theTag=0 )
    

    Start an update transaction, optionally specifying a chacacter string tag by which it will be identified in error messages.

    void waitUntilAvailable( ) const
    

    Wait until the federation is marked as being available. This has no effect if the federation is alreafy available.

    Return to Table of Contents


    BdbEvent

    Description

    The persistent event.

    Inheritance Tree

    BdbEvent > BdbGenericHdr > BdbPersObj
               BdbSortable
    

    Interface

    #include "BdbEvent/BdbEvent.hh"
    

    Constructors

    BdbEvent( )
    BdbEvent( d_ULong theNumber )
    BdbEvent( BdbHandle(BdbEvent)& theOther )
    BdbEvent( BdbRef(BdbEvent)& theOther )
    

    Create a persistent event..

    Selectors

    d_ULong number( ) const
    

    The event number.

    Modifiers

    None.

    Operations

    BdbStatus createHeader( BdbRefAny theHint, const char* const theName, 
                            BdbRef(BdbTreeHdr)& theHeader )
    

    Create the specified tree header.

    BdbStatus eventID( BdbEventID& theID )
    

    Return the event id for this event.

    BdbStatus findHeader( const char* const theName, BdbRef(BdbTreeHdr)& theHeader )
    

    Return the tree header corresponding to the specified name.

    BdbStatus original( BdbHandle(BdbEvent)& theOriginal )
    BdbStatus original( BdbRef(BdbEvent)& theOriginal )
    

    Return the original event header for this event.

    BdbStatus setEventID( BdbEventID& theID )
    BdbStatus setEventID( d_ULong sec, d_ULong nsec )
    

    Set the event ID to that specified either by an object of type BdbEventID, or having the specified time (in seconds and nanoseconds).

    BdbStatus setTag( BdbRef(BdBEventTag)& theTag )
    

    Set the event tag to that specified.

    BdbStatus tag( BdbHandle(BdbEventTag)& theTag )
    BdbStatus tag( BdbRef(BdbEventTag)& theTag )
    

    Return the event tag for this event.

    Return to Table of Contents


    BdbEventErrors

    Description

    Error codes and messages for the BdbEvent package.

    Inheritance Tree

    None
    

    Interface

    #include "BdbEvent/BdbEventErrors.hh"
    

    Return to Table of Contents


    BdbEventID

    Description

    The event identifier class

    Inheritance Tree

    BdbEventID > AbsEventID
                 BdbSortable
    

    Interface

    #include "BdbEvent/BdbEventID.hh"
    

    Constructors

    BdbEventID( )
    BdbEventID( d_ULong sec, d_ULong nsec )
    BdbEventID( BdbTim& theTime )
    BdbEventID( AbsEventID& theID )
    BdbEventID( BdbEventID& theID )
    

    Create an event ID object.

    Selectors

    d_ULong key( ) const
    d_ULong key2( ) const
    

    The primary and secondary keys.

    long majorID( ) const
    long minorID( ) const
    

    The primary and secondary keys.

    Modifiers

    setID( long theMajor, long theMinor )
    

    Set the primary and secondary keys.

    setTime( d_ULong sec, d_ULong nsec=0 )
    

    Set the primary and secondary keys.

    Operations

    None.

    Return to Table of Contents


    BdbEventStore

    Description

    The event store class. This provides the primary interface to the event store database. It provides a context for locating event collections and for moving around the event store hierarchical tree.

    Inheritance Tree

    BdbEventStore > BdbDomain
    

    Interface

    #include "BdbEventStore/BdbEventStore.hh"
    

    Selectors

    BdbStatus node( BdbTreeNode& theNode )
    

    The tree node corresponding to the current location within the event store tree.

    Modifiers

    BdbStatus setNode( BdbTreeNode& theNode )
    

    Set the current location within the event store tree.

    Operations

    BdbStatus collection( BdbCollection<BdbEvent>& theCollection,
                          const char* const theFullPath )
    

    Locate the collection corresponding to the specified full path name.

    BdbStatus treeNode( BdbTreeNode& theNode,
                          const char* const thePath=0 )
    BdbStatus treeNode( BdbTreeNode& theNode,
                          BdbDomain::AuthLevels theAuthLevel, 
                          const char* const theAuthName=0 )
    

    Locate the tree-node corresponding to the specified path or authorization level and name.

    BdbStatus fetchTreeNode( BdbTreeNode& theNode,
                               const char* const thePath=0 )
    BdbStatus fetchTreeNode( BdbTreeNode& theNode,
                               BdbDomain::AuthLevels theAuthLevel, 
                               const char* const theAuthName=0 )
    

    Locate the tree-node corresponding to the specified path or authorization level and name, creating it (and any intermediate nodes) if it doesn't already exist.

    d_Boolean isUpdateEnabled( ) const
    

    Return whether updating is enabled at the current authorization level.

    BdbStatus moveTo( const char* const thePath )
    

    Move the internal location to the specified location. The path may be absolute (starting with the "/" character), or relative.

    BdbStatus treeCollection  ( BdbCollection<BdbEvent>& theCollection,
                                const char* const theFullPath, d_ULong initialSize=0 )
    BdbStatus vectorCollection( BdbCollection<BdbEvent>& theCollection,
                                const char* const theFullPath, d_ULong initialSize=0 )
    

    Locate the collection corresponding to the specified full path name, creating the collection as a tree or vector collection if it doesn't already exist.

    d_Boolean useFullClustering( ) const
    

    Return whether full or simple clustering is enabled.

    Return to Table of Contents


    BdbEventStoreErrors

    Description

    Error codes and messages for the BdbEventStore package.

    Inheritance Tree

    None
    

    Interface

    #include "BdbEventStore/BdbEventStoreErrors.hh"
    

    Return to Table of Contents


    BdbEventStoreIterator

    Description

    An iterator that returns the top-level tree nodes in the event store, sorted by authorization level, group or user name & path.

    Inheritance Tree

    BdbEventStoreIterator > BdbAbsIterator<BdbTreeNode>
    

    Interface

    #include "BdbEventStore/BdbEventStoreIterator.hh"
    

    Constructors

    BdbEventStoreIterator( )
    

    Create an event store iterator bound to the specified store.

    Selectors

    None.

    Modifiers

    None.

    Operations

    BdbStatus next( BdbTreeNode& theNode, d_ULong skip=0 )
    

    Return the next top-level tree node within the event store, skipping over the specified number of items.

    void reset( )
    

    Reset the iterator.

    Return to Table of Contents


    BdbEventTag

    Description

    The persistent event tag for MDC-2. This will almost certainly change following this milestone.

    Inheritance Tree

    BdbEventTag > HepGenericTag
    

    Interface

    #include "BdbEvent/BdbEventTag.hh"
    

    Constructors

    BdbEventTag( )
    BdbEventTag( BdbHandle(BdbEvent)& theEvent )
    BdbEventTag( BdbRef(BdbEvent)& theEvent )
    

    Create an event tag

    Selectors

    Not yet available.

    Modifiers

    Not yet available.

    Operations

    Not yet available.

    Return to Table of Contents


    BdbGenericHdr

    Description

    A generic header class, used as the parent for both the event and tree headers. 

    Inheritance Tree

    BdbGenericHdr > BdbPersObj
    

    Interface

    #include "BdbEvent/BdbGenericHdr.hh"
    

    Constructors

    BdbGenericHdr( const char* const theName )
    BdbGenericHdr( const BdbHandle(BdbGenericHdr)& theOther )
    BdbGenericHdr( const BdbRef(BdbGenericHdr)& theOther )
    

    Create a generic header. The primary constructor is protected.

    Selectors

    d_ULong size( ) const
    

    The number of items in the header.

    const char* const name( ) const
    

    The header name.

    Modifiers

    None.

    Operations

    BdbStatus add( const BdbRef(BdbPersObj)& anItem, 
                   d_ULong theIndex,
                   const char* const theKeyString )
    

    Add the specified item to the header.

    BdbStatus get( const BdbRef(BdbPersObj)& anItem, 
                   ooTypeNumber theType,
                   const char* const theKeyString=0 ) const
    

    Locate the specified item within the header. The item is located by type number and the optionalk key string.

    BdbStatus getKey( BdbHandle(BdbPString)& theKey, d_ULong theIndex ) const
    BdbStatus getKey( BdbRef(BdbPString)& theKey, d_ULong theIndex ) const
    

    Return the key string for the specified item.

    BdbStatus item( BdbRef(BdbPersObj)& theItem, 
                    d_ULong theIndex )
    

    Return the item at the specified index.

    BdbStatus put( BdbRef(BdbPersObj)& theItem, 
                   d_ULong theIndex )
    

    Insert the specified item at the specified position.

    BdbStatus replace( BdbRef(BdbPersObj)& theItem, 
                       d_ULong theIndex,
                       const char* const theKeyString )
    

    Replace the item at the specified position with another item having the specified key string.

    Return to Table of Contents


    BdbHdrAccess

    Description

    A templated class that provides type-safe access to event and tree headers. All functions are class static.

    Inheritance Tree

    BdbHdrAccess
    

    Interface

    #include "BdbEvent/BdbHdrAccess.hh"
    

    Constructors

    None.

    Selectors (class static)

    BdbRef(T) BdbHdrAccess<T>::get( BdbRef(BdbGenericHdr)& theHdr )
    BdbRef(T) BdbHdrAccess<T>::get( BdbRef(BdbGenericHdr)& theHdr, const char* const theKey )
    BdbStatus BdbHdrAccess<T>::get( BdbRef(BdbGenericHdr)& theHdr, BdbRef(T)& theObj )
    BdbStatus BdbHdrAccess<T>::get( BdbRef(BdbGenericHdr)& theHdr, BdbRef(T)& theObj,
                               const char* const theKey )
    

    Locate the object of classT within the header.

    Modifiers (class static)

    BdbStatus BdbHdrAccess<T>::put( BdbRef(BdbGenericHdr)& theHdr, BdbRef(T)& theObj )
    BdbStatus BdbHdrAccess<T>::put( BdbRef(BdbGenericHdr)& theHdr, BdbRef(T)& theObj,
                               const char* const theKey )
    

    Insert the specified object of type T into the header.

    Return to Table of Contents


    BdbSortable

    Description

    An abstract interface for sortable objects, having primary and secondary keys and a less-then (>) relationship between themselves. 

    Inheritance Tree

    BdbSortable
    

    Interface

    #include "BdbEvent/BdbSortable.hh"
    

    Constructors

    None.

    Selectors

    d_ULong key( ) const = 0
    d_ULong key2( ) const = 0
    

    The primary and secondary keys (abstract).

    Modifiers

    None.

    Operations

    None.

    Operators

    bool operator < ( const BdbSortable& theOther ) const = 0
    

    Return whether the current sortable is less than the other one (abstract).

    Return to Table of Contents


    BdbTreeAccess<T>

    Description

    A templated class providing type-safe access to items within a hierarchical tree as implemented by the BdbTreeNode class. 

    Inheritance Tree

    BdbTreeAccess<T>
    

    Interface

    #include "BdbTrees/BdbTreeAccess.hh"
    

    Constructors

    None.

    Selectors (class static)

    BdbHandle(T) BdbTreeAccess<T>::child( BdbTreeNode& theNode, const char* const theName )
    BdbStatus    BdbTreeAccess<T>::child( BdbTreeNode& theNode, BdbHandle(T)& theObj, 
                                     const char* const theName )
    

    Locate the object of classT with the specified name within the node.

    Modifiers (class static)

    None.

    BdbStatus BdbTreeAccess<T>::add( BdbTreeNode& theNode, BdbHandle(T)& theObj,
                                const char* const theName )
    

    Insert the specified object of type T with the specified name into the tree node.

    Return to Table of Contents


    BdbTreeCollection<T>

    Description

    A templated collection class supplying the interface to tree collections. Although it is templated, the only fully supported template parameter is currently BdbEvent

    Inheritance Tree

    BdbTreeCollection<T> > BdbAbsCollection<T> > BdbAbsWrapper
    

    Interface

    #include "BdbEventStore/BdbTreeCollection.hh"
    

    Constructors

    BdbTreeCollection( BdbDictionary& theDictionary,
                       const char* const theName,
                       d_ULong initialSize=0 )
    BdbTreeCollection( BdbHandle(BdbTreeCollectionP)& theCollection )
    

    Create a transient tree collection. These constructors are protected.

    Selectors

    See BdbAbsCollection<T>.

    Modifiers

    See BdbAbsCollection<T>.

    Operations

    BdbStatus add( BdbHandle(T)& anItem )
    BdbStatus add( BdbRef(T)& anItem )
    

    Add the specified item to the collection.

    BdbStatus addCollection( BdbAbsCollection<T>& theOther )
    

    Add the specified other collection to the collection.

    BdbStatus collection( BdbAbsCollection<T>& theCollection, d_ULong theIndex )
    

    Return the collection at the specified index.

    BdbStatus removeCollection( BdbAbsCollection<T>& theOther )
    

    Remove the specified other collection from the collection.

    Return to Table of Contents


    BdbTreeCollectionP

    Description

    A persistent collection class that implements a tree of collections, to which both events and other collections may be added.

    Inheritance Tree

    BdbTreeCollectionP > BdbCollectionP > BdbPersObj
                                          HepExplorable
    

    Interface

    #include "BdbEventStore/BdbTreeCollectionP.hh"
    

    Constructors

    BdbTreeCollectionP( BdbHandle(BdbDictionaryP)& theDictionary,
                        const char* const theName,
                        d_ULong initialSize = 0 )
    

    Create a persistent tree collection (protected).

    Static Selectors

    d_Float BdbTreeCollectionP::extendFactor( ) const
    

    The factor by which the contained vector collections are extended when events are added to them if they become full, but are of less than the maximim size in length (as specified by maxSize( )). The default extend factor is identical to that used by the BdbVectorCollectionP class.

    d_ULong BdbTreeCollectionP::initialSize( ) const
    

    The initial size of the tree collection vector, being the number of collections that can be added to this tree before the collection vector must be extended. The default initial size is identical to that used by the BdbVectorCollectionP class.

    d_ULong BdbTreeCollectionP::maxSize( ) const
    

    The maximum size of the contained vector collections which are created automatically to accept new events being added to the collection. The default maximum size is 100000.

    Static Modifiers

    void BdbTreeCollectionP::setExtendFactor( d_Float extendFactor=0.0 )
    

    Set the factor by which the contained vector collections are extended when events are added to them if they become full, but are of less than the maximim size in length (as specified by maxSize( )). An extend factor of less than 0.0, or defaulted, restores the original default. The default extend factor is identical to that used by the BdbVectorCollectionP class.

    void BdbTreeCollectionP::setInitialSize( d_ULong initialSize = 0 )
    

    Set the initial size of the tree collection vector, being the number of collections that can be added to this tree before the collection vector must be extended. An initial size of 0 or defaulted, restores the original default. The default initial size is identical to that used by the BdbVectorCollectionP class.

    void BdbTreeCollectionP::setMaxSize( ) const
    

    set the maximum size of the contained vector collections which are created automatically to accept new events being added to the collection.   A maximum size of 0 or defaulted, restores the original default. The default maximum size is 100000.

    Selectors

    d_ULong size( ) const
    

    The number of items in the collection.

    const char* const name( ) const
    

    The collection name.

    Modifiers

    None.

    Operations

    BdbStatus add( BdbRefAny& anItem )
    

    Add the specified item to the collection.

    BdbStatus addCollection( BdbHandle(BdbCollectionP)& theOther )
    

    Add the specified other collection to the collection.

    BdbStatus clear( )
    

    Clear the collection.

    BdbStatus collection( BdbHandle(BdbCollectionP)& theCollection, d_ULong theIndex )
    
    Return the collection at the specified index.
    
    d_Boolean contains( BdbRefAny& anItem )
    

    Return whether the specified item is contained within the collection.

    d_Boolean containsCollection( BdbHandle(BdbCollectionP)& theOther )
    

    Return whether the specified other collections is contained within the collection.

    d_Boolean isFull( )
    

    Return whether the last collection contained within this collection is full.

    BdbStatus item( BdbRefAny& anItem, d_ULong index )
    

    Return the item at the specified index within the collections. The index starts at zero (0 ).

    BdbStatus remove( BdbRefAny& anItem )
    

    Remove the specified item from the collection.

    BdbStatus removeCollection( BdbHandle(BdbCollectionP)& theOther )
    

    Remove the specified other collection from the collection.

    Return to Table of Contents


    BdbTreeHdr

    Description

    The tree headers within the BdbEvent object.

    Inheritance Tree

    BdbTreeHdr > BdbGenericHdr > BdbPersObj
    

    Interface

    #include "BdbEvent/BdbTreeHdr.hh"
    

    Constructors

    BdbTreeHdr( BdbRef(BdbEvent)& theEvent, const char* const theName )
    BdbTreeHdr( BdbHandle(BdbTreeHdr)& theHeader )
    BdbTreeHdr( BdbRef(BdbTreeHdr)& theHeader )
    

    Create a tree header.

    Selectors

    None.

    Modifiers

    None.

    Operations

    b_Boolean isOwner( BdbHandle(BdbEvent)& theEvent ) const
    b_Boolean isOwner( BdbRef(BdbEvent)& theEvent ) const
    

    Return whether the specified event header is the owneer of the current tree header.

    b_Boolean isUsed( ) const

    Return whether the current tree header is used by any event header.

    BdbStatus owner( BdbRef(BdbEvent)& theOwner ) const
    

    The event that is the owner of this tree header.

    BdbStatus previous( BdbRef(BdbTreeHdr)& thePrevious ) const
    

    Hmm, need to think aboiut this.

    BdbStatus setPrevious( BdbRef(BdbTreeHdr)& thePrevious )
    

    Hmm, need to think aboiut this

    Return to Table of Contents


    BdbTreeNode

    Description

    A node in a hierarchical that can hold child nodes (also of type BdbTreeNode), as well as other persistent items, keyed by name. The tree may be traversed by name. 

    Inheritance Tree

    BdbTreeNode > BdbAbsWrapper
    

    Interface

    #include "BdbTrees/BdbTreeNode.hh"
    

    Constructors

    BdbTreeNode( )
    BdbTreeNode( BdbTreeNodeP& theParent, const char* const theName );
    BdbTreeNode( BdbHandle(BdbTreeNodeP)& theParent );
    BdbTreeNode( const BdbTreeNode& theNode );
    

    Create a tree node. The specified name must not include the "/" character..

    Selectors

    d_ULong count( ) const
    

    The total count of items & child nodes in the node.

    const char* const name( ) const
    

    The node name.

    const char* const pathName( ) const
    

    The fiull node name, prefixed by the names of nodes higher in the tree. Unix directory syntax is used, the "/" character being used to separate the names.

    BdbHandle(BdbTreeNodeP) persistent( ) const
    

    The underlying persistent BdbTreeNodeP object.

    Modifiers

    None.

    Operations

    BdbStatus add( BdbTreeNode& theNode, const char* const theName )
    

    Add the specified node as a child node of this node. A failure return indices that the specified name is already in use.

    BdbStatus add( BdbHandle(BdbPersObj)& theItem, const char* const theName )
    

    Add the specified persistent object as an item within the node. A failure return indicates that the specified name is already in use..

    BdbStatus child( BdbTreeNode& theChild, const char* const theName ) const
    

    Return the child node having the specified name.

    BdbStatus child( BdbHandle(BdbPersObj)& theItem, const char* const theName ) const
    

    Return the item having the specified name.

    d_Boolean hasChild( const char* const theName ) const
    

    Return whether the child node having the specified name exists.

    d_Boolean hasChild( BdbTreeNode& theChild, d_Boolean descend = d_False ) const
    

    Return whether the specified node exists. The tree of children nodes will also be searched if the optional descend argument is set to d_True.

    d_Boolean hasChild( BdbHandle(BdbPersObj)& theChild, d_Boolean descend = d_False ) const
    

    Return whether the specified item exists. The tree of children nodes will also be searched if the optional descend argument is set to d_True.

    BdbStatus createRoot( const char* const theRootName, const char* const placement = "nod" )
    

    Create a root node having the specified name, and using the specified placement specifier.

    BdbStatus createTo( const char* const thePath )
    

    Move to the specified location in the node tree, creating intermediate nodes if necessary. The location may either be an absolute path (starting with the "/" character) or a relative path. Movement up the tree is denoted by "::/".

    BdbStatus moveTo( const char* const thePath )
    

    Move to the specified location in the node tree. The location may either be an absolute path (starting with the "/" character) or a relative path. Movement up the tree is denoted by "::/".

    BdbStatus parent( BdbTreeNode& theParent ) const
    

    Return the parent node.

    BdbStatus remove( const char* const theName )
    BdbStatus remove( BdbTreeNode& theNode )
    BdbStatus remove( BdbHandle(PdbPersObj)& theItem )
    

    Remove the specified item from the node.

    BdbStatus replace( BdbTreeNode& theNode, const char* const theName )
    BdbStatus replace( BdbHandle(PdbPersObj)& theItem, const char* const theName )
    

    Replace the item having the specified name with the specified item.

    Return to Table of Contents


    BdbTreeNodeCollectionIterator

    Description

    An iterator for the BdbTreeNode class that returns items as event collections sorted by their names. 

    Inheritance Tree

    BdbTreeNodeCollectionIterator > BdbTreeNodeIterator > BdbAbsIterator<BdbTreeNode>
    

    Interface

    #include "BdbEventStore/BdbTreeNodeCollectionIterator.hh"
    

    Constructors

    BdbTreeNodeCollectionIterator( BdbTreeNode& theNode, d_Boolean descend = d_False )
    

    Create an iterator for the specified node. The optional descend argument determines whether this iterator will also descend into any child nodes.

    Selectors

    d_ULong collections( ) const
    

    The count of collections within the node.

    d_ULong count( ) const
    

    The count of child nodes within the node.

    const char* const name( ) const
    

    The name of the current node or collection.

    Modifiers

    None.

    Operations

    void bind( BdbTreeNode& theNode )
    

    Bind the iterator to another node.

    BdbStatus next( BdbTreeNode& theNode, d_ULong skip=0 )
    

    Return the next echild node within the node, skipping over the specified number of items.

    BdbStatus nextCollection( BdbCollection<BdbEvent>& theCollection, d_ULong skip=0 )
    

    Return the next event collection within the node, skipping over the specified number of items.

    void reset( )
    

    Reset the iterator.

    Return to Table of Contents


    BdbTreeNodeIterator

    Description

    An iterator for the BdbTreeNode class that returns items sorted by their names. 

    Inheritance Tree

    BdbTreeNodeIterator > BdbAbsIterator<BdbTreeNode>
    

    Interface

    #include "BdbTrees/BdbTreeNodeIterator.hh"
    

    Constructors

    BdbTreeNodeIterator( BdbTreeNode& theNode, d_Boolean descend = d_False )
    

    Create an iterator for the specified node. The optional descend argument determines whether this iterator will also descend into any child nodes.

    Selectors

    d_ULong count( ) const
    

    The count of child nodes within the node.

    d_ULong items( ) const
    

    The count of items (omitting child nodes) within the node.

    const char* const name( ) const
    

    The name of the current node or collection.

    Modifiers

    None.

    Operations

    void bind( BdbTreeNode& theNode )
    

    Bind the iterator to another node.

    BdbStatus next( BdbTreeNode& theNode, d_ULong skip=0 )
    

    Return the next child node within the node, skipping over the specified number of items. This function will automatically skip over any non-node items within the current node.

    BdbStatus nextItem( BdbHandle(BdbPersObj)& theItem, d_ULong skip=0 )
    

    Return the next item within the node, skipping over the specified number of items.This function will also automatically skip over any node items within the current node.

    void reset( )
    

    Reset the iterator.

    Return to Table of Contents


    BdbTreeNodeP

    Description

    The persistent tree-node.

    Inheritance Tree

    BdbTreeNodeP > BdbPersObj
    

    Interface

    #include "BdbTrees/BdbTreeNodeP.hh"
    

    Constructors

    BdbTreeNodeP( const char* const theName )
    BdbTreeNodeP( BdbHandle(BdbTreeNodeP)& theParent, const char* const theName );
    

    Create a perststent tree node. The specified name must not include the "/" character. These functions are protected.

    Selectors

    d_ULong count( ) const
    

    The total count of items & child nodes in the node.

    const char* const name( ) const
    

    The node name.

    const char* const pathName( ) const
    

    The fiull node name, prefixed by the names of nodes higher in the tree. Unix directory syntax is used, the "/" character being used to separate the names.

    Modifiers

    None.

    Operations

    BdbStatus add( BdbHandle(BdbPersObj)& theItem, const char* const theName )
    

    Add the specified persistent object as an item within the node. A failure return indicates that the specified name is already in use..

    BdbStatus child( BdbHandle(BdbPersObj)& theItem, const char* const theName ) const
    

    Return the item having the specified name.

    d_Boolean hasChild( const char* const theName ) const
    

    Return whether the child node having the specified name exists.

    d_Boolean hasChild( BdbHandle(BdbPersObj)& theChild, d_Boolean descend = d_False ) const
    

    Return whether the specified item exists. The tree of children nodes will also be searched if the optional descend argument is set to d_True.

    BdbStatus parent( BdbTreeNode& theParent ) const
    

    Return the parent node.

    BdbStatus remove( const char* const theName )
    BdbStatus remove( BdbHandle(PdbPersObj)& theItem )
    

    Remove the specified item from the node.

    BdbStatus replace( BdbHandle(PdbPersObj)& theItem, const char* const theName )
    

    Replace the item having the specified name with the specified item.

    BdbStatus root( BdbHandle(PdbPersObj)& theRoot )
    

    The root of the tree that the current node belongs to.

    Return to Table of Contents


    BdbVectorCollection<T>

    Description

    A templated transient collection class implemented as a simple vector of events. This class is a type-safe wrapper around the persistent BdbVectorCollectionP class.

    Inheritance Tree

    BdbVectorCollection<T> > BdbAbsCollection<T> > BdbAbsWrapper
    

    Interface

    #include "BdbEventStore/BdbVectorCollection.hh"
    

    Constructors

    BdbVectorCollection( BdbDictionary& theDictionary,
                         const char* const theName,
                         d-ULong initialSize=0 )
    

    Create a vector collection (protected).

    Selectors

    d_ULong size( ) const
    

    The number of items in the collection.

    const char* const name( ) const
    

    The collection name.

    Modifiers

    None.

    Operations

    BdbStatus add( BdbHandle(T)& anItem )
    BdbStatus add( BdbRef(T)& anItem )
    

    Add the specified item to the collection.

    BdbStatus addCollection( BdbAbsCollection<T>& theOther )
    

    Add the specified other collection to the collection.

    d_Boolean contains( BdbHandle(T)& anItem )
    d_Boolean contains( BdbRef(T)& anItem )
    

    Return whether the specified item is contained within the collection.

    d_Boolean containsCollection( BdbAbsCollection<T>& theOther )
    

    Return whether the specified other collections is contained within the collection. This will only ever return a positive (true) result if the collection is a tree collection.

    BdbStatus item( BdbHandle(T)& anItem, d_ULong index )
    BdbStatus item( BdbRef(T)& anItem, d_ULong index )
    

    Return the item at the specified index within the collections. The index starts at zero (0 ).

    BdbStatus remove( BdbHandle(T)& anItem )
    BdbStatus remove( BdbRef(T)& anItem )
    

    Remove the specified item from the collection.

    BdbStatus removeCollection( BdbAbsCollection<T>& theOther )
    

    Remove the specified other collection from the collection.

    Return to Table of Contents


    BdbVectorCollectionP

    Description

    A persistent collection class that implements a simple vector of events, to which events may be added eiher dirtectly, or from other collections.

    Inheritance Tree

    BdbVectorCollectionP > BdbCollectionP > BdbPersObj
                                           HepExplorable
    

    Interface

    #include "BdbEventStore/BdbVectorCollectionP.hh"
    

    Constructors

    BdbVectorCollectionP( BdbHandle(BdbDictionaryP)& theDictionary,
                          const char* const theName,
                          d_ULong initialSize = 0 )
    BdbVectorCollectionP( BdbHandle(BdbCollectionP)& theParent,
                          const char* const theName,
                          d_ULong initialSize = 0 )
    

    Create a persistent vector collection (protected).

    Static Selectors

    d_Float BdbVectorCollectionP::extendFactor( ) const
    

    The factor by which the contained vector collections are extended when events are added to them if they become full, but are of less than the maximim size in length (as specified by maxSize( )). The default extend factor is 1.4.

    d_ULong BdbVectorCollectionP::initialSize( ) const
    

    The initial size of the tree collection vector, being the number of collections that can be added to this tree before the collection vector must be extended. The default initial size is 1024.

    Static Modifiers

    void BdbVectorCollectionP::setExtendFactor( d_Float extendFactor=0.0 )
    

    Set the factor by which the contained vector collections are extended when events are added to them if they become full, but are of less than the maximim size in length (as specified by maxSize( )). An extend factor of less than 0.0, or defaulted, restores the original default of 1.4.

    void BdbVectorCollectionP::setInitialSize( d_ULong initialSize = 0 )
    

    Set the initial size of the tree collection vector, being the number of collections that can be added to this tree before the collection vector must be extended. An initial size of 0 or defaulted, restores the original default of 1024.

    Selectors

    d_ULong size( ) const
    

    The number of items in the collection.

    const char* const name( ) const
    

    The collection name.

    Modifiers

    None.

    Operations

    BdbStatus add( BdbRefAny& anItem )
    

    Add the specified item to the collection.

    BdbStatus addCollection( BdbHandle(BdbCollectionP)& theOther )
    

    Add the events from the specified other collection to the collection.

    BdbStatus clear( )
    

    Clear the collection.

    d_Boolean contains( BdbRefAny& anItem )
    

    Return whether the specified item is contained within the collection.

    d_Boolean isFull( )
    

    Return whether the last collection contained within this collection is full.

    BdbStatus item( BdbRefAny& anItem, d_ULong index )
    

    Return the item at the specified index within the collections. The index starts at zero (0 ).

    BdbStatus remove( BdbRefAny& anItem )
    

    Remove the specified item from the collection.

    BdbStatus removeCollection( BdbHandle(BdbCollectionP)& theOther )
    

    Remove the events from the specified other collection from the collection.

    Return to Table of Contents


    Appendix

    ooSession

    Description

    This class is provided by Objectivity, Inc. as a service to their customers. It provides session and transaction management for applications. [incomplete]

    Inheritance Tree

    ????
    

    Interface

    #include "HepODBMS/goodies/ooSession.h"
    

    Constructors

    Selectors

    [This section incomplete.]

    Modifiers

    [This section incomplete.]

    Operations

    [This section incomplete.]

    Return to Table of Contents

     

    DB Home | BaBar Home | Computing | Reconstruction | Simulation | Search

    e-mail DRQuarrie@LBL.Gov