Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
scdaq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
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
scouting-demonstrator
scdaq
Commits
a76ac38a
Commit
a76ac38a
authored
6 years ago
by
Petr Zejdl
Browse files
Options
Downloads
Patches
Plain Diff
During DMA error recovery memory unmap and map added. Seems to be better.
parent
10721ec9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!59
CMSSW json file
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/processor.cc
+5
-3
5 additions, 3 deletions
src/processor.cc
src/processor.h
+7
-0
7 additions, 0 deletions
src/processor.h
src/wzdma_input.cc
+6
-0
6 additions, 0 deletions
src/wzdma_input.cc
with
18 additions
and
3 deletions
src/processor.cc
+
5
−
3
View file @
a76ac38a
...
...
@@ -6,14 +6,16 @@
StreamProcessor
::
StreamProcessor
(
size_t
max_size_
)
:
max_size
(
max_size_
),
tbb
::
filter
(
parallel
)
tbb
::
filter
(
parallel
),
nbPackets
(
0
)
{
fprintf
(
stderr
,
"Created transform filter at 0x%llx
\n
"
,(
unsigned
long
long
)
this
);}
StreamProcessor
::~
StreamProcessor
(){
// fprintf(stderr,"Wrote %d muons \n",totcount);
}
Slice
*
process
(
Slice
&
input
,
Slice
&
out
)
Slice
*
StreamProcessor
::
process
(
Slice
&
input
,
Slice
&
out
)
{
nbPackets
++
;
int
bsize
=
sizeof
(
block1
);
if
((
input
.
size
()
-
constants
::
orbit_trailer_size
)
%
bsize
!=
0
){
std
::
cout
<<
"WARNING::frame size not a multiple of block size. Will be skipped. Size="
...
...
@@ -61,7 +63,7 @@ Slice* process(Slice& input, Slice& out)
uint32_t
bxcount
=
std
::
max
(
mAcount
,
mBcount
);
if
(
bxcount
==
0
)
{
p
+=
bsize
;
std
::
cout
<<
"
WARNING::detected a bx with zero muons, this should not happen"
<<
std
::
endl
;
std
::
cout
<<
'#'
<<
nbPackets
<<
":
WARNING::detected a bx with zero muons, this should not happen
. Packet is skipped.
"
<<
std
::
endl
;
continue
;
}
...
...
This diff is collapsed.
Click to expand it.
src/processor.h
+
7
−
0
View file @
a76ac38a
...
...
@@ -5,13 +5,20 @@
//reformatter
class
Slice
;
class
StreamProcessor
:
public
tbb
::
filter
{
public:
StreamProcessor
(
size_t
);
void
*
operator
()(
void
*
item
)
/*override*/
;
~
StreamProcessor
();
private:
Slice
*
process
(
Slice
&
input
,
Slice
&
out
);
private:
size_t
max_size
;
uint64_t
nbPackets
;
};
#endif
This diff is collapsed.
Click to expand it.
src/wzdma_input.cc
+
6
−
0
View file @
a76ac38a
...
...
@@ -91,6 +91,12 @@ inline ssize_t WZDmaInputFilter::read_packet(char **buffer)
if
(
errno
==
EIO
)
{
std
::
cerr
<<
"#"
<<
ncalls
<<
": Trying to restart DMA (attempt #"
<<
tries
<<
"): "
;
wz_stop_dma
(
&
dma
);
wz_close
(
&
dma
);
// Initialize the DMA subsystem
if
(
wz_init
(
&
dma
)
<
0
)
{
throw
std
::
system_error
(
errno
,
std
::
system_category
(),
"Cannot initialize WZ DMA device"
);
}
if
(
wz_start_dma
(
&
dma
)
<
0
)
{
throw
std
::
system_error
(
errno
,
std
::
system_category
(),
"Cannot start WZ DMA device"
);
...
...
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