Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
87dbe584
Commit
87dbe584
authored
Feb 20, 2020
by
Joerg Stelzer
Browse files
Switch PrescalingEmulationTool to use event context for timestamp (
ATR-20930
)
parent
daf05c8d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Trigger/TrigSteer/L1Decoder/src/PrescalingEmulationTool.cxx
View file @
87dbe584
...
...
@@ -21,9 +21,6 @@ PrescalingEmulationTool::PrescalingEmulationTool( const std::string& type,
PrescalingEmulationTool
::~
PrescalingEmulationTool
()
{
}
StatusCode
PrescalingEmulationTool
::
initialize
()
{
CHECK
(
m_eventInfo
.
initialize
(
not
m_eventInfo
.
key
().
empty
()
)
);
for
(
const
std
::
string
&
confElement
:
m_prescalingConfig
)
{
std
::
string
chainName
(
confElement
,
0
,
confElement
.
find
(
':'
)
);
std
::
string
psValue
(
confElement
,
confElement
.
find
(
':'
)
+
1
);
...
...
@@ -41,15 +38,9 @@ StatusCode PrescalingEmulationTool::prescaleChains( const EventContext& ctx,
// obtain CTP time
remainActive
.
reserve
(
initialyActive
.
size
()
);
size_t
seed
=
initialyActive
[
0
].
numeric
();
if
(
not
m_eventInfo
.
key
().
empty
()
)
{
auto
handle
=
SG
::
makeHandle
(
m_eventInfo
,
ctx
);
const
xAOD
::
EventInfo
*
event
=
handle
.
cptr
();
// not sure we should mimick something we had before, will not be abel to reproduce it exactly anyways
seed
=
event
->
timeStamp
()
^
event
->
timeStampNSOffset
();
}
// create the seed from the event time
size_t
seed
=
ctx
.
eventID
().
time_stamp
()
^
ctx
.
eventID
().
time_stamp_ns_offset
();
CLHEP
::
HepRandomEngine
*
engine
=
m_RNGEngines
.
getEngine
(
ctx
);
engine
->
setSeed
(
seed
,
0
);
for
(
auto
ch
:
initialyActive
)
{
...
...
Trigger/TrigSteer/L1Decoder/src/PrescalingEmulationTool.h
View file @
87dbe584
...
...
@@ -43,7 +43,6 @@ public:
private:
PrescalingEmulationTool
();
SG
::
ReadHandleKey
<
xAOD
::
EventInfo
>
m_eventInfo
{
this
,
"EventInfo"
,
"EventInfo"
,
"EventInfo object, source of CTP time used to reseed the RNG"
};
Gaudi
::
Property
<
bool
>
m_keepUnknownChains
{
this
,
"KeepUnknownChains"
,
true
,
"If True then chains for which prescaling information is not set are kept"
};
Gaudi
::
Property
<
std
::
vector
<
std
::
string
>
>
m_prescalingConfig
{
this
,
"Prescales"
,
{},
"The prescaling info in the form:
\"
chainName:PSValue
\"
"
};
ATHRNG
::
RNGWrapper
m_RNGEngines
;
...
...
Trigger/TrigValidation/TrigUpgradeTest/python/EmuStepProcessingConfig.py
View file @
87dbe584
...
...
@@ -237,7 +237,6 @@ def generateL1DecoderAndChains():
L1UnpackingSeq
=
parOR
(
"L1UnpackingSeq"
)
l1Decoder
=
L1Decoder
(
RoIBResult
=
""
,
L1TriggerResult
=
""
)
l1Decoder
.
prescaler
.
EventInfo
=
""
l1Decoder
.
L1DecoderSummaryKey
=
"L1DecoderSummary"
ctpUnpacker
=
CTPUnpackingEmulationTool
(
ForceEnableAllChains
=
False
,
InputFilename
=
"ctp.dat"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment