ATLAS Offline Software
JetGroupSingleCliqueTest.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 #include "gtest/gtest.h"
10 #include <vector>
11 #include <map>
12 
13 using vec = std::vector<size_t>;
14 
15 TEST(JetGroupSingleCliqueTester, empty) {
16  std::vector<std::size_t> satisfyingJets;
17  auto collector = std::unique_ptr<ITrigJetHypoInfoCollector>(nullptr);
18 
19  std::size_t n_required{1};
20  JetGroupSingleClique jgsc(satisfyingJets, n_required);
21  EXPECT_TRUE(jgsc.next(collector).empty());
22 }
23 
24 TEST(JetGroupSingleCliqueTester, insufficient) {
25  std::vector<std::size_t> satisfyingJets {0, 1};
26  auto collector = std::unique_ptr<ITrigJetHypoInfoCollector>(nullptr);
27 
28  std::size_t n_required{3};
29  JetGroupSingleClique jgsc(satisfyingJets, n_required);
30  EXPECT_TRUE(jgsc.next(collector).empty());
31 }
32 
33 
34 TEST(JetGroupSingleCliqueTester, sufficient) {
35  std::vector<std::size_t> satisfyingJets {0u, 1u};
36  auto collector = std::unique_ptr<ITrigJetHypoInfoCollector>(nullptr);
37 
38  std::size_t n_required{2};
39  JetGroupSingleClique jgsc(satisfyingJets, n_required);
40 
41  vec exp0 {0u, 1u};
42  EXPECT_EQ(jgsc.next(collector), exp0);
43 }
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
JetGroupSingleClique::next
virtual std::vector< std::size_t > next(const Collector &) override
Definition: JetGroupSingleClique.cxx:33
JetGroupSingleClique
Definition: JetGroupSingleClique.h:20
JetGroupSingleClique.h
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
Definition: JetGroupSingleCliqueTest.cxx:6
TEST
TEST(JetGroupSingleCliqueTester, empty)
Definition: JetGroupSingleCliqueTest.cxx:15
checker_macros.h
Define macros for attributes used to control the static checker.