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
f13dc9cc
Commit
f13dc9cc
authored
1 year ago
by
Rosen Matev
Browse files
Options
Downloads
Patches
Plain Diff
ConfigurableDummy can fail in more ways
parent
05c9008f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!4553
Fix UT Decoder
,
!4539
Synchronize master branch with 2024-patches
,
!4525
Draft: Synchronize master branch with 2024-patches
,
!3883
Error event handling
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Hlt/HLTScheduler/src/ConfigurableDummy.cpp
+12
-3
12 additions, 3 deletions
Hlt/HLTScheduler/src/ConfigurableDummy.cpp
with
12 additions
and
3 deletions
Hlt/HLTScheduler/src/ConfigurableDummy.cpp
+
12
−
3
View file @
f13dc9cc
...
...
@@ -27,8 +27,10 @@ public:
StatusCode
initialize
()
override
;
private:
Gaudi
::
Property
<
int
>
m_CFD
{
this
,
"CFD"
,
1
,
"ControlFlowDecision is true every Nth events"
};
Gaudi
::
Property
<
int
>
m_CFD
{
this
,
"CFD"
,
1
,
"ControlFlowDecision is true every Nth events"
};
Gaudi
::
Property
<
std
::
vector
<
bool
>>
m_CFDs
{
this
,
"CFDs"
,
{},
"Vector of decisions, overrides CFD"
};
Gaudi
::
Property
<
bool
>
m_decisionWarning
{
this
,
"DecisionWarning"
,
false
,
"Emit a warning for false decisions"
};
Gaudi
::
Property
<
bool
>
m_decisionException
{
this
,
"DecisionException"
,
false
,
"Throw an exception for false decisions"
};
Gaudi
::
Property
<
int
>
m_signal
{
this
,
"Signal"
,
0
,
"Raise signal"
};
Gaudi
::
Property
<
std
::
vector
<
std
::
string
>>
m_inpKeys
{
this
,
"inpKeys"
,
{},
""
};
...
...
@@ -95,9 +97,16 @@ StatusCode ConfigurableDummy::execute( EventContext const& context ) const // th
outputHandle
->
put
(
std
::
make_unique
<
DataObject
>
()
);
}
bool
decision
=
m_CFD
>
0
&&
context
.
evt
()
%
m_CFD
==
0
;
bool
decision
=
false
;
if
(
!
m_CFDs
.
empty
()
)
{
decision
=
m_CFDs
[
context
.
evt
()
%
m_CFDs
.
size
()];
}
else
{
decision
=
m_CFD
>
0
&&
context
.
evt
()
%
m_CFD
==
0
;
}
if
(
m_decisionWarning
&&
!
decision
)
{
warning
()
<<
"Event did not pass"
<<
endmsg
;
}
if
(
m_decisionException
&&
!
decision
)
{
throw
GaudiException
(
"Event did not pass"
,
__PRETTY_FUNCTION__
,
StatusCode
::
FAILURE
);
}
if
(
m_signal
>
0
)
{
std
::
raise
(
m_signal
);
}
return
decision
?
Gaudi
::
Functional
::
FilterDecision
::
PASSED
:
Gaudi
::
Functional
::
FilterDecision
::
FAILED
;
...
...
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