bug in FTRawBankDecoder?

The following discussion from !3811 (merged) should be addressed:

  • @graven started a discussion:

    on L722 there is:

                  if ( std::binary_search( m_ChannelsToSkip[globalQuarterIdx].begin(),
                                           m_ChannelsToSkip[globalQuarterIdx].end(), pseudoChannelIdx ) ) {

    which implies that m_ChannelsToSkip[globalQuarterIdx] must be ordered -- but there is no guarantee that this is the case, as that depends on how ChannelsToSkip was configured in python. There should at least be a callback here which verifies the ordering:

      Gaudi::Property<std::array<std::vector<double>, 48>> m_ChannelsToSkip{
          this, "ChannelsToSkip", {{}}, "a list of PseudoChannels in Quarters to skip",     
          [this]( auto& ) {
            if (!std::all_of( m_ChannelsToSkip.begin(), m_ChannelsToSkip.end(),
                              [](const auto& inner) { 
                                 return std::is_sorted(inner.begin(), inner.end());
                              } ) {
              throw GaudiException("ChannelsToSkip is not sorted",__PRETTY_FUNCTION__, StatusCode::FAILURE);
            }
          }
      };

    Also, I'm confused as the binary_search is looking for a pseudoChannelIdx which is not a double , but an int -- while the 'payload' of m_ChannelsToSkip is double. So the binary_search is looking for an int value amongst in a range of doubles?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information