Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Computing
cbmroot
Commits
d9b8b7c4
Commit
d9b8b7c4
authored
1 year ago
by
Felix Weiglhofer
Committed by
Dominik Smith
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
algo::Unpack: Generalize ParallelMsLoop function.
parent
4f3999d3
No related branches found
No related tags found
1 merge request
!1219
algo: Unpack TOF and STS in parallel.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
algo/unpack/Unpack.cxx
+10
-8
10 additions, 8 deletions
algo/unpack/Unpack.cxx
algo/unpack/Unpack.h
+7
-5
7 additions, 5 deletions
algo/unpack/Unpack.h
with
17 additions
and
13 deletions
algo/unpack/Unpack.cxx
+
10
−
8
View file @
d9b8b7c4
...
@@ -30,7 +30,7 @@ namespace cbm::algo
...
@@ -30,7 +30,7 @@ namespace cbm::algo
if
(
DetectorEnabled
(
fles
::
SubsystemIdentifier
::
STS
))
{
if
(
DetectorEnabled
(
fles
::
SubsystemIdentifier
::
STS
))
{
xpu
::
scoped_timer
t1
(
"STS"
);
xpu
::
scoped_timer
t1
(
"STS"
);
ParallelMsLoop
(
digiTs
.
fData
.
fSts
.
fDigis
,
monitor
.
fSts
,
*
timeslice
,
0x20
);
ParallelMsLoop
(
fParallelStsSetup
,
digiTs
.
fData
.
fSts
.
fDigis
,
monitor
.
fSts
,
*
timeslice
,
fAlgoSts
,
0x20
);
}
}
// --- Component loop
// --- Component loop
...
@@ -342,14 +342,16 @@ namespace cbm::algo
...
@@ -342,14 +342,16 @@ namespace cbm::algo
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
void
Unpack
::
ParallelMsLoop
(
std
::
vector
<
CbmStsDigi
>&
digisOut
,
std
::
vector
<
UnpackStsMonitorData
>&
monitorOut
,
template
<
class
Digi
,
class
UnpackAlgo
,
class
Monitor
>
const
fles
::
Timeslice
&
ts
,
u8
sys_ver
)
void
Unpack
::
ParallelMsLoop
(
ParallelSetup
<
Digi
,
Monitor
>&
setup
,
std
::
vector
<
Digi
>&
digisOut
,
std
::
vector
<
Monitor
>&
monitorOut
,
const
fles
::
Timeslice
&
ts
,
const
std
::
map
<
u16
,
UnpackAlgo
>&
algos
,
u8
sys_ver
)
{
{
const
auto
&
msContent
=
fParallelStsS
etup
.
msContent
;
const
auto
&
msContent
=
s
etup
.
msContent
;
const
auto
&
msDesc
=
fParallelStsS
etup
.
msDescriptors
;
const
auto
&
msDesc
=
s
etup
.
msDescriptors
;
const
auto
&
msEqIds
=
fParallelStsS
etup
.
msEquipmentIds
;
const
auto
&
msEqIds
=
s
etup
.
msEquipmentIds
;
auto
&
monitor
=
fParallelStsS
etup
.
msMonitorData
;
auto
&
monitor
=
s
etup
.
msMonitorData
;
auto
&
msDigis
=
fParallelStsS
etup
.
msDigis
;
auto
&
msDigis
=
s
etup
.
msDigis
;
size_t
numMs
=
msDigis
.
size
();
size_t
numMs
=
msDigis
.
size
();
xpu
::
push_timer
(
"Unpack"
);
xpu
::
push_timer
(
"Unpack"
);
...
...
This diff is collapsed.
Click to expand it.
algo/unpack/Unpack.h
+
7
−
5
View file @
d9b8b7c4
...
@@ -131,12 +131,13 @@ namespace cbm::algo
...
@@ -131,12 +131,13 @@ namespace cbm::algo
}
}
private
:
// types
private
:
// types
template
<
class
Digi
,
class
Monitor
>
struct
ParallelSetup
{
struct
ParallelSetup
{
std
::
vector
<
u16
>
msEquipmentIds
;
std
::
vector
<
u16
>
msEquipmentIds
;
std
::
vector
<
fles
::
MicrosliceDescriptor
>
msDescriptors
;
std
::
vector
<
fles
::
MicrosliceDescriptor
>
msDescriptors
;
std
::
vector
<
const
u8
*>
msContent
;
std
::
vector
<
const
u8
*>
msContent
;
std
::
vector
<
std
::
vector
<
sts
::
Digi
>>
msDigis
;
std
::
vector
<
std
::
vector
<
Digi
>>
msDigis
;
std
::
vector
<
UnpackSts
Monitor
Data
>
msMonitorData
;
std
::
vector
<
Monitor
>
msMonitorData
;
};
};
private
:
// methods
private
:
// methods
...
@@ -150,8 +151,9 @@ namespace cbm::algo
...
@@ -150,8 +151,9 @@ namespace cbm::algo
void
ParallelInit
(
const
fles
::
Timeslice
&
timeslice
);
void
ParallelInit
(
const
fles
::
Timeslice
&
timeslice
);
/** @brief Parallel microslice loop **/
/** @brief Parallel microslice loop **/
void
ParallelMsLoop
(
std
::
vector
<
CbmStsDigi
>&
digisOut
,
std
::
vector
<
UnpackStsMonitorData
>&
monitor
,
template
<
class
Digi
,
class
UnpackAlgo
,
class
Monitor
>
const
fles
::
Timeslice
&
ts
,
u8
sys_ver
);
void
ParallelMsLoop
(
ParallelSetup
<
Digi
,
Monitor
>&
setup
,
std
::
vector
<
Digi
>&
digisOut
,
std
::
vector
<
Monitor
>&
monitor
,
const
fles
::
Timeslice
&
ts
,
const
std
::
map
<
u16
,
UnpackAlgo
>&
algos
,
u8
sys_ver
);
private
:
// members
private
:
// members
...
@@ -186,7 +188,7 @@ namespace cbm::algo
...
@@ -186,7 +188,7 @@ namespace cbm::algo
{
fles
::
SubsystemIdentifier
::
T0
,
0
},
{
fles
::
SubsystemIdentifier
::
TRD
,
1300
},
{
fles
::
SubsystemIdentifier
::
T0
,
0
},
{
fles
::
SubsystemIdentifier
::
TRD
,
1300
},
{
fles
::
SubsystemIdentifier
::
TRD2D
,
-
510
}};
{
fles
::
SubsystemIdentifier
::
TRD2D
,
-
510
}};
/** @brief Parallel STS Setup */
/** @brief Parallel STS Setup */
ParallelSetup
fParallelStsSetup
=
{};
ParallelSetup
<
sts
::
Digi
,
UnpackStsMonitorData
>
fParallelStsSetup
=
{};
};
};
}
// namespace cbm::algo
}
// namespace cbm::algo
...
...
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