Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
3a31aa56
Commit
3a31aa56
authored
2 years ago
by
Markus Frank
Committed by
MarkusFrankATcernch
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix Digi framework example
parent
e7b0b4ff
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
DDDigi/plugins/DigiSegmentDepositPrint.cpp
+1
-2
1 addition, 2 deletions
DDDigi/plugins/DigiSegmentDepositPrint.cpp
DDDigi/python/dddigi.py
+8
-6
8 additions, 6 deletions
DDDigi/python/dddigi.py
examples/DDDigi/scripts/TestFramework.py
+2
-2
2 additions, 2 deletions
examples/DDDigi/scripts/TestFramework.py
with
11 additions
and
10 deletions
DDDigi/plugins/DigiSegmentDepositPrint.cpp
+
1
−
2
View file @
3a31aa56
...
@@ -54,8 +54,7 @@ namespace dd4hep {
...
@@ -54,8 +54,7 @@ namespace dd4hep {
else
if
(
const
auto
*
v
=
work
.
get_input
<
DepositVector
>
()
)
else
if
(
const
auto
*
v
=
work
.
get_input
<
DepositVector
>
()
)
std
::
for_each
(
v
->
begin
(),
v
->
end
(),
call
);
std
::
for_each
(
v
->
begin
(),
v
->
end
(),
call
);
else
else
error
(
"+++ Request to dump an invalid container %s"
,
error
(
"+++ Request to dump an invalid container %s"
,
Key
::
key_name
(
work
.
input
.
key
.
item
()).
c_str
());
Key
::
key_name
(
work
.
input
.
key
.
item
()));
}
}
};
};
}
// End namespace digi
}
// End namespace digi
...
...
This diff is collapsed.
Click to expand it.
DDDigi/python/dddigi.py
+
8
−
6
View file @
3a31aa56
...
@@ -229,16 +229,18 @@ def _get_container_action(self):
...
@@ -229,16 +229,18 @@ def _get_container_action(self):
def
TestAction
(
kernel
,
nam
,
sleep
=
0
):
def
TestAction
(
kernel
,
nam
,
sleep
=
0
):
obj
=
Interface
.
create
Event
Action
(
kernel
,
str
(
'
DigiTestAction/
'
+
nam
))
obj
=
Interface
.
createAction
(
kernel
,
str
(
'
DigiTestAction/
'
+
nam
))
if
sleep
!=
0
:
if
sleep
!=
0
:
obj
.
sleep
=
sleep
obj
.
sleep
=
sleep
return
obj
return
obj
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
def
Action
(
kernel
,
nam
):
def
Action
(
kernel
,
nam
,
**
options
):
obj
=
Interface
.
createAction
(
kernel
,
str
(
nam
))
action
=
Interface
.
createAction
(
kernel
,
str
(
nam
))
return
obj
for
option
in
options
.
items
():
setattr
(
action
,
option
[
0
],
option
[
1
])
return
action
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
...
@@ -335,8 +337,8 @@ def _props2(obj, **extensions):
...
@@ -335,8 +337,8 @@ def _props2(obj, **extensions):
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
_setup
(
'
DigiSynchronize
'
,
py_call
=
_adopt_event_action
)
_setup
(
'
DigiSynchronize
'
,
call
=
'
adopt
'
,
py_call
=
_adopt_event_action
)
_setup
(
'
DigiActionSequence
'
,
py_call
=
_adopt_event_action
)
_setup
(
'
DigiActionSequence
'
,
call
=
'
adopt
'
,
py_call
=
_adopt_event_action
)
_import_class
(
'
digi
'
,
'
DigiKernel
'
)
_import_class
(
'
digi
'
,
'
DigiKernel
'
)
_import_class
(
'
digi
'
,
'
DigiContext
'
)
_import_class
(
'
digi
'
,
'
DigiContext
'
)
...
...
This diff is collapsed.
Click to expand it.
examples/DDDigi/scripts/TestFramework.py
+
2
−
2
View file @
3a31aa56
...
@@ -32,7 +32,7 @@ def make_subdetector(kernel, name):
...
@@ -32,7 +32,7 @@ def make_subdetector(kernel, name):
action_3
=
dddigi
.
TestAction
(
kernel
,
name
+
'
_deadChan
'
,
100
)
action_3
=
dddigi
.
TestAction
(
kernel
,
name
+
'
_deadChan
'
,
100
)
action_4
=
dddigi
.
TestAction
(
kernel
,
name
+
'
_noiseChan
'
,
50
)
action_4
=
dddigi
.
TestAction
(
kernel
,
name
+
'
_noiseChan
'
,
50
)
action_5
=
dddigi
.
TestAction
(
kernel
,
name
+
'
_merge
'
,
200
)
action_5
=
dddigi
.
TestAction
(
kernel
,
name
+
'
_merge
'
,
200
)
seq
=
dddigi
.
Action
Sequence
(
kernel
,
'
DigiActionSequence/
'
+
name
+
'
_sequence
'
,
True
)
seq
=
dddigi
.
Action
(
kernel
,
'
DigiActionSequence/
'
+
name
+
'
_sequence
'
,
parallel
=
True
)
seq
.
adopt
(
action_1
)
seq
.
adopt
(
action_1
)
seq
.
adopt
(
action_2
)
seq
.
adopt
(
action_2
)
seq
.
adopt
(
action_3
)
seq
.
adopt
(
action_3
)
...
@@ -53,7 +53,7 @@ def run():
...
@@ -53,7 +53,7 @@ def run():
digi
=
dddigi
.
Digitize
(
kernel
)
digi
=
dddigi
.
Digitize
(
kernel
)
digi
.
printDetectors
()
digi
.
printDetectors
()
event_processor
=
dddigi
.
Synchronize
(
kernel
,
'
DigiSynchronize/MainDigitizer
'
,
True
)
event_processor
=
dddigi
.
Action
(
kernel
,
'
DigiSynchronize/MainDigitizer
'
)
event_processor
.
parallel
=
True
event_processor
.
parallel
=
True
# input
# input
make_input
(
kernel
)
make_input
(
kernel
)
...
...
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