Bdb packages | Design docs | Source docs | Guidelines | Recent releases

Search | Site Map .

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/BdbCond/BdbCondStoreInterval.hh

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 //
00003 // File and Version Information:
00004 //      $Id: BdbCondStoreInterval.hh,v 1.2 1999/10/01 16:37:26 gapon Exp $
00005 //
00006 // Description:
00007 //      Class BdbCondStoreInterval. This class describes a "storing interval"
00008 //      in a vector of intervals used interbaly by BdbDatabase::storeVector()
00009 //      interface.
00010 //
00011 //      A vector of objects of this class is a result of translation of
00012 //      the original vector passed to BdbDatabase::storeVector() as a parameter.
00013 //      The intervals in this this vector are aligned by either their begin or
00014 //      and times or both to the borders of existing intervals.
00015 //
00016 // Environment:
00017 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00018 //
00019 // Author List:
00020 //      Igor A. Gaponenko           Original Author
00021 //
00022 // Copyright Information:
00023 //      Copyright (C) 1999          Lawrence Berkeley Laboratory
00024 //
00025 //-----------------------------------------------------------------------------
00026 
00027 #ifndef BDBCONDSTOREINTERVAL_HH
00028 #define BDBCONDSTOREINTERVAL_HH
00029 
00030 //-----------------
00031 // BaBar Headers --
00032 //-----------------
00033 
00034 #include "BaBar/BaBar.hh"
00035 
00036 //-------------------------------
00037 // Collaborating Class Headers --
00038 //-------------------------------
00039 
00040 #include "BdbUtil/Bdb.hh"
00041 #include "BdbTime/BdbIntervalBase.hh"
00042 #include "BdbCond/BdbObject.hh"
00043 #include "BdbCond/BdbIntervalR.hh"
00044 
00045 //              ---------------------
00046 //              -- Class Interface --
00047 //              ---------------------
00048 
00049 class BdbCondStoreInterval {
00050 
00051 public:
00052 
00053   // Constructor(s)
00054 
00055     BdbCondStoreInterval( );
00056     BdbCondStoreInterval( const BdbIntervalBase&         theIntervalBase,
00057                           const BdbHandle(BdbIntervalR)& theIntervalH,
00058                           const BdbRef(BdbObject)&       theObjectRef );
00059 
00060     BdbCondStoreInterval( const BdbCondStoreInterval&  theStoreInterval );
00061 
00062   // Destructor
00063 
00064     virtual ~BdbCondStoreInterval( );
00065 
00066   // Accessors
00067 
00068     inline void getInterval(         BdbIntervalBase& theIntervalBase );
00069     inline void getExistingInterval( BdbHandle(BdbIntervalR)& theIntervalH );
00070 
00071     inline BdbRef(BdbObject)& getObject( );
00072 
00073   // Operators
00074 
00075     BdbCondStoreInterval& operator=( const BdbCondStoreInterval& theStoreInterval );
00076 
00077     inline bool operator==( const BdbCondStoreInterval& theStoreInterval ) const;
00078 
00079 private:
00080 
00081   // Date members
00082 
00083     BdbIntervalBase      _intervalBase;
00084     BdbRef(BdbIntervalR) _intervalH;
00085     BdbRef(BdbObject)    _object;
00086 };
00087 
00088 // Inline implementations
00089 
00090 inline void
00091 BdbCondStoreInterval::getInterval( BdbIntervalBase& theIntervalBase )
00092 {
00093     theIntervalBase = _intervalBase;
00094 }
00095 
00096 inline void
00097 BdbCondStoreInterval::getExistingInterval( BdbHandle(BdbIntervalR)& theIntervalH )
00098 {
00099     theIntervalH = _intervalH;
00100 }
00101 
00102 inline BdbRef(BdbObject)&
00103 BdbCondStoreInterval::getObject( )
00104 {
00105     return _object;
00106 }
00107 
00108 inline bool
00109 BdbCondStoreInterval::operator==( const BdbCondStoreInterval& theStoreInterval ) const
00110 {
00111     return ( _intervalBase == theStoreInterval._intervalBase ) &&
00112            ( _intervalH    == theStoreInterval._intervalH ) &&
00113            ( _object       == theStoreInterval._object );
00114 }
00115 
00116 #endif /* BDBCONDSTOREINTERVAL_HH */

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: October 04, 2002