Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
#include "ReconstructionDataFormats/TrackUtils.h"
#include "MathUtils/Primitive2D.h"

namespace o2
{
namespace track
namespace o2::track
{

using SMatrix55Sym = ROOT::Math::SMatrix<double, 5, 5, ROOT::Math::MatRepSym<double, 5>>;
Expand Down Expand Up @@ -180,7 +178,6 @@ class TrackParCovFwd : public TrackParFwd
ClassDefNV(TrackParCovFwd, 1);
};

} // namespace track
} // namespace o2

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
#include <iterator>
#include <gsl/gsl> // for guideline support library; array_view

namespace o2
{
namespace dataformats
namespace o2::dataformats
{

// a label container with both contiguous and non-contiguous modes
Expand Down Expand Up @@ -85,9 +83,14 @@ class LabelContainer
}

// an iterator class to iterate over truthelements
class Iterator : public std::iterator<std::input_iterator_tag, LabelType>
class Iterator
{
private:
using iterator_category = std::input_iterator_tag;
using value_type = LabelType;
using difference_type = std::ptrdiff_t;
using pointer = LabelType*;
using reference = LabelType&;
std::vector<StoredLabelType>& mLabelsRef; // reference to labels vector
int index; // startindex
public:
Expand Down Expand Up @@ -225,7 +228,6 @@ class LabelContainer
}
}; // end class

} // namespace dataformats
} // namespace o2

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ inline o2::track::TrackParFwd FwdDCAFitterN<N, Args...>::FwdgetTrackParamAtPCA(i
trc.propagateParamToZquadratic(z, mBz);
}

return trc;
return {trc};
}

//___________________________________________________________________
Expand Down
2 changes: 1 addition & 1 deletion Framework/Core/include/Framework/ASoAHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ struct CombinationsGenerator {
using CombinationType = typename P::CombinationType;

public:
struct CombinationsIterator : public std::iterator<std::forward_iterator_tag, CombinationType>, public P {
struct CombinationsIterator : public P {
public:
using reference = CombinationType&;
using value_type = CombinationType;
Expand Down
2 changes: 1 addition & 1 deletion Framework/Core/include/Framework/GroupedCombinations.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct GroupedCombinationsGenerator<T1, GroupingPolicy, H, G, pack<Us...>, As...
using joinIterator = typename soa::Join<H, G>::table_t::iterator;
using GroupedIteratorType = pack_to_tuple_t<interleaved_pack_t<repeated_type_pack_t<joinIterator, sizeof...(As)>, pack<As...>>>;

struct GroupedIterator : public std::iterator<std::forward_iterator_tag, GroupedIteratorType>, public GroupingPolicy {
struct GroupedIterator : public GroupingPolicy {
public:
using reference = GroupedIteratorType&;
using value_type = GroupedIteratorType;
Expand Down
11 changes: 5 additions & 6 deletions Framework/Utils/include/DPLUtils/DPLRawParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ class DPLRawParser
// this is a dummy default buffer used to initialize the RawParser in the iterator
// constructor
static constexpr o2::header::RAWDataHeaderV4 initializer = o2::header::RAWDataHeaderV4{};
template <typename T>
using IteratorBase = std::iterator<std::forward_iterator_tag, T>;

/// Iterator implementation
/// Supports the following operations:
Expand All @@ -85,13 +83,14 @@ class DPLRawParser
/// - member function data() returns pointer to payload at current position
/// - member function size() return size of payload at current position
template <typename T>
class Iterator : public IteratorBase<T>
class Iterator
{
public:
using iterator_category = std::forward_iterator_tag;
using self_type = Iterator;
using value_type = typename IteratorBase<T>::value_type;
using reference = typename IteratorBase<T>::reference;
using pointer = typename IteratorBase<T>::pointer;
using value_type = T;
using reference = T&;
using pointer = T*;
// the iterator over the input channels
using input_iterator = decltype(std::declval<InputRecord>().begin());
// the parser type
Expand Down
12 changes: 5 additions & 7 deletions Framework/Utils/include/DPLUtils/RawParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,24 +392,22 @@ class RawParser
uint8_t headerSize = 0;
};

template <typename T>
using IteratorBase = std::iterator<std::forward_iterator_tag, T>;

/// Iterator implementation
/// Supports the following operations:
/// - increment (there is no decrement, its not a bidirectional parser)
/// - dereference operator returns @a RawDataHeaderInfo as common header
/// - member function data() returns pointer to payload at current position
/// - member function size() return size of payload at current position
template <typename T, typename ParentType>
class Iterator : public IteratorBase<T>
class Iterator
{
public:
using parent_type = ParentType;
using self_type = Iterator;
using value_type = typename IteratorBase<T>::value_type;
using reference = typename IteratorBase<T>::reference;
using pointer = typename IteratorBase<T>::pointer;
using iterator_category = std::forward_iterator_tag;
using value_type = T;
using reference = T&;
using pointer = T*;

Iterator() = delete;

Expand Down