Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • holau/Gaudi
  • dmagdali/Gaudi
  • pmunozpa/Gaudi
  • ssottoco/Gaudi
  • cvarni/Gaudi
  • mafila/Gaudi
  • admorris/Gaudi
  • staider/Gaudi
  • gunther/Gaudi
  • bstanisl/Gaudi
  • jtorasso/Gaudi
  • wochung/Gaudi
  • mveghel/Gaudi
  • averbyts/Gaudi
  • dguest/Gaudi
  • alboyer/Gaudi
  • dkonst/Gaudi
  • jcarcell/Gaudi
  • elmsheus/Gaudi
  • hpxgaudi/Gaudi
  • ganis/Gaudi
  • tadej/Gaudi
  • hahansen/Gaudi
  • juesseiv/Gaudi
  • imjelde/gaudida
  • jheuel/Gaudi
  • mimazure/Gaudi
  • masato/Gaudi
  • dcasperfaser/Gaudi
  • faser/offline/Gaudi
  • axu/Gaudi
  • sailer/Gaudi
  • amete/Gaudi
  • ponyisi/Gaudi
  • vavolkl/Gaudi
  • mstahl/Gaudi
  • wlampl/Gaudi
  • kreczko/Gaudi
  • emoyse/Gaudi
  • dhynds/Gaudi
  • sstahl/Gaudi
  • rcurrie/Gaudi
  • smh/Gaudi
  • valassi/Gaudi
  • bwynne/Gaudi_gaudi
  • abarton/Gaudi
  • tsulaia/gaudigaudi
  • mnowak/Gaudi
  • roiser/Gaudi
  • merrenst/Gaudi
  • mato/Gaudi
  • christos/Gaudi
  • goetz/Gaudi
  • goetz/AtlasGaudi
  • tsulaia/atlasgaudi
  • olupton/Gaudi
  • pseyfert/Gaudi
  • graemes/Gaudi
  • akraszna/AtlasGaudi
  • cattanem/Gaudi
  • skluth/Gaudi
  • will/Gaudi
  • ssnyder/Gaudi
  • agonzale/Gaudi
  • leggett/AtlasGaudi
  • apearce/Gaudi
  • mnowak/Gaudi-ORIG
  • fwinkl/AtlasGaudi
  • bwynne/Gaudi_atlas
  • chamont/Gaudi
  • rmatev/Gaudi
  • lhcb/Gaudi
  • atlas/Gaudi
  • akraszna/GaudiGaudi
  • fwinkl/Gaudi
  • jonrob/Gaudi
  • azaborow/Gaudi
  • clemenci/Gaudi
  • hgraslan/Gaudi
  • srimanob/Gaudi
  • graven/Gaudi
  • hegner/Gaudi
  • gaudi/Gaudi
