ATLAS Offline Software
JetGroupRegister.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGHLTJETHYPO_JETGROUPREGISTER_H
6 #define TRIGHLTJETHYPO_JETGROUPREGISTER_H
7 
9 
10 #include <map>
11 #include <algorithm>
12 
13 // maintain a register of ordered vectors HypoJets
14 
15 struct HypoJetLess{
16  bool operator() (const HypoJetVector::value_type& l,
17  const HypoJetVector::value_type& r) const {
18  return l.get() < r.get();
19  }
20 };
21 
24  const HypoJetVector& r) const {
25 
26  return std::lexicographical_compare(l.begin(),
27  l.end(),
28  r.begin(),
29  r.end(),
30  HypoJetLess());
31  }
32 };
33 
34 
36  public:
37 
38  std::size_t record(HypoJetVector v); // copy vector
39 
40  private:
41  std::map<HypoJetVector, std::size_t, HypoJetVectorLess> m_reg;
42 
43 };
44 #endif
HypoJetVectorLess::operator()
bool operator()(const HypoJetVector &l, const HypoJetVector &r) const
Definition: JetGroupRegister.h:23
beamspotman.r
def r
Definition: beamspotman.py:676
HypoJetDefs.h
JetGroupRegister::m_reg
std::map< HypoJetVector, std::size_t, HypoJetVectorLess > m_reg
Definition: JetGroupRegister.h:41
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition: HypoJetDefs.h:27
JetGroupRegister
Definition: JetGroupRegister.h:35
HypoJetLess
Definition: JetGroupRegister.h:15
python.PyAthena.v
v
Definition: PyAthena.py:154
HypoJetLess::operator()
bool operator()(const HypoJetVector::value_type &l, const HypoJetVector::value_type &r) const
Definition: JetGroupRegister.h:16
JetGroupRegister::record
std::size_t record(HypoJetVector v)
Definition: JetGroupRegister.cxx:7
HypoJetVectorLess
Definition: JetGroupRegister.h:22