Skip to content
Snippets Groups Projects
Commit 4d229829 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Modernize GaudiPython (mr !680)

parents e54fae90 c051b016
No related branches found
No related tags found
1 merge request!680Modernize GaudiPython
Pipeline #
......@@ -31,9 +31,7 @@ namespace GaudiPython
* @date 2005-08-03
*/
template <class TYPE>
struct Interface /* :
public std::unary_function<const IInterface*,TYPE*> */
{
struct Interface {
/** the only one important method
* @param in input interface
* @return resutl of "cast"
......@@ -61,7 +59,7 @@ namespace GaudiPython
};
template <>
struct Interface<IInterface> : public std::unary_function<const IInterface*, IInterface*> {
struct Interface<IInterface> {
typedef IInterface TYPE;
/** the only one important method
* @param in input interface
......
......@@ -25,9 +25,12 @@ namespace GaudiPython
* @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr
* @date 2005-08-02
*/
template <class TYPE>
struct _identity : public std::unary_function<TYPE, TYPE> {
inline Vector::value_type operator()( const Vector::value_type& value ) const { return value; }
struct _identity {
template <typename T>
T operator()( const T& value ) const
{
return value;
}
};
} // end of namespace GaudiPython
......
<lcgdict>
<class name = "__gnu_cxx::dummy" />
<!--class pattern = "GaudiPython::Interface<*>"/-->
<class pattern = "std::unary_function<*>"/>
<class name = "GaudiPython::Helper"/>
<class name = "std::vector<Gaudi::Details::PropertyBase*>" />
......@@ -99,9 +98,6 @@
<class pattern = "GaudiAlg::*Map*" />
<class pattern = "GaudiHistos<*>::*Map*" />
<class pattern = "GaudiTuples<*>::*Map*" />
<class pattern = "std::unary_function<std::pair<*,Tuples::*>" />
<class pattern = "std::unary_function<std::pair<*,NTuple::*>" />
<class pattern = "std::unary_function<std::pair<*,AIDA::*>" />
<class pattern = "*__int128*" />
<class name = "GaudiPython::CallbackStreamBuf">
<!-- assignment operator and copy constructor cannot compile -->
......
......@@ -102,8 +102,7 @@ AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D( const GaudiHistoAlg& al
const std::string& title, const double low, const double high,
const unsigned long bins )
{
return algo.plot( GaudiPython::_identity<GaudiPython::Vector::value_type>(), data.begin(), data.end(), title, low,
high, bins );
return algo.plot( GaudiPython::_identity(), data.begin(), data.end(), title, low, high, bins );
}
// ============================================================================
/* "plot"(book&fill) a sequence of data from the vector (implicit loop)
......@@ -121,8 +120,7 @@ AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D( const GaudiHistoAlg& al
const GaudiAlg::HistoID& ID, const std::string& title,
const double low, const double high, const unsigned long bins )
{
return algo.plot( GaudiPython::_identity<GaudiPython::Vector::value_type>(), data.begin(), data.end(), ID, title, low,
high, bins );
return algo.plot( GaudiPython::_identity(), data.begin(), data.end(), ID, title, low, high, bins );
}
// ============================================================================
/* "plot"(book&fill) a sequence of data from the vector (implicit loop)
......@@ -140,8 +138,7 @@ AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D( const GaudiHistoAlg& al
const long ID, const std::string& title, const double low,
const double high, const unsigned long bins )
{
return algo.plot( GaudiPython::_identity<GaudiPython::Vector::value_type>(), data.begin(), data.end(), ID, title, low,
high, bins );
return algo.plot( GaudiPython::_identity(), data.begin(), data.end(), ID, title, low, high, bins );
}
// ============================================================================
/* "plot"(book&fill) a sequence of data from the vector (implicit loop)
......@@ -159,8 +156,7 @@ AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D( const GaudiHistoAlg& al
const std::string& ID, const std::string& title,
const double low, const double high, const unsigned long bins )
{
return algo.plot( GaudiPython::_identity<GaudiPython::Vector::value_type>(), data.begin(), data.end(), ID, title, low,
high, bins );
return algo.plot( GaudiPython::_identity(), data.begin(), data.end(), ID, title, low, high, bins );
}
// ============================================================================
/* fill the 2D histogram (book on demand)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment