31 BOOST_REQUIRE_NO_THROW( pt::read_info(DARWIN
"/test/example.info",
config) );
33 auto events = make_shared<TTree>(
"events",
"events");
35 BOOST_REQUIRE_THROW(
MetaInfo(events,
config.get_child(
"corrections")), boost::wrapexcept<pt::ptree_error> );
38 BOOST_TEST( metainfo1.Get<
bool>(
"flags",
"isMC") ==
true );
39 BOOST_TEST_WARN( metainfo1.Get<
bool>(
"git",
"reproducible") ==
true );
40 events->GetUserInfo()->ls();
41 BOOST_REQUIRE_THROW(
MetaInfo(events,
config), boost::wrapexcept<std::invalid_argument> );
43 config.put<
bool>(
"flags.isMC",
false);
44 config.put<
bool>(
"flags.label",
"aNewLabel");
46 BOOST_REQUIRE_THROW( metainfo2.Check(
config), boost::wrapexcept<std::invalid_argument> );
48 BOOST_TEST( HashM(metainfo1) == HashM(metainfo2) );
50 auto events2 = make_shared<TTree>(
"events2",
"events");
52 BOOST_TEST( HashM(metainfo1) != HashM(metainfo3) );
54 BOOST_TEST( HashT(events.get()) != HashT(events2.get()));