ATLAS Offline Software
PhysicsAnalysis
TopPhys
xAOD
TopConfiguration
TopConfiguration
DuplicateRemoval.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef _UTILS_DUPLICATE_REMOVAL_H_
6
#define _UTILS_DUPLICATE_REMOVAL_H_
7
8
#include <vector>
9
#include <algorithm>
10
11
namespace
top
{
12
// remove duplicate elements in input vector
13
// performs sorting of the elements and remove duplicates via std::unique
14
template
<
typename
T>
15
void
remove_duplicates
(std::vector<T>&
input
) {
16
std::sort(
input
.begin(),
input
.end());
17
input
.erase(std::unique(
input
.begin(),
input
.end()),
input
.end());
18
}
19
}
20
21
#endif
top
TopConfig A simple configuration that is NOT a singleton.
Definition:
AnalysisTrackingHelper.cxx:58
PlotPulseshapeFromCool.input
input
Definition:
PlotPulseshapeFromCool.py:106
top::remove_duplicates
void remove_duplicates(std::vector< T > &input)
Definition:
DuplicateRemoval.h:15
Generated on Tue Jul 2 2024 21:14:15 for ATLAS Offline Software by
1.8.18