Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LHCb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LHCb
LHCb
Commits
26c33f21
Commit
26c33f21
authored
1 year ago
by
Andre Gunther
Browse files
Options
Downloads
Plain Diff
Merge branch 'sevda-decreports-filter' into 'master'
add a new HltDecReports filter See merge request
!4454
parents
d6b593ad
3c433fec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4454
add a new HltDecReports filter
Pipeline
#7093800
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Hlt/HltDAQ/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Hlt/HltDAQ/CMakeLists.txt
Hlt/HltDAQ/src/component/HltDecReportsFilter.cpp
+58
-0
58 additions, 0 deletions
Hlt/HltDAQ/src/component/HltDecReportsFilter.cpp
with
59 additions
and
0 deletions
Hlt/HltDAQ/CMakeLists.txt
+
1
−
0
View file @
26c33f21
...
...
@@ -37,6 +37,7 @@ gaudi_add_module(HltDAQ
src/component/RoutingBitsWriter.cpp
src/component/RoutingBitsCombiner.cpp
src/component/SelectViewForHltSourceID.cpp
src/component/HltDecReportsFilter.cpp
LINK
AIDA::aida
Boost::headers
...
...
This diff is collapsed.
Click to expand it.
Hlt/HltDAQ/src/component/HltDecReportsFilter.cpp
0 → 100644
+
58
−
0
View file @
26c33f21
/*****************************************************************************\
* (c) Copyright 2024 CERN for the benefit of the LHCb Collaboration *
* *
* This software is distributed under the terms of the GNU General Public *
* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". *
* *
* In applying this licence, CERN does not waive the privileges and immunities *
* granted to it by virtue of its status as an Intergovernmental Organization *
* or submit itself to any jurisdiction. *
\*****************************************************************************/
#include
"Event/HltDecReports.h"
#include
"LHCbAlgs/FilterPredicate.h"
#include
"Gaudi/Accumulators.h"
#include
"GaudiKernel/GaudiException.h"
#include
<algorithm>
#include
<string>
#include
<vector>
#include
<numeric>
/** @class HltDecReportsFilter
*
* Checks content of DecReports for list of requested line
* Filter fails if none of the lines have positive decision
*/
class
HltDecReportsFilter
final
:
public
LHCb
::
Algorithm
::
FilterPredicate
<
bool
(
const
LHCb
::
HltDecReports
&
)
>
{
Gaudi
::
Property
<
std
::
vector
<
std
::
string
>>
m_lines
{
this
,
"Lines"
,
{}};
public
:
/// Standard constructor
HltDecReportsFilter
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
)
:
FilterPredicate
{
name
,
pSvcLocator
,
KeyValue
{
"DecReports"
,
""
}}
{}
bool
operator
()(
const
LHCb
::
HltDecReports
&
decReports
)
const
override
{
auto
any_fired
=
[
&
](
std
::
vector
<
std
::
string
>
const
&
lines
)
{
return
std
::
any_of
(
lines
.
begin
(),
lines
.
end
(),
[
&
](
const
auto
&
line
)
->
bool
{
if
(
auto
i
=
decReports
.
find
(
line
);
i
!=
decReports
.
end
()
)
{
m_cutEff
+=
i
->
second
.
decision
();
return
i
->
second
.
decision
();
}
throw
GaudiException
(
"requested line not present"
,
__PRETTY_FUNCTION__
,
StatusCode
::
FAILURE
);
}
);
};
return
any_fired
(
m_lines
);
}
// Counter for recording cut retention statistics
mutable
Gaudi
::
Accumulators
::
BinomialCounter
<>
m_cutEff
{
this
,
"Cut selection efficiency"
};
};
//=============================================================================
// Declaration of the Algorithm Factory
DECLARE_COMPONENT
(
HltDecReportsFilter
)
//=============================================================================
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment