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
a279fa8b
Commit
a279fa8b
authored
1 year ago
by
Felix Weiglhofer
Committed by
Volker Friese
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
algo::Unpack: Add option to mask detectors.
parent
efab3620
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1201
cbmreco: Integrate algo::Unpack
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
algo/unpack/Unpack.cxx
+13
-2
13 additions, 2 deletions
algo/unpack/Unpack.cxx
algo/unpack/Unpack.h
+14
-3
14 additions, 3 deletions
algo/unpack/Unpack.h
algo/unpack/UnpackChain.cxx
+19
-2
19 additions, 2 deletions
algo/unpack/UnpackChain.cxx
with
46 additions
and
7 deletions
algo/unpack/Unpack.cxx
+
13
−
2
View file @
a279fa8b
...
@@ -28,6 +28,8 @@ namespace cbm::algo
...
@@ -28,6 +28,8 @@ namespace cbm::algo
// System ID of current component
// System ID of current component
const
auto
systemId
=
static_cast
<
fles
::
SubsystemIdentifier
>
(
timeslice
->
descriptor
(
comp
,
0
).
sys_id
);
const
auto
systemId
=
static_cast
<
fles
::
SubsystemIdentifier
>
(
timeslice
->
descriptor
(
comp
,
0
).
sys_id
);
if
(
!
DetectorEnabled
(
systemId
))
continue
;
// Equipment ID of current component
// Equipment ID of current component
const
uint16_t
equipmentId
=
timeslice
->
descriptor
(
comp
,
0
).
eq_id
;
const
uint16_t
equipmentId
=
timeslice
->
descriptor
(
comp
,
0
).
eq_id
;
...
@@ -128,8 +130,18 @@ namespace cbm::algo
...
@@ -128,8 +130,18 @@ namespace cbm::algo
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// ----- Initialisation ---------------------------------------------------
// ----- Initialisation ---------------------------------------------------
bool
Unpack
::
Init
()
bool
Unpack
::
Init
(
std
::
optional
<
std
::
vector
<
fles
::
SubsystemIdentifier
>>
subIds
)
{
{
if
(
!
subIds
)
{
fSubIds
=
{
fles
::
SubsystemIdentifier
::
STS
,
fles
::
SubsystemIdentifier
::
MUCH
,
fles
::
SubsystemIdentifier
::
RPC
,
fles
::
SubsystemIdentifier
::
T0
,
fles
::
SubsystemIdentifier
::
TRD
,
fles
::
SubsystemIdentifier
::
TRD2D
,
};
}
else
{
fSubIds
=
*
subIds
;
}
// --- Common parameters for all components for STS
// --- Common parameters for all components for STS
uint32_t
numChansPerAsicSts
=
128
;
// R/O channels per ASIC for STS
uint32_t
numChansPerAsicSts
=
128
;
// R/O channels per ASIC for STS
uint32_t
numAsicsPerModuleSts
=
16
;
// Number of ASICs per module for STS
uint32_t
numAsicsPerModuleSts
=
16
;
// Number of ASICs per module for STS
...
@@ -285,5 +297,4 @@ namespace cbm::algo
...
@@ -285,5 +297,4 @@ namespace cbm::algo
}
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
}
/* namespace cbm::algo */
}
/* namespace cbm::algo */
This diff is collapsed.
Click to expand it.
algo/unpack/Unpack.h
+
14
−
3
View file @
a279fa8b
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include
"trd2d/Trd2dReadoutConfig.h"
#include
"trd2d/Trd2dReadoutConfig.h"
#include
"trd2d/UnpackTrd2d.h"
#include
"trd2d/UnpackTrd2d.h"
#include
<optional>
#include
<sstream>
#include
<sstream>
#include
<vector>
#include
<vector>
...
@@ -100,8 +101,16 @@ namespace cbm::algo
...
@@ -100,8 +101,16 @@ namespace cbm::algo
/** @brief Parameters for RICH unpackers **/
/** @brief Parameters for RICH unpackers **/
RichReadoutConfig
fRichConfig
{};
RichReadoutConfig
fRichConfig
{};
/** @brief Initialize unpackers and fill parameters from config objects **/
/** @brief Initialize unpackers and fill parameters from config objects
bool
Init
();
* @param subIds: vector of subsystem identifiers to unpack, default: all
* @see Init()
**/
bool
Init
(
std
::
optional
<
std
::
vector
<
fles
::
SubsystemIdentifier
>>
subIds
=
{});
bool
DetectorEnabled
(
fles
::
SubsystemIdentifier
subId
)
{
return
std
::
find
(
fSubIds
.
begin
(),
fSubIds
.
end
(),
subId
)
!=
fSubIds
.
end
();
}
private
:
// methods
private
:
// methods
/** @brief Microslice loop **/
/** @brief Microslice loop **/
...
@@ -111,7 +120,9 @@ namespace cbm::algo
...
@@ -111,7 +120,9 @@ namespace cbm::algo
std
::
vector
<
MonitorData
>*
monitorMs
,
uint8_t
sys_ver
);
std
::
vector
<
MonitorData
>*
monitorMs
,
uint8_t
sys_ver
);
private
:
// members
private
:
// members
std
::
vector
<
fles
::
SubsystemIdentifier
>
fSubIds
=
{};
///< Detector identifiers to unpack
/** @brief STS unpackers **/
/** @brief STS unpackers **/
std
::
map
<
uint16_t
,
UnpackSts
>
fAlgoSts
=
{};
std
::
map
<
uint16_t
,
UnpackSts
>
fAlgoSts
=
{};
...
...
This diff is collapsed.
Click to expand it.
algo/unpack/UnpackChain.cxx
+
19
−
2
View file @
a279fa8b
...
@@ -7,8 +7,25 @@ using namespace cbm::algo;
...
@@ -7,8 +7,25 @@ using namespace cbm::algo;
void
UnpackChain
::
Init
()
void
UnpackChain
::
Init
()
{
{
bool
ok
=
fUnpack
.
Init
();
bool
ok
=
fUnpack
.
Init
(
std
::
vector
<
fles
::
SubsystemIdentifier
>
{
fles
::
SubsystemIdentifier
::
STS
,
// fles::SubsystemIdentifier::MUCH,
fles
::
SubsystemIdentifier
::
RPC
,
fles
::
SubsystemIdentifier
::
T0
,
// fles::SubsystemIdentifier::TRD,
// fles::SubsystemIdentifier::TRD2D,
});
if
(
!
ok
)
throw
std
::
runtime_error
(
"Unpack::Init failed"
);
if
(
!
ok
)
throw
std
::
runtime_error
(
"Unpack::Init failed"
);
}
}
Unpack
::
resultType
UnpackChain
::
Run
(
const
fles
::
Timeslice
&
timeslice
)
{
return
fUnpack
(
&
timeslice
);
}
Unpack
::
resultType
UnpackChain
::
Run
(
const
fles
::
Timeslice
&
timeslice
)
{
auto
result
=
fUnpack
(
&
timeslice
);
auto
&
digis
=
result
.
first
.
fData
;
L_
(
info
)
<<
"Timeslice contains "
<<
digis
.
fSts
.
Size
()
<<
" STS Digis"
;
L_
(
info
)
<<
"Timeslice contains "
<<
digis
.
fTof
.
Size
()
<<
" TOF Digis"
;
L_
(
info
)
<<
"Timeslice contains "
<<
digis
.
fT0
.
Size
()
<<
" RPC Digis"
;
return
result
;
}
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