9 #include <mdst/dataobjects/SoftwareTriggerResult.h>
10 #include <gtest/gtest.h>
19 namespace SoftwareTrigger {
21 TEST(SoftwareTriggerResultTest, basic)
23 SoftwareTriggerResult result;
26 result.addResult(
"cutOne", SoftwareTriggerCutResult::c_accept, SoftwareTriggerCutResult::c_accept);
28 EXPECT_EQ(SoftwareTriggerCutResult::c_accept, result.getResult(
"cutOne"));
29 EXPECT_EQ(SoftwareTriggerCutResult::c_accept, result.getNonPrescaledResult(
"cutOne"));
30 EXPECT_THROW(result.getResult(
"cutTwo"), std::out_of_range);
34 result.addResult(
"cutOne", SoftwareTriggerCutResult::c_reject, SoftwareTriggerCutResult::c_reject);
36 EXPECT_EQ(SoftwareTriggerCutResult::c_reject, result.getResult(
"cutOne"));
37 EXPECT_EQ(SoftwareTriggerCutResult::c_reject, result.getNonPrescaledResult(
"cutOne"));
41 result.addResult(
"cutOne", SoftwareTriggerCutResult::c_noResult);
43 EXPECT_EQ(SoftwareTriggerCutResult::c_noResult, result.getResult(
"cutOne"));
47 result.addResult(
"cutOne", SoftwareTriggerCutResult::c_accept);
49 EXPECT_EQ(SoftwareTriggerCutResult::c_accept, result.getResult(
"cutOne"));
50 EXPECT_EQ(SoftwareTriggerCutResult::c_noResult, result.getNonPrescaledResult(
"cutOne"));
55 result.addResult(
"cutOne", SoftwareTriggerCutResult::c_accept, SoftwareTriggerCutResult::c_reject);
56 result.addResult(
"cutTwo", SoftwareTriggerCutResult::c_noResult, SoftwareTriggerCutResult::c_accept);
57 result.addResult(
"cutThree", SoftwareTriggerCutResult::c_reject);
59 EXPECT_EQ(SoftwareTriggerCutResult::c_accept, result.getResult(
"cutOne"));
60 EXPECT_EQ(SoftwareTriggerCutResult::c_reject, result.getNonPrescaledResult(
"cutOne"));
61 EXPECT_EQ(SoftwareTriggerCutResult::c_noResult, result.getResult(
"cutTwo"));
62 EXPECT_EQ(SoftwareTriggerCutResult::c_accept, result.getNonPrescaledResult(
"cutTwo"));
63 EXPECT_EQ(SoftwareTriggerCutResult::c_reject, result.getResult(
"cutThree"));
64 EXPECT_EQ(SoftwareTriggerCutResult::c_noResult, result.getNonPrescaledResult(
"cutThree"));
TEST(TestgetDetectorRegion, TestgetDetectorRegion)
Test Constructors.
Abstract base class for different kinds of events.