Skip to content
Snippets Groups Projects
Commit 5f315fa6 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Fix ODIN 7 to ODIN 6 compatibility test

parent b04204d4
No related branches found
No related tags found
2 merge requests!3702merge counter decoder into Louis' original branch,!3088New ODIN implementation
......@@ -52,6 +52,9 @@ BOOST_AUTO_TEST_CASE( version_7_stability ) {
BOOST_AUTO_TEST_CASE( version_6_stability ) {
// ODIN -> raw 6 -> ODIN -> raw 6
LHCb::ODIN odin{random_bits};
// We can convert to version 6 only if trigger and calibration types fit
odin.setTriggerType( odin.triggerType() & 0x7 ); // make sure the trigger type fits 3 bits
odin.setCalibrationType( odin.calibrationType() & 0x3 ); // make sure the calibration type fits 2 bits
std::array<std::uint32_t, 10> raw6_1{0};
odin.to_version<6>( raw6_1 );
......@@ -65,6 +68,9 @@ BOOST_AUTO_TEST_CASE( version_6_stability ) {
BOOST_AUTO_TEST_CASE( zero_unused_bits_in_v6 ) {
// zeroing unused bits in conversion
LHCb::ODIN odin{random_bits};
// We can convert to version 6 only if trigger and calibration types fit
odin.setTriggerType( odin.triggerType() & 0x7 ); // make sure the trigger type fits 3 bits
odin.setCalibrationType( odin.calibrationType() & 0x3 ); // make sure the calibration type fits 2 bits
std::array<std::uint32_t, 10> raw6_1{0};
odin.to_version<6>( raw6_1 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment