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  

/BdbTrees/BdbMetaDataFloatIter.hh

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: BdbMetaDataFloatIter.hh,v 1.1 1998/06/26 23:55:01 quarrie Exp $
00004 //
00005 // Description:
00006 //      Class BdbMetaDataFloatIter. Interface definition file for 
00007 //      the float iterator for the transient metadata.
00008 //
00009 // Environment:
00010 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00011 //
00012 // Author List:
00013 //      David R. Quarrie                Original Author
00014 //
00015 // Copyright Information:
00016 //      Copyright (C) 1998              Lawrence Berkeley Laboratory
00017 //
00018 //------------------------------------------------------------------------
00019 
00020 #ifndef BDBMETADATAFLOATITER_HH
00021 #define BDBMETADATAFLOATITER_HH
00022 
00023 //-----------------
00024 // BaBar Headers --
00025 //-----------------
00026 #include "BaBar/BaBar.hh"
00027 
00028 //-------------------------------
00029 // Collaborating Class Headers --
00030 //-------------------------------
00031 #include "BdbTrees/BdbMetaData.hh"
00032 
00033 //              ---------------------
00034 //              -- Class Interface --
00035 //              ---------------------
00036  
00037 class BdbMetaDataFloatIter {
00038 
00039 //--------------------
00040 // Instance Members --
00041 //--------------------
00042 
00043 public:
00044 
00045     // Constructors
00046     BdbMetaDataFloatIter( BdbMetaData& theData )
00047     {
00048         _data  = theData;
00049         _index = -1;
00050     }
00051 
00052   // Destructor
00053     virtual ~BdbMetaDataFloatIter()
00054     {
00055     }
00056 
00057     // Operations
00058 
00059     void bind( BdbMetaData& theData )
00060     {
00061         _data  = theData;
00062         _index = -1;
00063     }
00064 
00065     d_ULong count( )
00066     {
00067         return _data.numFloats( );
00068     }
00069 
00070     BdbStatus next( d_Float& value )
00071     {
00072         _index++;
00073         BdbStatus result = _data.getFloat( value, (d_ULong)_index );
00074         return result;
00075     }
00076 
00077     const char* key( )
00078     {
00079         return _data.getFloatKey( (d_ULong)_index );
00080     }
00081 
00082     void reset( )
00083     {
00084         _index = -1;
00085     }
00086 
00087 private:
00088     BdbMetaData _data;
00089     d_Long      _index;
00090 
00091 };
00092 
00093 #endif

 


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

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