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
7567d032
Commit
7567d032
authored
8 years ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Patches
Plain Diff
added an assert for safety
parent
4ba5548e
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/FeedingFanOut.h
+4
-2
4 additions, 2 deletions
include/FeedingFanOut.h
with
4 additions
and
2 deletions
include/FeedingFanOut.h
+
4
−
2
View file @
7567d032
...
...
@@ -20,13 +20,15 @@ namespace ChimeraTK {
public:
/** Add a slave to the FanOut. Only sending end-points of a consuming node may be added. */
/** Add a slave to the FanOut. Only sending end-points of a consuming node may be added. The first slave added
* must not be a trigger receiver, since it defines the shape of the data buffer. */
void
addSlave
(
boost
::
shared_ptr
<
mtca4u
::
NDRegisterAccessor
<
UserType
>>
slave
)
{
if
(
!
slave
->
isWriteable
())
{
throw
ApplicationExceptionWithID
<
ApplicationExceptionID
::
illegalParameter
>
(
"FeedingFanOut::addSlave() has been called with a receiving implementation!"
);
}
if
(
slaves
.
size
()
==
0
)
{
// first slave: initialise buffers @todo TODO FIXME first slave could be a trigger receiver!
if
(
slaves
.
size
()
==
0
)
{
// first slave: initialise buffers
assert
(
slave
->
getNumberOfChannels
()
!=
0
&&
slave
->
getNumberOfSamples
()
!=
0
);
mtca4u
::
NDRegisterAccessor
<
UserType
>::
buffer_2D
.
resize
(
slave
->
getNumberOfChannels
()
);
for
(
size_t
i
=
0
;
i
<
slave
->
getNumberOfChannels
();
i
++
)
{
mtca4u
::
NDRegisterAccessor
<
UserType
>::
buffer_2D
[
i
].
resize
(
slave
->
getNumberOfSamples
()
);
...
...
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