Project
Loading...
Searching...
No Matches
AODProducerHelpers.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#ifndef O2_AODPRODUCER_HELPERS
16#define O2_AODPRODUCER_HELPERS
17
18#include <boost/functional/hash.hpp>
19#include <boost/tuple/tuple.hpp>
20#include <boost/unordered_map.hpp>
22
24{
25
26typedef boost::tuple<int, int, int> Triplet_t;
27
29 std::size_t operator()(Triplet_t const& e) const
30 {
31 std::size_t seed = 0;
32 boost::hash_combine(seed, e.get<0>());
33 boost::hash_combine(seed, e.get<1>());
34 boost::hash_combine(seed, e.get<2>());
35 return seed;
36 }
37};
38
40 bool operator()(Triplet_t const& x, Triplet_t const& y) const
41 {
42 return (x.get<0>() == y.get<0>() &&
43 x.get<1>() == y.get<1>() &&
44 x.get<2>() == y.get<2>());
45 }
46};
47
48typedef boost::unordered_map<Triplet_t, int, TripletHash, TripletEqualTo> TripletsMap_t;
49
50template <typename T>
59} // namespace o2::aodhelpers
60
61#endif /* O2_AODPRODUCER_HELPERS */
uint32_t c
Definition RawData.h:2
decltype(auto) make(const Output &spec, Args... args)
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
GLint GLenum GLint x
Definition glcorearb.h:403
auto createTableCursor(framework::ProcessingContext &pc)
boost::tuple< int, int, int > Triplet_t
boost::unordered_map< Triplet_t, int, TripletHash, TripletEqualTo > TripletsMap_t
bool operator()(Triplet_t const &x, Triplet_t const &y) const
std::size_t operator()(Triplet_t const &e) const
bool resetCursor(LifetimeHolder< TableBuilder > builder)