9 #include <hlt/softwaretrigger/core/SoftwareTriggerCut.h>
10 #include <gtest/gtest.h>
19 namespace SoftwareTrigger {
22 TEST(SoftwareTriggerVarialeManagerTest, pickVariables)
24 SoftwareTriggerObject softwareTriggerObject;
25 softwareTriggerObject[
"one_variable"] = 1.1;
28 const auto compiledFirstCut = SoftwareTriggerCut::compile(
"one_variable == 1.1", 1);
29 EXPECT_EQ(SoftwareTriggerCutResult::c_accept, compiledFirstCut->checkPreScaled(softwareTriggerObject));
32 EXPECT_THROW(SoftwareTriggerCut::compile(
"two_variable == 1.1", 1)->checkPreScaled(softwareTriggerObject),
35 softwareTriggerObject[
"two_variable"] = 2.2;
38 const auto compiledSecondCut = SoftwareTriggerCut::compile(
"two_variable == 2.2", 1);
39 EXPECT_EQ(SoftwareTriggerCutResult::c_accept, compiledSecondCut->checkPreScaled(softwareTriggerObject));
42 softwareTriggerObject[
"two_variable"] = 2.3;
43 EXPECT_EQ(SoftwareTriggerCutResult::c_noResult, compiledSecondCut->checkPreScaled(softwareTriggerObject));
TEST(TestgetDetectorRegion, TestgetDetectorRegion)
Test Constructors.
Abstract base class for different kinds of events.