Commit 40222743 authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Remove all local files and svn externals.

Add COOL_2_9-is-no-longer-supported.
Using trunk code with COOL29 API is no longer possible.


git-svn-id: file:///git/lcgcool.svndb/cool/tags/COOL_2_9-patches@20158 4525493e-7705-40b1-a816-d608a930855b
parent 848af472
# $Id: CMT_userenv.csh,v 1.16 2013/05/15 12:03:19 avalassi Exp $
# Add LCGCMT patches from /home/avalassi/releases (e.g. if absent on cvmfs)
###setenv CMTPROJECTPATH /home/avalassi/releases:${CMTPROJECTPATH}
# Special settings for the CORAL3/COOL3 preview branches
# Use a private copy of the latest ROOT6 nightlies
#if ( "$HOST" == "aicoral61.cern.ch" ) then
# setenv CMTPROJECTPATH /home/avalassi/nightlies/dev4/20140610Tue
#else
# echo "ERROR! Invalid host for this USERCONTEXT"
#endif
# Use the nightlies to debug dev2/dev4 issues on the default gcc48 platform
# Use the nightlies to work around "wrong option -std=c++11" on gcc47
# Use the nightlies to work around issues with icc13 buids in LCGCMT_68_root6
#if ( "$HOST" == "aicoral61.cern.ch" ) then
# ###setenv CMTPROJECTPATH /home/avalassi/nightlies/dev2/20140610Tue
# setenv CMTPROJECTPATH /home/avalassi/nightlies/dev4/20140610Tue
# if ( "$CMTCONFIG" == "x86_64-slc6-icc13-dbg" || \
# "$CMTCONFIG" == "x86_64-slc6-gcc47-opt" ) then
# setenv CMTPROJECTPATH /home/avalassi/nightlies/dev2/Tue
# endif
#endif
# $Id: CMT_userenv.sh,v 1.15 2013/05/15 12:03:19 avalassi Exp $
###unset CMTPROJECTPATH; echo CMTPROJECTPATH=$CMTPROJECTPATH
cmtUserContext=`dirname $BASH_SOURCE`
export CMTPROJECTPATH=`tcsh -f -c "source $cmtUserContext/CMT_userenv.csh; echo \\$CMTPROJECTPATH"`
###echo CMTPROJECTPATH=$CMTPROJECTPATH
#============================================================================
# Package CMTUSERCONTEXT - private CMT config for user avalassi
#============================================================================
# LCG AA nightly build area base.
###macro lcgaa_nightlies_base $(SITEROOT)/sw/lcg/app/nightlies
# Internal COOL area with private installations of externals.
# Do not use "/afs/cern.ch/sw/lcg/app/releases/COOL/internal" because pattern
# "path_remove /COOL/" would remove the paths to any external installed there.
###macro cool_internal /afs/cern.ch/sw/lcg/app/cool/internal
# Internal COOL area with private installations of externals for avalassi.
###macro av_internal $(cool_internal)/avalassi
# Private local directory for user avalassi
macro av_home /home/avalassi
# Linux system type (32/64 bit) from fs sysname
###macro fs_sysname 'i386_linux26' host-x86_64 'amd64_linux26'
#----------------------------------------------------------------------------
# LCG AA nightly build area.
###macro lcgaa_nightlies $(lcgaa_nightlies_base)/dev/Wed
# Private copy of the LCG AA nightly build area.
###macro av_nightlies_dev4 /home/avalassi/nightlies/dev4/20141003Fri
#----------------------------------------------------------------------------
# "COOL400" API extensions
#----------------------------------------------------------------------------
# Test the COOL400 API extensions only on selected platforms
###macro_append use_cppflags '' \
### x86_64-slc6-gcc48-dbg ' -DCOOL400'
###macro_append gccxmlopts '' \
### x86_64-slc6-gcc48-dbg ' -DCOOL400'
#----------------------------------------------------------------------------
# LCGCMT and LCG_releases
#----------------------------------------------------------------------------
# *** REMINDER ********************************************
# Remember to set CMTPROJECTPATH in CMT_userenv.bat/csh/sh
# if you want to take LCGCMT from a copy of the nightlies!
# *** REMINDER ********************************************
# If you change CMTPROJECTPATH to take LCGCMT from the nightlies or from a
# copy of the nightlies, you must reset LCG_releases to use externals on AFS
# (in the nightlies LCG_releases points to externals in /build/nightlies...).
# If you use a copy of the nightlies, reset LCG_releases here (user context).
# If you use the nightlies directly, consider CMTEXTRATAGS=LCG_NIGHTLIES.
# General macros after the changes in LCG_Settings (LCG_home no longer exists)
# [e.g. ROOT >=5.34.00 is on lcg/app/releases for both AFS and CVMFS]
# *** NB (APR 2014): THESE MACROS ARE OBSOLETE AND MAY NOT WORK ON >=LCG68! ***
###macro LCG_releases $(SITEROOT)/sw/lcg/app/releases \
### LOCAL $(SITEROOT)/lcg/app/releases
###macro LCG_external $(SITEROOT)/sw/lcg/external \
### LOCAL $(SITEROOT)/lcg/external
###macro LCG_external $(SITEROOT)/sw/lcg/experimental \
### LOCAL $(SITEROOT)/lcg/external
# Use AFS instead of CVMFS for icc13
###macro LCG_external $(LCG_external) \
### target-icc13 /afs/cern.ch/sw/lcg/external
# Extra tags for root6 (extends LCG_Platforms, needed for LCG_system macro)
###tag x86_64-slc6-gcc48-dbg-root6-dev2 x86_64-slc6-gcc48-dbg-root
###tag x86_64-slc6-gcc48-dbg-root6-test x86_64-slc6-gcc48-dbg-root
###tag x86_64-slc6-gcc48-dbg-root6 x86_64-slc6-gcc48-dbg ROOT_GE_6_00
# Experimental setup for new and test platforms
###macro LCG_external $(LCG_external) \
### LOCAL&x86_64-slc6-gcc48-dbg-root6 $(SITEROOT)/lcg/external \
### x86_64-slc6-gcc48-dbg-root6 $(SITEROOT)/sw/lcg/experimental
#----------------------------------------------------------------------------
# CORAL (for COOL tests inside private COOL builds)
#----------------------------------------------------------------------------
# NB: redefining CORAL_config_version and CORAL_base is harmless within
# private CORAL builds; CORAL_home however is defined by cmt/project.cmt.
# Use another CORAL version in the default LCG release area.
###macro CORAL_config_version CORAL_2_4_0
# Use a private CORAL build
# NB: the "/CORAL/" path must always be present to allow CMT path cleanup.
macro CORAL_config_version CORAL_24x
macro CORAL_base $(av_home)/CORAL/$(CORAL_config_version)
macro CORAL_home $(CORAL_home)
macro CORAL_include $(CORAL_home)/include
# Use (a copy of) the CORAL nightlies.
# NB: the "/CORAL/" path must always be present to allow CMT path cleanup.
###macro CORAL_config_version CORAL-preview
###macro CORAL_base $(av_nightlies_dev2)/CORAL/$(CORAL_config_version)
###macro CORAL_home $(CORAL_base)/$(LCG_basesystem)-dbg
# Use the CORAL nightlies directly.
# NB: the "/CORAL/" path must always be present to allow CMT path cleanup.
###macro CORAL_config_version CORAL-preview
###macro CORAL_base $(lcgaa_nightlies)/CORAL/$(CORAL_config_version)
# Use opt version of CORAL for dbg builds on cvmfs (dbg is missing on cvmfs)
###macro CORAL_home $(CORAL_home) \
### LOCAL&target-dbg $(CORAL_base)/$(LCG_basesystem)-opt
#----------------------------------------------------------------------------
# ROOT (for COOL tests inside private COOL builds)
#----------------------------------------------------------------------------
# NB: redefining ROOT macros is harmless within private CORAL builds.
# Use another ROOT version in the default LCG release area.
###macro ROOT_config_version 5.34.13
# Use the ROOT nightlies directly.
# NB: the "/ROOT/" path must always be present to allow CMT path cleanup.
###macro ROOT_config_version ROOT_today
###macro ROOT_base $(lcgaa_nightlies)/ROOT/$(ROOT_config_version)
# Use ROOT6 beta2 from AFS.
# NB: the "/ROOT/" path must always be present to allow CMT path cleanup.
###macro ROOT_config_version 5.99.05
###macro ROOT_base /afs/cern.ch/sw/lcg/app/releases/ROOT/$(ROOT_config_version)
# Use (a copy of) the ROOT6 nightlies.
# NB: the "/ROOT/" path must always be present to allow CMT path cleanup.
###macro ROOT_config_version 6.02.00
###macro ROOT_base $(av_nightlies_dev4)/ROOT/$(ROOT_config_version)
###macro ROOT_home $(ROOT_base)/$(LCG_basesystem)-dbg/root
# Use opt version of ROOT for dbg builds where dbg is missing (e.g. cvmfs)
###macro ROOT_home $(ROOT_home) \
### LOCAL&target-dbg $(ROOT_base)/$(LCG_basesystem)-opt/root
#----------------------------------------------------------------------------
# COOL (for CORAL_SERVER tests inside private CORAL builds)
#----------------------------------------------------------------------------
# NB: redefining COOL_config_version and COOL_base is harmless within
# private COOL builds; COOL_home however is defined by cmt/project.cmt.
# Use a private COOL installation.
# NB: the "/COOL/" path must always be present to allow CMT path cleanup
# (OK as this is /afs/cern.ch/sw/lcg/app/releases/COOL/internal/avalassi)
###macro COOL_config_version COOL_HEAD
###macro COOL_base $(av_home)/$(COOL_config_version)
#----------------------------------------------------------------------------
# Oracle 12c tests
#----------------------------------------------------------------------------
# Use 12.1.0.1.0 on AFS
###macro oracle_config_version $(oracle_config_version) target-linux 12.1.0.1.0
###macro oracle_home $(oracle_home) target-linux /afs/cern.ch/sw/lcg/external/oracle/$(oracle_native_version)/$(LCG_system)
#----------------------------------------------------------------------------
# Frontier client for CORAL3 (SPI-561) and on mac (SPI-439)
#----------------------------------------------------------------------------
# Upgrade Frontier client to 2.8.10 as this is needed by CORAL3 (SPI-561)
###macro Frontier_Client_config_version 2.8.10
###macro Frontier_Client_home /afs/cern.ch/sw/lcg/external/frontier_client/$(Frontier_Client_native_version)/$(LCG_system)
# Downgrade Frontier client to 2.8.7 on mac
# NB: CORAL3 requires Frontier client 2.8.10!
###macro Frontier_Client_config_version $(Frontier_Client_config_version) \
### target-mac 2.8.7
# Use the mac106 version on mac108 for gcc42
###macro Frontier_Client_home $(Frontier_Client_home) \
### target-mac&target-gcc $(LCG_external)/frontier_client/$(Frontier_Client_native_version)/x86_64-mac106-gcc42-opt
#----------------------------------------------------------------------------
# MySQL client on mac (SPI-440)
#----------------------------------------------------------------------------
# Downgrade mysql from 5.5.27 while using LCGCMT from the nightlies
###macro mysql_native_version 5.5.14
# Use the clang42 version for llvm42
###macro mysql_home $(mysql_home) \
### target-mac&target-llvm $(LCG_external)/mysql/$(mysql_native_version)/x86_64-mac108-clang42-opt
#----------------------------------------------------------------------------
# Boost on mac (SPI-441)
#----------------------------------------------------------------------------
# Use the clang42 version for llvm42
###macro Boost_home $(Boost_home) \
### target-mac&target-llvm $(LCG_external)/Boost/$(Boost_native_version)/x86_64-mac108-clang42-opt
# Fix gcc2icc
###macro gcc2icc $(gcc2icc) target-icc13 gcc48
#----------------------------------------------------------------------------
# QMtest on mac (SPI-442)
#----------------------------------------------------------------------------
# Use the clang42 version for gcc42 and llvm42
###macro QMtest_home $(QMtest_home) \
### target-mac&target-gcc $(LCG_external)/QMtest/$(QMtest_native_version)/x86_64-mac108-clang42-opt \
### target-mac&target-llvm $(LCG_external)/QMtest/$(QMtest_native_version)/x86_64-mac108-clang42-opt
# Use the mac106 version on mac108
###macro QMtest_home $(QMtest_home) \
### target-mac $(LCG_external)/QMtest/$(QMtest_native_version)/x86_64-mac106-gcc42-opt
#----------------------------------------------------------------------------
# Python
#----------------------------------------------------------------------------
# Downgrade python from 2.7.6 while using LCGCMT from the nightlies
###macro Python_native_version 2.7.4
#----------------------------------------------------------------------------
project COOL
build_strategy with_installarea
setup_strategy no_root no_config
# Use the configuration from one of the last installed releases
# (default CMTPROJECTPATH is /afs/cern.ch/sw/lcg/app/releases).
###use LCGCMT LCGCMT_72a # No AtlasP1HLT yet for this configuration...
use LCGCMT LCGCMT_71
# Change the above tag to use the configuration from one of the nightly slots
# (nightly CMTPROJECTPATH is /afs/cern.ch/sw/lcg/app/nightlies/<slot>/<day>).
#ifndef COOLKERNEL_CHANNELID_H
#define COOLKERNEL_CHANNELID_H
// Include files
#include "CoolKernel/types.h"
namespace cool {
/** @file ChannelId.h
*
* Type definition for the 'ID' of a channel in a COOL folder.
*
* @author Sven A. Schmidt and Andrea Valassi
* @date 2004-11-05
*///
// ChannelId.
typedef UInt32 ChannelId;
}
#endif
#ifndef COOLKERNEL_CHANNELSELECTION_H
#define COOLKERNEL_CHANNELSELECTION_H 1
// First of all, set/unset CORAL290, COOL300, COOL400 and COOL_HAS_CPP11 macros
#include "CoolKernel/VersionInfo.h"
// Include files
#include <limits>
#ifdef COOL400CPP11ENUM
#include <ostream>
#endif
#include <vector>
#include "CoolKernel/ChannelId.h"
namespace cool
{
/** @class ChannelSelection ChannelSelection.h
*
* Helper class to specify a selection of channels and their ordering
* for multi-channel bulk retrieval of IOVs.
*
* So far, only selection of IOVs _within a given tag_ is supported (the
* choice of the selected tag is made outside the ChannelSelection class).
* Within each channel, IOVs can be browsed ordered by 'iovSince',
* and there is only one IOV valid at any given validity time.
*
* @author Sven A. Schmidt, Andrea Valassi and Marco Clemencic
* @date 2005-08-08
*///
class ChannelSelection
{
friend class ChannelSelectionTest;
public:
/// Internal helper class for channel ranges. Ideally this class should
/// be private but PyCool dictionary generation does not like that!
class ChannelRange
{
public:
// Required by PyCool
#ifdef COOL290CO
ChannelRange()
: m_firstChannel( 0 ) // Fix Coverity UNINIT_CTOR (bug #95363)
, m_lastChannel( 0 ) {}
#else
ChannelRange() {}
#endif
ChannelRange( const ChannelId& firstChannel,
const ChannelId& lastChannel );
ChannelId firstChannel() const;
ChannelId lastChannel() const;
bool inRange( const ChannelId& channel ) const;
private:
ChannelId m_firstChannel;
ChannelId m_lastChannel;
};
/// There are two possible orders to browse IOVs (within a tag) across
/// many channels: 'order by channel, since' and 'order by since, channel'.
/// The second set of the ordering scheme lists the IOVs in reverse order.
#ifndef COOL400CPP11ENUM
enum Order
#else
enum class Order
#endif
{
channelBeforeSince, sinceBeforeChannel,
channelBeforeSinceDesc, sinceDescBeforeChannel
};
#ifdef COOL400CPP11ENUM
// Overloaded operator<< for cool::ChannelSelection::Order
inline friend std::ostream&
operator<<( std::ostream& s, const cool::ChannelSelection::Order& order )
{
return s << (int)order;
}
#endif
/// Constructor to (implicitly) select IOVs from *all* channels
/// with the given order (default is 'order by channel, since').
#ifndef COOL400CPP11ENUM
explicit ChannelSelection( const Order& order = channelBeforeSince );
#else
explicit ChannelSelection( const Order& order = Order::channelBeforeSince );
#endif
/// Constructor to select IOVs for a given channel. This constructor is
/// intended to be used to autoconvert ChannelId to a ChannelSelection.
ChannelSelection( const ChannelId& channel );
/// Constructor to select IOVs for channels within a given range
/// with the given order (default is 'order by channel, since').
ChannelSelection( const ChannelId& firstChannel,
const ChannelId& lastChannel,
#ifndef COOL400CPP11ENUM
const Order& order = channelBeforeSince
#else
const Order& order = Order::channelBeforeSince
#endif
);
/// Constructor to select IOVs with a given channel name.
ChannelSelection( const std::string& channelName,
#ifndef COOL400CPP11ENUM
const Order& order = channelBeforeSince
#else
const Order& order = Order::channelBeforeSince
#endif
);
/// Returns true if selecting all channels.
bool allChannels() const;
/// Returns the first selected channel
/// [std::numeric_limits<ChannelId>::min() if selecting all channels].
ChannelId firstChannel() const;
/// Returns the last selected channel
/// [std::numeric_limits<ChannelId>::max() if selecting all channels].
ChannelId lastChannel() const;
/// Returns the selection order.
Order order() const;
/// Construct a selection to select *all* channels with the given order.
static const
#ifndef COOL400CPP11ENUM
ChannelSelection all( const Order& order = channelBeforeSince );
#else
ChannelSelection all( const Order& order = Order::channelBeforeSince );
#endif
/// Returns true if the given channel is in the selection
bool inSelection( const ChannelId& channel ) const;
/// Returns true if the given channelName is in the selection
bool inSelection( const std::string& channelName ) const;
/// Returns true if the selection is contiguous
/// This is the case if every channel between the very first and the
/// last of the selection ranges is in the selection.
/// This method does not make any assumption about the granularity. The
/// only requirement is that operator++ at the end of an internal channel
/// range will step to the first channel of the next range and not 'land'
/// on a ChannelId outside the selection.
bool isContiguous() const;
/// Adds a channel range to the selection
/// For sake of simplicity, it is required that the range is added
/// to the front or the back of the existing selection without overlap.
void addRange( const ChannelId& firstChannel,
const ChannelId& lastChannel );
/// Adds a channel to the selection
void addChannel( const ChannelId& channel );
/// Returns true is the ChannelSelection is numeric.
bool isNumeric() const;
/// Returns the channel name list
const std::string& channelName() const;
/// Returns the beginning of a const range iterator
std::vector<ChannelRange>::const_iterator begin() const;
/// Returns the end of a const range iterator
std::vector<ChannelRange>::const_iterator end() const;
/// Returns the range count
unsigned int rangeCount() const;
private:
bool m_isNumeric;
bool m_allChannels;
std::vector<ChannelRange> m_ranges;
std::string m_channelName;
Order m_order;
};
}
#endif // COOLKERNEL_CHANNELSELECTION_H
#ifndef COOLKERNEL_COMPOSITESELECTION_H
#define COOLKERNEL_COMPOSITESELECTION_H 1
// First of all, set/unset CORAL290, COOL300, COOL400 and COOL_HAS_CPP11 macros
#include "CoolKernel/VersionInfo.h"
// Include files
#ifdef COOL400CPP11ENUM
#include <ostream>
#endif
#include <vector>
#include "CoolKernel/IRecordSelection.h"
namespace cool
{
//--------------------------------------------------------------------------
/** @class CompositeSelection CompositeSelection.h
*
* Composite selection on a data record obtained by the conjuction (AND)
* or disjunction (OR) of several simplere record selections.
*
* @author Andrea Valassi and Martin Wache
* @date 2008-07-30
*///
class CompositeSelection : virtual public IRecordSelection
{
public:
/// Logical connectives (logical operations).
#ifndef COOL400CPP11ENUM
enum Connective { AND, OR };
#else
enum class Connective { AND, OR };
// Overloaded operator<< for cool::CompositeSelection::Connective
inline friend std::ostream&
operator<<( std::ostream& s, const cool::CompositeSelection::Connective& c )
{
return s << (int)c;
}
#endif
/// Describe a logical connective.
static const std::string describe( Connective conn );
public:
/// Destructor.
virtual ~CompositeSelection();
/// Constructor for connecting two selections.
/// Each input selection is cloned (the clone is owned by this instance).
CompositeSelection( const IRecordSelection* sel1,
Connective conn,
const IRecordSelection* sel2 );
/// Constructor for connecting any number of selections.
/// The vector must contain at least two selections.
/// Each input selection is cloned (the clone is owned by this instance).
CompositeSelection( Connective conn,
const std::vector<const IRecordSelection*>& selVec );
/// Connect another selection.
/// The input selection is cloned (the clone is owned by this instance).
void connect( Connective conn,
const IRecordSelection* sel );
/// Can the selection be applied to a record with the given specification?
bool canSelect( const IRecordSpecification& spec ) const;
/// Apply the selection to the given record.
bool select( const IRecord& record ) const;
/// Clone the record selection (and any objects referenced therein).
IRecordSelection* clone() const;
/// Logical connective between all connected selections.
Connective connective() const;
/// The number N of connected selections.
unsigned int size() const;
/// Return one of the connected selections by its index in [0, N-1].
const IRecordSelection* operator[] ( unsigned int index ) const;
private:
/// Standard constuctor is private
CompositeSelection();
/// Copy constructor - reimplemented for the clone() method
CompositeSelection( const CompositeSelection& rhs );
/// Assignment operator is private
CompositeSelection& operator=( const CompositeSelection& rhs );
/// Constructor with a default connective and no selections - for connect()
CompositeSelection( Connective conn );
private:
/// The logical connective between connected selections.
Connective m_conn;
/// The vector of connected selections.
/// These are clones (owned by this instance) of the user-given selections.
std::vector<IRecordSelection*> m_selVec;
};
}
#endif // COOLKERNEL_COMPOSITESELECTION_H
#ifndef RELATIONALCOOL_CONSTRECORDADAPTER_H
#define RELATIONALCOOL_CONSTRECORDADAPTER_H 1
// Include files
#include "CoolKernel/IRecord.h"
#include "CoolKernel/RecordSpecification.h"
#include "CoralBase/AttributeList.h"
namespace cool
{
//--------------------------------------------------------------------------
/** @class ConstRecordAdapter ConstRecordAdapter.h
*
* Read-only wrapper of a constant coral::AttributeList reference,
* implementing the cool::IRecord interface. The adapter can only be
* used as long as the AttributeList is alive. The adapter creates
* its own RecordSpecification from one specified at construction time.
*
* All non-const methods throw: this is effectively a read-only class.