00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "BaBar/BaBar.hh"
00010
00011 #include "CdbRooReadonly/CdbRooRoRevisionR.hh"
00012
00013 #include "CdbBase/CdbTimeUtils.hh"
00014
00015 #include <assert.h>
00016
00017 #include <iostream>
00018
00019 using std::endl;
00020
00021 CdbRooRoRevisionR::CdbRooRoRevisionR( ) :
00022 _id (BdbTime::minusInfinity),
00023 _name (""),
00024 _created (BdbTime::minusInfinity),
00025 _description()
00026 { }
00027
00028 CdbRooRoRevisionR::CdbRooRoRevisionR( const BdbTime& theId,
00029 const char* theName,
00030 const CdbRooRoViCollectionR& theCollection,
00031 const BdbTime& theCreationTime,
00032 const char* theDescription ) :
00033 _id (theId),
00034 _name (theName),
00035 _intervals (theCollection),
00036 _created (theCreationTime),
00037 _description(theDescription)
00038 {
00039 assert( BdbTime::minusInfinity != theId );
00040 assert( 0 != theName );
00041 assert( 0 != theDescription );
00042 assert( BdbTime::plusInfinity != theCreationTime );
00043
00044 }
00045
00046 CdbRooRoRevisionR::CdbRooRoRevisionR( const BdbTime& theId,
00047 const char* theName,
00048 const BdbTime& theCreationTime,
00049 const char* theDescription ) :
00050 _id (theId),
00051 _name (theName),
00052 _created (theCreationTime),
00053 _description(theDescription)
00054 {
00055 assert( BdbTime::minusInfinity != theId );
00056 assert( 0 != theName );
00057 assert( 0 != theDescription );
00058 assert( BdbTime::plusInfinity != theCreationTime );
00059 }
00060
00061 void
00062 CdbRooRoRevisionR::dump( std::ostream& o ) const
00063 {
00064 o << "ID : " << CdbTimeUtils::time2string( id( )) << endl
00065 << "NAME : \"" << name( ) << "\"" << endl
00066 << "CREATED : " << CdbTimeUtils::time2string( created( )) << endl
00067 << "DESCRIPTION : \"" << description( ) << "\"" << endl
00068 << "VI-COLLECTION ->" << endl
00069 << endl;
00070 _intervals.dump( o );
00071 }
00072
00073
00074
00075