83 results
Show changes
Commits on Source (12)
Showing
with 129 additions and 143 deletions
#####################################################################################
# (c) Copyright 1998-2021 CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
......@@ -24,7 +24,7 @@ gaudi_generate_confuserdb(Gaudi.ConfUser)
gaudi_add_tests(QMTest)
# Python tests
gaudi_add_pytest(tests/nose)
gaudi_add_pytest(tests/pytest)
gaudi_add_pytest(python/Gaudi/Main.py
OPTIONS --doctest-modules
ROOT_DIR python
......
......@@ -158,27 +158,27 @@ RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngin
| id : x vs y (profile) |
1 ++----+----+----+----+----+----+----+----+----+----+
4 ++----+----+----+----+----+----+----+----+----+----+
|. . . . . | . . . . |
|. . . . . | . . . . |
|. . . . . | . . . . |
|. . . . . | . . . . |
0.75 +.........................+........................+
1.5 +.........................+........................+
|. . . . . | . . . . |
|. . . . . | . . . . |
0 I-+IIII**I***+I-*II-II-*--*III--**-*-*I-**III-I*II*I-->*
* |****I.*III***I******.**I*****I.*I*I**II*****I**I**|
-1 +.........................+................I......I+
|. . . . . | . . . . |
|. . . . . | . . . . |
0.5 +.........................+........................+
|. . . . . | . . . . |
|. . . . . | . . . . |
|. I . . . | . . . . |
|. I . . . | . . . . |
0.25 +.....I...................+.....................I..+
|. I* . . . | . . I . I. I |
|.I II II . . I | I I . I . I. I |
|.I II III.I I . I I | I* I I. II . I.II | I
|III *I III.I I I I * I |I II * I. *I . *.I* | *
0 I-+IIIII+I***+I-*II-II-I--*III--*I-I-*I-I*III-IIIIII-->I
-3.5 +.........................+........................+
|. . . . . | . . . . |
|. . . . . | . . . . |
|. . . . . | . . . . |
|. . . . . | . . . . |
-6 ++----+----+----+----+----+----+----+----+----+----+
U
N O
D V
......
......@@ -26,6 +26,8 @@
#include <GaudiKernel/ObjectFactory.h>
#include <GaudiKernel/StreamBuffer.h>
#include <cmath>
std::pair<DataObject*, AIDA::IHistogram1D*> Gaudi::createH1D( ISvcLocator* svcLocator, const std::string& path,
const std::string& title, int nBins, double xlow,
double xup ) {
......@@ -131,11 +133,11 @@ bool Gaudi::Histogram1D::setRms( double rms ) {
// sum weights
stat[0] = sumBinHeights();
stat[1] = 0;
if ( abs( equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
if ( std::abs( equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
stat[1] = ( sumBinHeights() * sumBinHeights() ) / equivalentBinEntries();
stat[2] = m_sumwx;
double mean = 0;
if ( abs( sumBinHeights() ) > std::numeric_limits<double>::epsilon() ) mean = m_sumwx / sumBinHeights();
if ( std::abs( sumBinHeights() ) > std::numeric_limits<double>::epsilon() ) mean = m_sumwx / sumBinHeights();
stat[3] = ( mean * mean + rms * rms ) * sumBinHeights();
m_rep->PutStats( &stat.front() );
return true;
......@@ -150,7 +152,7 @@ bool Gaudi::Histogram1D::setStatistics( int allEntries, double eqBinEntries, dou
stat[0] = sumBinHeights();
// sum weights **2
stat[1] = 0;
if ( abs( eqBinEntries ) > std::numeric_limits<double>::epsilon() )
if ( std::abs( eqBinEntries ) > std::numeric_limits<double>::epsilon() )
stat[1] = ( sumBinHeights() * sumBinHeights() ) / eqBinEntries;
// sum weights * x
stat[2] = mean * sumBinHeights();
......@@ -188,7 +190,7 @@ void Gaudi::Histogram1D::copyFromAida( const AIDA::IHistogram1D& h ) {
double sumw = h.sumBinHeights();
// sumw2
double sumw2 = 0;
if ( abs( h.equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
if ( std::abs( h.equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
sumw2 = ( sumw * sumw ) / h.equivalentBinEntries();
double sumwx = h.mean() * h.sumBinHeights();
......
......@@ -29,6 +29,7 @@
#include <TH2D.h>
#include <TProfile.h>
#include <array>
#include <cmath>
namespace {
using AIDA::IHistogram1D;
......@@ -185,13 +186,13 @@ bool Gaudi::Histogram2D::setRms( double rmsX, double rmsY ) {
std::vector<double> stat( 11 );
stat[0] = sumBinHeights();
stat[1] = 0;
if ( abs( equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
if ( std::abs( equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
stat[1] = ( sumBinHeights() * sumBinHeights() ) / equivalentBinEntries();
stat[2] = m_sumwx;
stat[4] = m_sumwy;
double meanX = 0;
double meanY = 0;
if ( abs( sumBinHeights() ) > std::numeric_limits<double>::epsilon() ) {
if ( std::abs( sumBinHeights() ) > std::numeric_limits<double>::epsilon() ) {
meanX = m_sumwx / sumBinHeights();
meanY = m_sumwy / sumBinHeights();
}
......@@ -228,7 +229,7 @@ void Gaudi::Histogram2D::copyFromAida( const IHistogram2D& h ) {
// statistics
double sumw = h.sumBinHeights();
double sumw2 = 0;
if ( abs( h.equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
if ( std::abs( h.equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
sumw2 = ( sumw * sumw ) / h.equivalentBinEntries();
double sumwx = h.meanX() * h.sumBinHeights();
double sumwx2 = ( h.meanX() * h.meanX() + h.rmsX() * h.rmsX() ) * h.sumBinHeights();
......
......@@ -30,6 +30,8 @@
#include "GaudiPI.h"
#include "TH3D.h"
#include <cmath>
namespace Gaudi {
template <>
void Generic3D<AIDA::IHistogram3D, TH3D>::adoptRepresentation( TObject* rep ) {
......@@ -137,7 +139,7 @@ bool Gaudi::Histogram3D::setRms( double rmsX, double rmsY, double rmsZ ) {
// sum weights
stat[0] = sumBinHeights();
stat[1] = 0;
if ( abs( equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
if ( std::abs( equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
stat[1] = ( sumBinHeights() * sumBinHeights() ) / equivalentBinEntries();
stat[2] = m_sumwx;
stat[4] = m_sumwy;
......@@ -146,7 +148,7 @@ bool Gaudi::Histogram3D::setRms( double rmsX, double rmsY, double rmsZ ) {
double meanX = 0;
double meanY = 0;
double meanZ = 0;
if ( abs( sumBinHeights() ) > std::numeric_limits<double>::epsilon() ) {
if ( std::abs( sumBinHeights() ) > std::numeric_limits<double>::epsilon() ) {
meanX = m_sumwx / sumBinHeights();
meanY = m_sumwy / sumBinHeights();
meanZ = m_sumwz / sumBinHeights();
......@@ -194,7 +196,7 @@ void Gaudi::Histogram3D::copyFromAida( const AIDA::IHistogram3D& h ) {
// statistics
double sumw = h.sumBinHeights();
double sumw2 = 0;
if ( abs( h.equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
if ( std::abs( h.equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
sumw2 = ( sumw * sumw ) / h.equivalentBinEntries();
double sumwx = h.meanX() * h.sumBinHeights();
double sumwx2 = ( h.meanX() * h.meanX() + h.rmsX() * h.rmsX() ) * h.sumBinHeights();
......
......@@ -20,9 +20,7 @@ namespace Gaudi {
: public Functional::FilterPredicate<bool( const Gaudi::Range_<Gaudi::Examples::MyTrack::ConstVector>& )> {
public:
CountSelectedTracks( const std::string& name, ISvcLocator* pSvc )
: FilterPredicate( name, pSvc,
{ KeyValue{ "InputData", Functional::concat_alternatives( "BogusLocation", "MoreBogus",
"MyOutTracks" ) } } ) {}
: FilterPredicate( name, pSvc, { KeyValue{ "InputData", "MyOutTracks" } } ) {}
StatusCode initialize() override {
StatusCode sc = FilterPredicate::initialize();
......
......@@ -29,6 +29,9 @@
// ============================================================================
#include "GaudiExamples/MyTrack.h"
// ============================================================================
#include <cmath>
#ifdef __ICC
// disable icc warning #1125: function "ISelectStatement::operator()(void *)"
// is hidden by "Gaudi::Examples::EvtCollectionSelector::operator()"
......@@ -103,7 +106,7 @@ namespace Gaudi {
std::cout << std::endl << System::typeinfoName( typeid( *this ) ) << "\t -> Momenta(Fix): ";
for ( int i = 0; i < std::min( 5, n ); ++i ) { std::cout << "[" << i << "]=" << m_trkMomFixed[i] << " "; }
for ( int i = 5; i < 99; ++i ) {
if ( abs( m_trkMomFixed[i] ) > std::numeric_limits<float>::epsilon() ) {
if ( std::abs( m_trkMomFixed[i] ) > std::numeric_limits<float>::epsilon() ) {
std::cout << "[" << i << "]= Error in Fixed momentum" << std::endl;
}
}
......
#!/usr/bin/env python3
#####################################################################################
# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
......@@ -52,9 +52,4 @@ def test_aliases():
if __name__ == "__main__":
import sys
import nose
sys.stderr = sys.stdout # redirect nose output to stdout
nose.main(defaultTest=sys.argv[0])
test_aliases()
......@@ -19,13 +19,13 @@
namespace Gaudi::Functional {
// This utility is needed when the inputs of a functional algorithm may be stored in several locations
inline std::string concat_alternatives( std::initializer_list<std::string> c ) {
[[deprecated]] inline std::string concat_alternatives( std::initializer_list<std::string> c ) {
return boost::algorithm::join( c, ":" );
}
template <typename... Strings>
std::string concat_alternatives( const Strings&... s ) {
return concat_alternatives( std::initializer_list<std::string>{ s... } );
[[deprecated]] std::string concat_alternatives( const Strings&... s ) {
return boost::algorithm::join( std::initializer_list<std::string>{ s... }, ":" );
}
[[deprecated( "please use `updateHandleLocation` instead of `Gaudi::Functional::updateHandleLocation`" )]] inline void
......
......@@ -106,69 +106,69 @@
#include "GaudiKernel/Incident.h"
namespace GaudiKernelDict {
struct __Instantiations : public KeyedObject<int>,
public KeyedObject<unsigned int>,
public KeyedObject<long>,
public KeyedObject<unsigned long>,
public SmartRef<DataObject>,
public SmartRef<ContainedObject>,
public SmartRef<ObjectContainerBase>,
public SmartRef<KeyedObject<int>>,
public SmartRef<KeyedObject<unsigned int>>,
public SmartRef<KeyedObject<long>>,
public SmartRef<KeyedObject<unsigned long>>,
public SmartRefVector<DataObject>,
public SmartRefVector<ContainedObject>,
public SmartRefVector<ObjectContainerBase>,
public SmartRefVector<KeyedObject<int>>,
public SmartRefVector<KeyedObject<unsigned int>>,
public SmartRefVector<KeyedObject<long>>,
public SmartRefVector<KeyedObject<unsigned long>>,
// public std::vector<SmartRef<ContainedObject> >,
// public std::vector<SmartRef<DataObject> >,
// public std::vector<SmartRef<ObjectContainerBase> >,
public std::vector<LinkManager::Link*>,
public std::vector<const ContainedObject*>,
public std::vector<ContainedObject*> {
NTuple::Item<bool> BoolItem;
NTuple::Item<char> CharItem;
NTuple::Item<unsigned char> UCharItem;
NTuple::Item<short> ShortItem;
NTuple::Item<unsigned short> UShortItem;
NTuple::Item<long> LongItem;
NTuple::Item<long long> LongLongItem;
NTuple::Item<unsigned long> ULongItem;
NTuple::Item<unsigned long long> ULongLongItem;
NTuple::Item<int> IntItem;
NTuple::Item<unsigned int> UIntItem;
NTuple::Item<float> FloatItem;
NTuple::Item<double> DoubleItem;
NTuple::Array<bool> BoolArray;
NTuple::Array<char> CharArray;
NTuple::Array<unsigned char> UCharArray;
NTuple::Array<short> ShortArray;
NTuple::Array<unsigned short> UShortArray;
NTuple::Array<long> LongArray;
NTuple::Array<unsigned long> ULongArray;
NTuple::Array<int> IntArray;
NTuple::Array<unsigned int> UIntArray;
NTuple::Array<float> FloatArray;
NTuple::Array<double> DoubleArray;
NTuple::Matrix<bool> BoolMatrix;
NTuple::Matrix<char> CharMatrix;
NTuple::Matrix<unsigned char> UCharMatrix;
NTuple::Matrix<short> ShortMatrix;
NTuple::Matrix<unsigned short> UShortMatrix;
NTuple::Matrix<long> LongMatrix;
NTuple::Matrix<unsigned long> ULongMatrix;
NTuple::Matrix<int> IntMatrix;
NTuple::Matrix<unsigned int> UIntMatrix;
NTuple::Matrix<float> FloatMatrix;
NTuple::Matrix<double> DoubleMatrix;
struct __Instantiations {
KeyedObject<int> m_1;
KeyedObject<unsigned int> m_2;
KeyedObject<long> m_3;
KeyedObject<unsigned long> m_4;
SmartRef<DataObject> m_5;
SmartRef<ContainedObject> m_6;
SmartRef<ObjectContainerBase> m_7;
SmartRef<KeyedObject<int>> m_8;
SmartRef<KeyedObject<unsigned int>> m_9;
SmartRef<KeyedObject<long>> m_10;
SmartRef<KeyedObject<unsigned long>> m_11;
SmartRefVector<DataObject> m_12;
SmartRefVector<ContainedObject> m_13;
SmartRefVector<ObjectContainerBase> m_14;
SmartRefVector<KeyedObject<int>> m_15;
SmartRefVector<KeyedObject<unsigned int>> m_16;
SmartRefVector<KeyedObject<long>> m_17;
SmartRefVector<KeyedObject<unsigned long>> m_18;
// std::vector<SmartRef<ContainedObject> > m_19;
// std::vector<SmartRef<DataObject> > m_20;
// std::vector<SmartRef<ObjectContainerBase> > m_21;
std::vector<LinkManager::Link*> m_22;
std::vector<const ContainedObject*> m_23;
std::vector<ContainedObject*> m_24;
NTuple::Item<bool> BoolItem;
NTuple::Item<char> CharItem;
NTuple::Item<unsigned char> UCharItem;
NTuple::Item<short> ShortItem;
NTuple::Item<unsigned short> UShortItem;
NTuple::Item<long> LongItem;
NTuple::Item<long long> LongLongItem;
NTuple::Item<unsigned long> ULongItem;
NTuple::Item<unsigned long long> ULongLongItem;
NTuple::Item<int> IntItem;
NTuple::Item<unsigned int> UIntItem;
NTuple::Item<float> FloatItem;
NTuple::Item<double> DoubleItem;
NTuple::Array<bool> BoolArray;
NTuple::Array<char> CharArray;
NTuple::Array<unsigned char> UCharArray;
NTuple::Array<short> ShortArray;
NTuple::Array<unsigned short> UShortArray;
NTuple::Array<long> LongArray;
NTuple::Array<unsigned long> ULongArray;
NTuple::Array<int> IntArray;
NTuple::Array<unsigned int> UIntArray;
NTuple::Array<float> FloatArray;
NTuple::Array<double> DoubleArray;
NTuple::Matrix<bool> BoolMatrix;
NTuple::Matrix<char> CharMatrix;
NTuple::Matrix<unsigned char> UCharMatrix;
NTuple::Matrix<short> ShortMatrix;
NTuple::Matrix<unsigned short> UShortMatrix;
NTuple::Matrix<long> LongMatrix;
NTuple::Matrix<unsigned long> ULongMatrix;
NTuple::Matrix<int> IntMatrix;
NTuple::Matrix<unsigned int> UIntMatrix;
NTuple::Matrix<float> FloatMatrix;
NTuple::Matrix<double> DoubleMatrix;
SmartDataPtr<DataObject> p1;
SmartDataPtr<ObjectContainerBase> p2;
__Instantiations() : p1( 0, "" ), p2( 0, "" ) {}
SmartDataPtr<DataObject> p1{ 0, "" };
SmartDataPtr<ObjectContainerBase> p2{ 0, "" };
};
} // namespace GaudiKernelDict
......
......@@ -73,42 +73,27 @@ class SmartRefMap;
Version: 1.0
*/
template <class TYPE>
class SmartRef {
class SmartRef final {
/// The container must be a friend
friend class SmartRefArray<TYPE>;
friend class SmartRefList<TYPE>;
friend class SmartRefMap<TYPE>;
public:
enum { VALID = StreamBuffer::VALID, INVALID = StreamBuffer::INVALID };
/// Entry type definition
typedef TYPE entry_type;
protected:
SmartRefBase m_base;
/// Pointer to target data object
mutable const TYPE* m_target = nullptr;
public:
enum { VALID = StreamBuffer::VALID, INVALID = StreamBuffer::INVALID };
/// Entry type definition
typedef TYPE entry_type;
/// Standard Constructor
SmartRef() {
m_base.m_hintID = INVALID;
m_base.m_linkID = INVALID;
_setEnvironment( 0, 0 );
}
/// Standard Constructor with initialisation
SmartRef( TYPE* pObject ) {
SmartRef( const TYPE* pObject = nullptr ) {
m_base.m_hintID = INVALID;
m_base.m_linkID = INVALID;
m_target = pObject;
_setEnvironment( 0, 0 );
}
/// Standard Constructor with initialisation from const object
SmartRef( const TYPE* pObject ) {
m_base.m_hintID = INVALID;
m_base.m_linkID = INVALID;
m_target = const_cast<TYPE*>( pObject );
_setEnvironment( 0, 0 );
_setEnvironment( nullptr, nullptr );
}
/// Copy Constructor
SmartRef( const SmartRef& copy ) {
......@@ -118,42 +103,39 @@ public:
_setEnvironment( copy.m_base.m_data, copy.m_base.m_contd );
}
/// Constructor
SmartRef( long hint, long link, TYPE* obj = nullptr ) {
SmartRef( long hint, long link, const TYPE* obj = nullptr ) {
m_base.m_hintID = hint;
m_base.m_linkID = link;
m_target = obj;
_setEnvironment( 0, 0 );
_setEnvironment( nullptr, nullptr );
}
/// Constructor for references to contained objects passing environment
SmartRef( const ContainedObject* pObj, long hint, long link, TYPE* obj = nullptr ) {
SmartRef( const ContainedObject* pObj, long hint, long link, const TYPE* obj = nullptr ) {
m_base.m_hintID = hint;
m_base.m_linkID = link;
m_target = obj;
const DataObject* src = ( 0 == pObj ) ? 0 : pObj->parent();
const DataObject* src = ( pObj ? pObj->parent() : nullptr );
_setEnvironment( src, pObj );
}
/// Constructor for references to contained objects passing environment
SmartRef( const DataObject* pObj, long hint, long link, TYPE* obj = nullptr ) {
SmartRef( const DataObject* pObj, long hint, long link, const TYPE* obj = nullptr ) {
m_base.m_hintID = hint;
m_base.m_linkID = link;
m_target = obj;
_setEnvironment( pObj, 0 );
_setEnvironment( pObj, nullptr );
}
/// Constructor for references to DataObjects passing environment
SmartRef( const DataObject* pObj, long hint, TYPE* obj = nullptr ) {
SmartRef( const DataObject* pObj, long hint, const TYPE* obj = nullptr ) {
m_base.m_hintID = hint;
m_base.m_linkID = INVALID;
m_target = obj;
_setEnvironment( pObj, 0 );
_setEnvironment( pObj, nullptr );
}
/// Standard destructor
// virtual ~SmartRef() {
//}
/// Check if link should be followed: link must be valid and object not yet loaded
bool shouldFollowLink( const DataObject* /* typ */ ) const { return ( !m_target && m_base.m_hintID != INVALID ); }
bool shouldFollowLink( const DataObject* ) const { return !m_target && m_base.m_hintID != INVALID; }
/// Check if link should be followed: link must be valid and object not yet loaded
bool shouldFollowLink( const ContainedObject* /* typ */ ) const {
return ( !m_target && m_base.m_hintID != INVALID && m_base.m_linkID != INVALID );
bool shouldFollowLink( const ContainedObject* ) const {
return !m_target && m_base.m_hintID != INVALID && m_base.m_linkID != INVALID;
}
/// Access hint id:
long hintID() const { return m_base.m_hintID; }
......@@ -243,7 +225,7 @@ public:
return _setEnvironment( c.m_base.m_data, c.m_base.m_contd );
}
/// Assignment
SmartRef<TYPE>& operator=( TYPE* pObject ) {
SmartRef<TYPE>& operator=( const TYPE* pObject ) {
m_target = pObject;
m_base.m_hintID = INVALID;
m_base.m_linkID = INVALID;
......@@ -268,7 +250,7 @@ public:
}
/// Read the reference from the stream buffer (needed due to stupid G++ compiler)
StreamBuffer& readRef( StreamBuffer& s ) {
m_target = dynamic_cast<TYPE*>( m_base.readObject( m_target, s ) );
m_target = dynamic_cast<const TYPE*>( m_base.readObject( m_target, s ) );
return s;
}
/// Output Streamer operator
......
......@@ -14,7 +14,11 @@
# include <catch2/catch.hpp>
#else
// Catch2 v3
# include <catch2/catch_matchers_floating_point.hpp>
# if __has_include( <catch2/matchers/catch_matchers_floating_point.hpp>)
# include <catch2/matchers/catch_matchers_floating_point.hpp>
# else
# include <catch2/catch_matchers_floating_point.hpp>
# endif
# include <catch2/catch_template_test_macros.hpp>
# include <catch2/catch_test_macros.hpp>
#endif
......
#####################################################################################
# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
......@@ -21,6 +21,5 @@ if(BUILD_TESTING)
# https://its.cern.ch/jira/browse/GAUDI-976
gaudi_add_tests(QMTest ${CMAKE_CURRENT_SOURCE_DIR}/tests/GAUDI-976)
# nosetests
gaudi_add_tests(nosetests ${CMAKE_CURRENT_SOURCE_DIR}/python/GaudiTesting)
gaudi_add_tests(pytest ${CMAKE_CURRENT_SOURCE_DIR}/python/GaudiTesting)
endif()
#####################################################################################
# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
......@@ -64,4 +64,4 @@ gaudi_install(PYTHON)
# Enable QMTest tests
gaudi_add_tests(QMTest)
gaudi_add_pytest(tests/nose)
gaudi_add_pytest(tests/pytest)