119 for (
int steering: {steering1, steering2}) {
120 Flow flow(steering, {
"flow2.root"});
122 BOOST_TEST_MESSAGE(
"Trying to get a branch before the input has been set up" );
123 BOOST_REQUIRE_THROW( flow.GetBranchReadWrite<
DP::RecEvent>(
"recEvent"), wrapexcept<invalid_argument> );
124 auto tIn = flow.GetInputTree();
127 BOOST_TEST_MESSAGE(
"Trying to get a branch before the output has been set up" );
128 BOOST_REQUIRE_THROW( flow.GetBranchReadWrite<
DP::RecEvent>(
"recEvent"), wrapexcept<invalid_argument> );
130 BOOST_TEST_MESSAGE(
"Testing default name in case of friends" );
131 tIn->GetTree()->SetTitle(
"");
132 auto t1 = flow.GetOutputTree();
134 BOOST_TEST_MESSAGE(
"Trying to read an existant branch with the correct type" );
135 BOOST_REQUIRE_NO_THROW( flow.GetBranchReadWrite<
DP::RecEvent>(
"recEvent") );
137 BOOST_TEST_MESSAGE(
"Trying to read an inexistant branch" );
138 BOOST_REQUIRE_THROW( flow.GetBranchReadWrite<
DP::RecEvent>(
"recEvent2"), wrapexcept<DE::BadInput> );
141 BOOST_TEST_MESSAGE(
"Trying to write to an existing branch assuming a wrong type" );
142 BOOST_REQUIRE_THROW( flow.GetBranchReadWrite<
DP::GenEvent>(
"recEvent"), wrapexcept<bad_any_cast> );
144 BOOST_TEST_MESSAGE(
"Trying to write to a branch with a missing dictionary." );
145 BOOST_REQUIRE_THROW( flow.GetBranchReadWrite<
EventBoom>(
"recEventBOOM"), wrapexcept<DE::BadInput> );
147 BOOST_TEST_MESSAGE(
"Trying to write twice to the same branch." );
150 BOOST_REQUIRE_NO_THROW( ev = flow.GetBranchReadWrite<
DP::RecEvent>(
"recEvent") );
151 BOOST_REQUIRE_NO_THROW( ev2 = flow.GetBranchReadWrite<
DP::RecEvent>(
"recEvent") );