ATLAS Offline Software
PyROOTIteratorFuncs.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
31 #ifndef ROOTUTILS_PYROOTITERATORFUNCS_H
32 #define ROOTUTILS_PYROOTITERATORFUNCS_H
33 
34 #include <type_traits>
35 #include <iterator>
36 
37 
38 namespace RootUtils {
39 
40 
44 template <class T>
46 {
47 public:
49  static bool eq (T a, T b) { return a == b; }
50  static bool ne (T a, T b) { return a != b; }
51 
52 
54  static typename std::enable_if<
55  std::is_base_of_v<std::random_access_iterator_tag,
56  typename std::iterator_traits<T>::iterator_category>,
57 
58  bool>::type
59  lt (T a, T b) { return a < b; }
60 };
61 
62 
63 } // namespace RootUtils
64 
65 
66 #endif // not ROOTUTILS_PYROOTITERATORFUNCS_H
RootUtils
Definition: ILogger.h:20
RootUtils::PyROOTIteratorFuncs::lt
static std::enable_if< std::is_base_of_v< std::random_access_iterator_tag, typename std::iterator_traits< T >::iterator_category >, bool >::type lt(T a, T b)
Ordering comparison. Only supported by random access iterators.
Definition: PyROOTIteratorFuncs.h:59
RootUtils::PyROOTIteratorFuncs::eq
static bool eq(T a, T b)
Equality comparisons. All iterators have this.
Definition: PyROOTIteratorFuncs.h:49
RootUtils::PyROOTIteratorFuncs::ne
static bool ne(T a, T b)
Definition: PyROOTIteratorFuncs.h:50
RootUtils::PyROOTIteratorFuncs
Provide functions for iterator comparisons.
Definition: PyROOTIteratorFuncs.h:46
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78