8 #include <framework/io/RootIOUtilities.h>
9 #include <framework/utilities/TestHelpers.h>
11 #include <gtest/gtest.h>
17 TEST(IOTest, filterBranches)
19 const set<string> input = {
"A",
"B",
"C",
"AToB",
"BToC",
"CToA"};
21 EXPECT_EQ(input, RootIOUtilities::filterBranches(input, {}, {}, 0));
23 EXPECT_EQ(set<string>({
"A",
"C",
"CToA"}), RootIOUtilities::filterBranches(input, {
"A",
"C"}, {}, 0));
24 EXPECT_EQ(set<string>({
"B"}), RootIOUtilities::filterBranches(input, {
"B"}, {}, 0));
27 EXPECT_EQ(set<string>({
"A",
"C"}), RootIOUtilities::filterBranches(input, {
"A",
"C"}, {
"CToA"}, 0));
29 EXPECT_EQ(set<string>({
"A",
"C"}), RootIOUtilities::filterBranches(input, {}, {
"B",
"CToA"}, 0));
30 EXPECT_EQ(set<string>({
"A",
"C",
"CToA"}), RootIOUtilities::filterBranches(input, {}, {
"B"}, 0));
32 EXPECT_EQ(set<string>({
"AToB"}), RootIOUtilities::filterBranches(input, {
"AToB",
"B"}, {
"B"}, 0));
33 EXPECT_EQ(set<string>(), RootIOUtilities::filterBranches(input, {
"B"}, {
"B"}, 0));
36 TEST(IOTest, filterBranchesWarnings)
38 const set<string> input = {
"A",
"B",
"C"};
39 EXPECT_B2WARNING(RootIOUtilities::filterBranches(input, {
"A",
"A"}, {}, 0));
40 EXPECT_B2WARNING(RootIOUtilities::filterBranches(input, {}, {
"A",
"B",
"A"}, 1));
TEST(TestgetDetectorRegion, TestgetDetectorRegion)
Test Constructors.
Abstract base class for different kinds of events.