Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fat event filter fix #437

Conversation

jimbrooke
Copy link
Member

This is a fix for fat event filters (L1T and HLT) to keep l1t-integration in sync with CMSSW PRs cms-sw#16765 and cms-sw#16766.

@jimbrooke jimbrooke mentioned this pull request Nov 25, 2016
if (useTCDS_ && period_!=0) {
evf::evtn::TCDSRecord record((unsigned char *)data.data());
accept = ( (record.getHeader().getData().header.triggerCount % period_) == 0 );
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi Jim, could you move around the code to be something like

if (period_!=0) {
    if (useTCDS_) {
        evf::evtn::TCDSRecord record((unsigned char *) data.data());
        accept = ( (record.getHeader().getData().header.triggerCount % period_) == 0 );
    } else {
        accept = ( ( (header.lvl1ID())%period_ ) == 0 );
   }
}

?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, one could move the if (period_!=0) even before the access to the event, though it is quite unlikely for this filter to be used that way.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be cleaner to get a counter from either TCDS or the lvl1ID, depending on the configuration, and then write the (counter % period_) == 0 logic only once.

@rekovic
Copy link

rekovic commented Feb 7, 2017

Further developed versions of this PR are merged in 90x (cms-sw#17082) and back-ported to 80x (cms-sw#16806).

@rekovic rekovic closed this Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants