ATLAS Offline Software
Combinations.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 TRIGCOMPOSITEUTILS_COMBINATIONS_H
6 #define TRIGCOMPOSITEUTILS_COMBINATIONS_H
7 
11 #include <functional>
12 #include <vector>
13 
14 namespace TrigCompositeUtils
15 {
16 
18  {
19  public:
20  using VecLInfo_t = std::vector<LinkInfo<xAOD::IParticleContainer>>;
22  const std::vector<std::size_t> &legMultiplicities,
23  const std::vector<VecLInfo_t> &legFeatures,
24  const std::function<bool(const VecLInfo_t &)> &filter);
25 
27  const std::vector<std::size_t> &legMultiplicities,
28  const std::vector<VecLInfo_t> &legFeatures,
30 
31  Combinations(const std::function<bool(const VecLInfo_t &)> &filter);
32 
34 
35  void reserve(std::size_t capacity);
36 
37  bool empty() const;
38 
39  std::size_t size() const;
40 
41  void addLeg(std::size_t multiplicity, const VecLInfo_t &features);
42  void addLeg(std::size_t multiplicity, VecLInfo_t&& features);
43  void addLeg(const VecLInfo_t &features);
44  void addLeg(VecLInfo_t&& features);
45 
46  IPartCombItr begin() const;
47  IPartCombItr end() const;
48 
49  private:
50  std::function<bool(const VecLInfo_t &)> m_filter;
51  std::vector<std::size_t> m_legMultiplicities;
52  std::vector<VecLInfo_t> m_legFeatures;
53  }; //> end class Combinations
54 } // namespace TrigCompositeUtils
55 
56 #endif //> TRIGCOMPOSITEUTILS_COMBINATIONS_H
IPartCombItr.h
TrigCompositeUtils::FilterType::UniqueObjects
@ UniqueObjects
Do not allow any repeated objects.
TrigCompositeUtils::Combinations::m_legFeatures
std::vector< VecLInfo_t > m_legFeatures
Definition: Combinations.h:52
TrigCompositeUtils::Combinations::reserve
void reserve(std::size_t capacity)
Definition: Combinations.cxx:39
TrigCompositeUtils::Combinations::m_filter
std::function< bool(const VecLInfo_t &)> m_filter
Definition: Combinations.h:50
TrigCompositeUtils::IPartCombItr
Definition: IPartCombItr.h:42
TrigCompositeUtils::Combinations::addLeg
void addLeg(std::size_t multiplicity, const VecLInfo_t &features)
Definition: Combinations.cxx:55
covarianceTool.filter
filter
Definition: covarianceTool.py:514
TrigCompositeUtils::FilterType
FilterType
Definition: IPartCombItr.h:22
TrigCompositeUtils::Combinations::end
IPartCombItr end() const
Definition: Combinations.cxx:89
TrigCompositeUtils::Combinations::Combinations
Combinations(const std::vector< std::size_t > &legMultiplicities, const std::vector< VecLInfo_t > &legFeatures, const std::function< bool(const VecLInfo_t &)> &filter)
Definition: Combinations.cxx:12
IParticleContainer.h
TrigCompositeUtils::Combinations
Definition: Combinations.h:18
TrigCompositeUtils::Combinations::VecLInfo_t
std::vector< LinkInfo< xAOD::IParticleContainer > > VecLInfo_t
Definition: Combinations.h:20
LinkInfo.h
TrigCompositeUtils::Combinations::size
std::size_t size() const
Definition: Combinations.cxx:50
TrigCompositeUtils::Combinations::m_legMultiplicities
std::vector< std::size_t > m_legMultiplicities
Definition: Combinations.h:51
TrigCompositeUtils
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:19
TrigCompositeUtils::Combinations::empty
bool empty() const
Definition: Combinations.cxx:45
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
TrigCompositeUtils::Combinations::begin
IPartCombItr begin() const
Definition: Combinations.cxx:77