Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ApplicationCore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
ChimeraTK Mirror
ApplicationCore
Commits
01f4306a
Commit
01f4306a
authored
4 years ago
by
Martin Killenberg
Browse files
Options
Downloads
Patches
Plain Diff
wip: TriggerFanOut is now propagating the data validity correctly
parent
e1376034
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/TriggerFanOut.h
+6
-4
6 additions, 4 deletions
include/TriggerFanOut.h
with
6 additions
and
4 deletions
include/TriggerFanOut.h
+
6
−
4
View file @
01f4306a
...
...
@@ -109,8 +109,8 @@ namespace ChimeraTK {
/** Functor class to send data to the consumers, suitable for
* boost::fusion::for_each(). */
struct
SendDataToConsumers
{
SendDataToConsumers
(
VersionNumber
version
,
DataValidity
v
alidity
=
DataValidity
::
ok
)
:
_version
(
version
),
_
validity
(
v
alidity
)
{}
SendDataToConsumers
(
VersionNumber
version
,
DataValidity
triggerV
alidity
=
DataValidity
::
ok
)
:
_version
(
version
),
_
triggerValidity
(
triggerV
alidity
)
{}
template
<
typename
PAIR
>
void
operator
()(
PAIR
&
pair
)
const
{
...
...
@@ -121,7 +121,9 @@ namespace ChimeraTK {
for
(
auto
&
network
:
theMap
)
{
auto
feeder
=
network
.
first
;
auto
fanOut
=
network
.
second
;
fanOut
->
setDataValidity
(
_validity
);
fanOut
->
setDataValidity
((
_triggerValidity
==
DataValidity
::
ok
&&
feeder
->
dataValidity
()
==
DataValidity
::
ok
)
?
DataValidity
::
ok
:
DataValidity
::
faulty
);
fanOut
->
accessChannel
(
0
).
swap
(
feeder
->
accessChannel
(
0
));
// don't use write destructively. In case of an exception we still need the data for the next read (see Exception Handling spec B.2.2.6)
bool
dataLoss
=
fanOut
->
write
(
_version
);
...
...
@@ -132,7 +134,7 @@ namespace ChimeraTK {
}
VersionNumber
_version
;
DataValidity
_
v
alidity
;
DataValidity
_
triggerV
alidity
;
};
/** TransferElement acting as our trigger */
...
...
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