Commit f902d04d authored by Andrea Valassi's avatar Andrea Valassi Committed by cdelort
Browse files

Remove COOL300TS and COOL300DP (CORALCOOL-2943)

git-svn-id: https://svnweb.cern.ch/trac/lcgcool/changeset/20128 4525493e-7705-40b1-a816-d608a930855b
parent 40573a99
#ifndef COOLKERNEL_COMPOSITESELECTION_H
#define COOLKERNEL_COMPOSITESELECTION_H 1
// First of all, set/unset CORAL290, COOL300, COOL400 and COOL_HAS_CPP11 macros
// First of all, set/unset COOL400 macros
#include "CoolKernel/VersionInfo.h"
// Include files
......
#ifndef COOLKERNEL_FIELDSELECTION_H
#define COOLKERNEL_FIELDSELECTION_H 1
// First of all, set/unset CORAL290, COOL300, COOL400 and COOL_HAS_CPP11 macros
// First of all, set/unset COOL400 macros
#include "CoolKernel/VersionInfo.h"
// Include files
......
#ifndef COOLKERNEL_FOLDERVERSIONING_H
#define COOLKERNEL_FOLDERVERSIONING_H 1
// First of all, set/unset CORAL290, COOL300, COOL400 and COOL_HAS_CPP11 macros
// First of all, set/unset COOL400 macros
#include "CoolKernel/VersionInfo.h"
// Include files
......
#ifndef COOLKERNEL_HVSTAGLOCK_H
#define COOLKERNEL_HVSTAGLOCK_H 1
// First of all, set/unset CORAL290, COOL300, COOL400 and COOL_HAS_CPP11 macros
// First of all, set/unset COOL400 macros
#include "CoolKernel/VersionInfo.h"
// Include files
......
......@@ -102,30 +102,6 @@ namespace cool
const std::string& description = "",
bool createParents = false ) = 0;
#ifndef COOL300DP
/// DEPRECATED: use IFolderSpecification instead of IRecordSpecification!
/// This is similar to the COOL1.3.3 API (with IRecordSpecification
/// instead of ExtendedAttributeListSpecification), for easier porting of
/// user code, but it is likely to be removed in a future COOL release.
#ifndef COOL400CPP11ENUM
COOL_DEPRECATED // NB remove embedded directives (CORALCOOL-2804)
( virtual IFolderPtr createFolder
( const std::string& fullPath,
const IRecordSpecification & payloadSpec,
const std::string& description = "",
FolderVersioning::Mode mode = FolderVersioning::SINGLE_VERSION,
bool createParents = false ) ) = 0;
#else
COOL_DEPRECATED // NB remove embedded directives (CORALCOOL-2804)
( virtual IFolderPtr createFolder
( const std::string& fullPath,
const IRecordSpecification & payloadSpec,
const std::string& description = "",
FolderVersioning::Mode mode = FolderVersioning::Mode::SINGLE_VERSION,
bool createParents = false ) ) = 0;
#endif
#endif
/// Does this folder exist?
/// Throws DatabaseNotOpen if the database is not open.
/// Throws HvsPathHandlerException if the given path has an invalid format.
......
......@@ -132,19 +132,6 @@ namespace cool
bool userTagOnly = false ) = 0;
#endif
#ifndef COOL300DP
/// DEPRECATED - added for easier compatibility with COOL 1.3
/// (this is likely to be removed in a future COOL release).
/// Use it instead with cool::Record (not coral::AttributeList) arguments!
COOL_DEPRECATED
( virtual void storeObject( const ValidityKey & since,
const ValidityKey & until,
const coral::AttributeList& payload,
const ChannelId & channelId,
const std::string& userTagName = "",
bool userTagOnly = false ) ) = 0;
#endif
/// Set a new finite end-of-validity value for all SV objects in a given
/// channel selection whose end-of-validity is currently infinite.
/// The channel selection is specified through a ChannelSelection object.
......
#ifndef COOLKERNEL_RECORDEXCEPTION_H
#define COOLKERNEL_RECORDEXCEPTION_H 1
// First of all, set/unset CORAL290, COOL300, COOL400 and COOL_HAS_CPP11 macros
// First of all, set/unset COOL400 macros
#include "CoolKernel/VersionInfo.h"
// Include files
......
#ifndef COOLKERNEL_STORAGETYPE_H
#define COOLKERNEL_STORAGETYPE_H 1
// First of all, set/unset CORAL290, COOL300, COOL400 and COOL_HAS_CPP11 macros
// First of all, set/unset COOL400 macros
#include "CoolKernel/VersionInfo.h"
// Include files
......
#ifndef COOLKERNEL_TIME_H
#define COOLKERNEL_TIME_H 1
// First of all, set/unset CORAL290, COOL300, COOL400 and COOL_HAS_CPP11 macros
#include "CoolKernel/VersionInfo.h"
// For COOL300, check that CORAL300 extensions are enabled in CORAL
#include "CoralBase/VersionInfo.h"
#ifdef COOL300TS
#ifndef CORAL300CPP11
#error "ERROR: COOL300TS requires CORAL300CPP11"
#endif
#endif
// For COOL3, the CORAL3 TimeStamp extensions are needed
// This is no longer checked explicitly (CORALCOOL-2943)
#include "CoolKernel/VersionInfo.h" // kept here but no longer needed
#include "CoralBase/VersionInfo.h" // kept here but no longer needed
// Include files
#ifdef COOL300TS
#include "CoralBase/TimeStamp.h"
#endif
#include "CoralBase/TimeStamp.h" // NB: CORAL3 TimeStamp is needed!
#include "CoolKernel/ITime.h"
namespace cool
......@@ -65,7 +57,6 @@ namespace cool
/// Assignment operator from any other ITime.
Time& operator=( const ITime& rhs );
#ifdef COOL300TS
/// Copy constructor from a coral::TimeStamp.
Time( const coral::TimeStamp& rhs );
......@@ -77,76 +68,47 @@ namespace cool
{
return m_ts;
}
#endif
/// Returns the year.
int year() const
{
#ifndef COOL300TS
return m_year;
#else
return m_ts.year();
#endif
}
/// Returns the month [1-12].
int month() const
{
#ifndef COOL300TS
return m_month;
#else
return m_ts.month();
#endif
}
/// Returns the day [1-31].
int day() const
{
#ifndef COOL300TS
return m_day;
#else
return m_ts.day();
#endif
}
/// Returns the hour [0-23].
int hour() const
{
#ifndef COOL300TS
return m_hour;
#else
return m_ts.hour();
#endif
}
/// Returns the minute [0-59].
int minute() const
{
#ifndef COOL300TS
return m_minute;
#else
return m_ts.minute();
#endif
}
/// Returns the second [0-59].
int second() const
{
#ifndef COOL300TS
return m_second;
#else
return m_ts.second();
#endif
}
/// Returns the nanosecond [0-999999999].
long nanosecond() const
{
#ifndef COOL300TS
return m_nanosecond;
#else
return m_ts.nanosecond();
#endif
}
/// Print to an output stream.
......@@ -160,17 +122,7 @@ namespace cool
private:
#ifndef COOL300TS
int m_year;
int m_month;
int m_day;
int m_hour;
int m_minute;
int m_second;
long m_nanosecond;
#else
coral::TimeStamp m_ts;
#endif
};
......
......@@ -51,8 +51,8 @@
//---------------------------------------------------------------------------
#ifdef COOL300
#define COOL300CPP11 1 // KEPT BUT NO LONGER NEEDED CORALCOOL-2943
#define COOL300TS 1 // API use coral::TimeStamp in cool::Time
#define COOL300DP 1 // API remove previously deprecated calls
#define COOL300TS 1 // KEPT BUT NO LONGER NEEDED CORALCOOL-2943
#define COOL300DP 1 // KEPT BUT NO LONGER NEEDED CORALCOOL-2943
#else
#undef COOL300CPP11 // Do undef (do not leave the option to -D this explicitly)
#undef COOL300TS // Do undef (do not leave the option to -D this explicitly)
......
#ifndef COOLKERNEL_POINTERS_H
#define COOLKERNEL_POINTERS_H 1
// First of all, set/unset COOL290, COOL300, COOL_HAS_CPP11 and COOL400 macros
// First of all, set/unset COOL400 macros
#include "CoolKernel/VersionInfo.h"
// Include files
......
......@@ -18,24 +18,10 @@ Time::~Time()
//-----------------------------------------------------------------------------
#ifndef COOL300TS
Time::Time()
{
coral::TimeStamp now;
m_year = now.year();
m_month = now.month();
m_day = now.day();
m_hour = now.hour();
m_minute = now.minute();
m_second = now.second();
m_nanosecond = now.nanosecond();
}
#else
Time::Time()
: m_ts() // coral::TimeStamp() returns the current UTC time
{
}
#endif
//-----------------------------------------------------------------------------
......@@ -46,17 +32,7 @@ Time::Time( int year,
int minute,
int second,
long nanosecond ) :
#ifndef COOL300TS
m_year( year )
, m_month( month )
, m_day( day )
, m_hour( hour )
, m_minute( minute )
, m_second( second )
, m_nanosecond( nanosecond )
#else
m_ts( year, month, day, hour, minute, second, nanosecond )
#endif
{
}
......@@ -64,17 +40,7 @@ Time::Time( int year,
Time::Time( const Time& rhs ) :
ITime( rhs ),
#ifndef COOL300TS
m_year( rhs.year() )
, m_month( rhs.month() )
, m_day( rhs.day() )
, m_hour( rhs.hour() )
, m_minute( rhs.minute() )
, m_second( rhs.second() )
, m_nanosecond( rhs.nanosecond() )
#else
m_ts( rhs.m_ts )
#endif
{
}
......@@ -83,34 +49,14 @@ Time::Time( const Time& rhs ) :
Time& Time::operator=( const Time& rhs )
{
if ( this == &rhs ) return *this; // Fix Coverity SELF_ASSIGN
#ifndef COOL300TS
m_year = rhs.year();
m_month = rhs.month();
m_day = rhs.day();
m_hour = rhs.hour();
m_minute = rhs.minute();
m_second = rhs.second();
m_nanosecond = rhs.nanosecond();
#else
m_ts = rhs.m_ts;
#endif
return (*this);
}
//-----------------------------------------------------------------------------
Time::Time( const ITime& rhs ) :
#ifndef COOL300TS
m_year( rhs.year() )
, m_month( rhs.month() )
, m_day( rhs.day() )
, m_hour( rhs.hour() )
, m_minute( rhs.minute() )
, m_second( rhs.second() )
, m_nanosecond( rhs.nanosecond() )
#else
m_ts( rhs.year(), rhs.month(), rhs.day(), rhs.hour(), rhs.minute(), rhs.second(), rhs.nanosecond() )
#endif
{
}
......@@ -118,38 +64,24 @@ Time::Time( const ITime& rhs ) :
Time& Time::operator=( const ITime& rhs )
{
#ifndef COOL300TS
m_year = rhs.year();
m_month = rhs.month();
m_day = rhs.day();
m_hour = rhs.hour();
m_minute = rhs.minute();
m_second = rhs.second();
m_nanosecond = rhs.nanosecond();
#else
m_ts = coral::TimeStamp( rhs.year(), rhs.month(), rhs.day(), rhs.hour(), rhs.minute(), rhs.second(), rhs.nanosecond() );
#endif
return (*this);
}
//-----------------------------------------------------------------------------
#ifdef COOL300TS
Time::Time( const coral::TimeStamp& rhs )
: m_ts( rhs )
{
}
#endif
//-----------------------------------------------------------------------------
#ifdef COOL300TS
Time& Time::operator=( const coral::TimeStamp& rhs )
{
m_ts = rhs;
return (*this);
}
#endif
//-----------------------------------------------------------------------------
......@@ -180,46 +112,14 @@ std::ostream& Time::print( std::ostream& os ) const
bool Time::operator==( const ITime& rhs ) const
{
#ifndef COOL300TS
if ( m_year != rhs.year() ) return false;
if ( m_month != rhs.month() ) return false;
if ( m_day != rhs.day() ) return false;
if ( m_hour != rhs.hour() ) return false;
if ( m_minute != rhs.minute() ) return false;
if ( m_second != rhs.second() ) return false;
if ( m_nanosecond != rhs.nanosecond() ) return false;
return true;
#else
return ( m_ts == cool::Time( rhs ).coralTimeStamp() );
#endif
}
//-----------------------------------------------------------------------------
bool Time::operator>( const ITime& rhs ) const
{
#ifndef COOL300TS
if ( m_year > rhs.year() ) return true;
if ( m_year < rhs.year() ) return false;
if ( m_month > rhs.month() ) return true;
if ( m_month < rhs.month() ) return false;
if ( m_day > rhs.day() ) return true;
if ( m_day < rhs.day() ) return false;
if ( m_hour > rhs.hour() ) return true;
if ( m_hour < rhs.hour() ) return false;
if ( m_minute > rhs.minute() ) return true;
if ( m_minute < rhs.minute() ) return false;
if ( m_second > rhs.second() ) return true;
if ( m_second < rhs.second() ) return false;
if ( m_nanosecond > rhs.nanosecond() ) return true;
if ( m_nanosecond < rhs.nanosecond() ) return false;
if ( (*this) == rhs ) return false;
std::stringstream s;
s << "PANIC! Could not determine if " << *this << " > " << rhs;
throw Exception( s.str(), "Time" );
#else
return ( m_ts > cool::Time( rhs ).coralTimeStamp() );
#endif
}
//-----------------------------------------------------------------------------
// First of all, set/unset COOL290, COOL300, COOL_HAS_CPP11 and COOL400 macros
// First of all, set/unset COOL400 macros
#include "CoolKernel/VersionInfo.h"
#ifdef COOL400
......
#ifndef RELATIONALCOOL_MANUALTRANSACTION_H
#define RELATIONALCOOL_MANUALTRANSACTION_H 1
// First of all, set/unset COOL290, COOL300, COOL_HAS_CPP11 and COOL400 macros
// First of all, set/unset COOL400 macros
#include "CoolKernel/VersionInfo.h"
// This class only exists in the COOL400 API
......
#ifndef RELATIONALCOOL_PYCOOLHELPERS_H
#define RELATIONALCOOL_PYCOOLHELPERS_H 1
// First of all, set/unset CORAL290, COOL300, COOL400 and COOL_HAS_CPP11 macros
// First of all, set/unset CORAL290 macros
#include "CoolKernel/VersionInfo.h"
// Include files
......
......@@ -1042,30 +1042,6 @@ IFolderSetPtr RalDatabase::createFolderSet( const std::string& fullPath,
}
//-----------------------------------------------------------------------------
#ifndef COOL300DP
IFolderPtr RalDatabase::createFolder
( const std::string& fullPath,
const IRecordSpecification& payloadSpec,
const std::string& description,
FolderVersioning::Mode versioningMode,
bool createParents )
{
// Cross-check that the database is open
if ( ! isOpen() ) throw DatabaseNotOpen( "RalDatabase" );
// Cross-check that we're not in manual transaction more
if ( ! transactionMgr()->autoTransactions() ) {
throw RelationalException("Cannot create folder in manual "
"transaction mode", "RalDatabase");
}
IFolderPtr folder =
createFolder( fullPath, payloadSpec, description,
versioningMode, createParents, PayloadMode::Mode::INLINEPAYLOAD );
return folder;
}
#endif
//-----------------------------------------------------------------------------
IFolderPtr RalDatabase::createFolder
......
#ifndef RELATIONALCOOL_RALDATABASE_H
#define RELATIONALCOOL_RALDATABASE_H 1
// First of all, set/unset COOL290, COOL300, COOL_HAS_CPP11 and COOL400 macros
// First of all, set/unset COOL400 macros
#include "CoolKernel/VersionInfo.h"
// Include files
......@@ -120,18 +120,6 @@ namespace cool
const std::string& description,
bool createParents );
#ifndef COOL300DP
/// DEPRECATED: this is likely to be removed in the next major release
/// (similar to the COOL133 API, with IRecordSpecification instead of
/// ExtendedAttributeListSpecification: use IFolderSpecification instead).
IFolderPtr createFolder
( const std::string& fullPath,
const IRecordSpecification& payloadSpec,
const std::string& description,
FolderVersioning::Mode mode,
bool createParents );
#endif
/// Create a new folder and return the corresponding manager
/// The ownership of the folder manager instance is shared
IFolderPtr createFolder
......
#ifndef RELATIONALCOOL_RELATIONALDATABASE_H
#define RELATIONALCOOL_RELATIONALDATABASE_H 1
// First of all, set/unset COOL290, COOL300, COOL_HAS_CPP11 and COOL400 macros
// First of all, set/unset COOL400 macros
#include "CoolKernel/VersionInfo.h"
// Include files
......@@ -151,20 +151,6 @@ namespace cool
const std::string& description = "",
bool createParents = false ) = 0;
#ifndef COOL300DP
/// DEPRECATED: use IFolderSpecification instead of IRecordSpecification!
/// This is similar to the COOL1.3.3 API (with IRecordSpecification
/// instead of ExtendedAttributeListSpecification), for easier porting of
/// user code, but it is likely to be removed in a future COOL release.
/// PURE VIRTUAL method implemented in subclasses.
virtual IFolderPtr createFolder
( const std::string& fullPath,
const IRecordSpecification& payloadSpec,
const std::string& description = "",
FolderVersioning::Mode mode = FolderVersioning::Mode::SINGLE_VERSION,
bool createParents = false ) = 0;
#endif
/// Does this folder exist?
/// Throws DatabaseNotOpen if the database is not open.
/// Throws HvsPathHandlerException if the given path has an invalid format.
......
......@@ -532,25 +532,6 @@ void RelationalFolder::storeObject( const ValidityKey& since,
//-----------------------------------------------------------------------------
#ifndef COOL300DP
void RelationalFolder::storeObject( const ValidityKey& since,
const ValidityKey& until,
const coral::AttributeList& payload,
const ChannelId& channelId,
const std::string& userTagName,
bool userTagOnly )
{
//log() << "Store object using the AttributeList API"
// << coral::MessageStream::endmsg;
ConstRecordAdapter record( payloadSpecification(), payload );
//log() << "Store ConstRecordAdapter using the new API "
// << coral::MessageStream::endmsg;
storeObject( since, until, record, channelId, userTagName, userTagOnly );
}
#endif
//-----------------------------------------------------------------------------
void RelationalFolder::storeObject( RelationalObjectPtr& object,
bool userTagOnly )
{
......
......@@ -212,16 +212,6 @@ namespace cool
const std::string& userTagName = "",
bool userTagOnly = false );
#ifndef COOL300DP
// OBSOLETE - kept for backward compatibility
void storeObject( const ValidityKey& since,
const ValidityKey& until,
const coral::AttributeList& payload,
const ChannelId& channelId,
const std::string& userTagName = "",
bool userTagOnly = false );
#endif
// common method called by the methods with the different parameters above
void storeObject( RelationalObjectPtr& object,
bool userTagOnly = false );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment