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
Qipeng Hu
athena
Commits
867caaa0
Commit
867caaa0
authored
Oct 22, 2021
by
Daniele Zanzi
Committed by
Vakhtang Tsulaia
Oct 22, 2021
Browse files
remove bunch group from L1 menu json (ATR-24353)
parent
d48bc75e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoni.cxx
View file @
867caaa0
...
...
@@ -21,6 +21,7 @@ StatusCode TrigSignatureMoni::initialize() {
ATH_CHECK
(
m_finalDecisionKey
.
initialize
());
ATH_CHECK
(
m_HLTMenuKey
.
initialize
());
ATH_CHECK
(
m_L1MenuKey
.
initialize
());
ATH_CHECK
(
m_L1BunchGroupKey
.
initialize
());
ATH_CHECK
(
m_decisionCollectorTools
.
retrieve
());
ATH_CHECK
(
m_featureCollectorTools
.
retrieve
());
ATH_CHECK
(
m_histSvc
.
retrieve
());
...
...
@@ -33,6 +34,7 @@ StatusCode TrigSignatureMoni::initialize() {
StatusCode
TrigSignatureMoni
::
start
()
{
SG
::
ReadHandle
<
TrigConf
::
L1Menu
>
l1MenuHandle
=
SG
::
makeHandle
(
m_L1MenuKey
);
SG
::
ReadHandle
<
TrigConf
::
L1BunchGroupSet
>
l1BunchGroupHandle
=
SG
::
makeHandle
(
m_L1BunchGroupKey
);
SG
::
ReadHandle
<
TrigConf
::
HLTMenu
>
hltMenuHandle
=
SG
::
makeHandle
(
m_HLTMenuKey
);
ATH_CHECK
(
hltMenuHandle
.
isValid
());
...
...
@@ -104,10 +106,10 @@ StatusCode TrigSignatureMoni::start() {
// Initialize BunchGroupCount that will count bunchgroup per chain
const
int
xb
{
nChains
(
hltMenuHandle
)};
const
int
yb
{
nBunchGroups
(
l1
Menu
Handle
)};
const
int
yb
{
nBunchGroups
(
l1
BunchGroup
Handle
)};
std
::
unique_ptr
<
TH2
>
hBG
=
std
::
make_unique
<
TH2I
>
(
"BunchGroupCount"
,
"Bunch group count per chain;chain;bunchgroup"
,
xb
,
1
,
xb
+
1
,
yb
,
1
,
yb
+
1
);
ATH_CHECK
(
m_histSvc
->
regShared
(
m_bookingPath
+
"/"
+
name
()
+
"/BunchGroupCount"
,
std
::
move
(
hBG
),
m_bunchHistogram
));
ATH_CHECK
(
initBunchHist
(
m_bunchHistogram
,
hltMenuHandle
,
l1
Menu
Handle
));
ATH_CHECK
(
initBunchHist
(
m_bunchHistogram
,
hltMenuHandle
,
l1
BunchGroup
Handle
));
// Initialize Rate histogram to save the rates of positive decisions in given interval
// per chain/group/sequence per in, after ps, out steps
...
...
@@ -481,8 +483,8 @@ int TrigSignatureMoni::nBCIDchains() const {
return
m_BCIDchainIDToBinMap
.
size
();
}
int
TrigSignatureMoni
::
nBunchGroups
(
SG
::
ReadHandle
<
TrigConf
::
L1
Menu
>&
l1Menu
Handle
)
const
{
return
l1
Menu
Handle
.
isValid
()
?
(
l1
Menu
Handle
->
getObject
(
"bunchGroups"
).
getKeys
().
size
()
-
1
)
:
16
;
int
TrigSignatureMoni
::
nBunchGroups
(
SG
::
ReadHandle
<
TrigConf
::
L1
BunchGroupSet
>&
l1BunchGroup
Handle
)
const
{
return
l1
BunchGroup
Handle
.
isValid
()
?
(
l1
BunchGroup
Handle
->
getObject
(
"bunchGroups"
).
getKeys
().
size
()
-
1
)
:
16
;
}
StatusCode
TrigSignatureMoni
::
initHist
(
LockedHandle
<
TH2
>&
hist
,
SG
::
ReadHandle
<
TrigConf
::
HLTMenu
>&
hltMenuHandle
,
bool
steps
)
{
...
...
@@ -560,9 +562,9 @@ StatusCode TrigSignatureMoni::initBCIDhist(LockedHandle<TH2>& hist, const std::v
return
StatusCode
::
SUCCESS
;
}
StatusCode
TrigSignatureMoni
::
initBunchHist
(
LockedHandle
<
TH2
>&
hist
,
SG
::
ReadHandle
<
TrigConf
::
HLTMenu
>&
hltMenuHandle
,
SG
::
ReadHandle
<
TrigConf
::
L1
Menu
>&
l1Menu
Handle
)
{
StatusCode
TrigSignatureMoni
::
initBunchHist
(
LockedHandle
<
TH2
>&
hist
,
SG
::
ReadHandle
<
TrigConf
::
HLTMenu
>&
hltMenuHandle
,
SG
::
ReadHandle
<
TrigConf
::
L1
BunchGroupSet
>&
l1BunchGroup
Handle
)
{
bool
gotL1
Menu
=
l1Menu
Handle
.
isValid
()
&&
l1
Menu
Handle
->
isInitialized
();
bool
gotL1
BunchGroup
=
l1BunchGroup
Handle
.
isValid
()
&&
l1
BunchGroup
Handle
->
isInitialized
();
TAxis
*
x
=
hist
->
GetXaxis
();
x
->
SetBinLabel
(
1
,
"All"
);
...
...
@@ -580,8 +582,8 @@ StatusCode TrigSignatureMoni::initBunchHist(LockedHandle<TH2>& hist, SG::ReadHan
}
std
::
vector
<
std
::
string
>
sortedBunchGroups
;
if
(
gotL1
Menu
)
{
sortedBunchGroups
=
l1
Menu
Handle
->
getObject
(
"bunchGroups"
).
getKeys
();
if
(
gotL1
BunchGroup
)
{
sortedBunchGroups
=
l1
BunchGroup
Handle
->
getObject
(
"bunchGroups"
).
getKeys
();
std
::
sort
(
sortedBunchGroups
.
begin
(),
sortedBunchGroups
.
end
());
sortedBunchGroups
.
erase
(
std
::
remove
(
sortedBunchGroups
.
begin
(),
sortedBunchGroups
.
end
(),
"BGRP0"
),
sortedBunchGroups
.
end
());
}
else
{
...
...
@@ -593,7 +595,7 @@ StatusCode TrigSignatureMoni::initBunchHist(LockedHandle<TH2>& hist, SG::ReadHan
bin
=
1
;
TAxis
*
y
=
hist
->
GetYaxis
();
for
(
const
std
::
string
&
group
:
sortedBunchGroups
){
std
::
string
bgname
=
gotL1
Menu
?
l1Menu
Handle
->
getAttribute
(
"bunchGroups."
+
group
+
".name"
,
true
)
:
group
;
std
::
string
bgname
=
gotL1
BunchGroup
?
l1BunchGroup
Handle
->
getAttribute
(
"bunchGroups."
+
group
+
".name"
,
true
)
:
group
;
y
->
SetBinLabel
(
bin
,
bgname
.
c_str
()
);
m_nameToBinMap
[
group
]
=
bin
;
++
bin
;
...
...
Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoni.h
View file @
867caaa0
...
...
@@ -20,6 +20,7 @@
#include "DecisionCollectorTool.h"
#include "TrigConfData/HLTMenu.h"
#include "TrigConfData/L1Menu.h"
#include "TrigConfData/L1BunchGroupSet.h"
#include "TrigConfData/DataStructure.h"
#include "TimeDivider.h"
...
...
@@ -92,6 +93,7 @@ class TrigSignatureMoni : public extends<AthReentrantAlgorithm, IIncidentListene
SG
::
ReadHandleKey
<
TrigCompositeUtils
::
DecisionContainer
>
m_finalDecisionKey
{
this
,
"FinalDecisionKey"
,
"HLTNav_Summary"
,
"Final stage of all decisions"
};
SG
::
ReadHandleKey
<
TrigConf
::
HLTMenu
>
m_HLTMenuKey
{
this
,
"HLTTriggerMenu"
,
"DetectorStore+HLTTriggerMenu"
,
"HLT Menu"
};
SG
::
ReadHandleKey
<
TrigConf
::
L1Menu
>
m_L1MenuKey
{
this
,
"L1TriggerMenu"
,
"DetectorStore+L1TriggerMenu"
,
"L1 Menu"
};
SG
::
ReadHandleKey
<
TrigConf
::
L1BunchGroupSet
>
m_L1BunchGroupKey
{
this
,
"L1BunchGroup"
,
"DetectorStore+L1BunchGroup"
,
"L1 BunchGroup"
};
ServiceHandle
<
IIncidentSvc
>
m_incidentSvc
{
this
,
"IncidentSvc"
,
"IncidentSvc"
,
"Incident service"
};
ServiceHandle
<
ITHistSvc
>
m_histSvc
{
this
,
"THistSvc"
,
"THistSvc/THistSvc"
,
"Histogramming svc"
};
...
...
@@ -143,15 +145,15 @@ class TrigSignatureMoni : public extends<AthReentrantAlgorithm, IIncidentListene
// Returns number of base steps: in, after ps, out steps
int
nBaseSteps
()
const
;
// Returns number of bunchgroups from
l
1
menu
int
nBunchGroups
(
SG
::
ReadHandle
<
TrigConf
::
L1
Menu
>&
)
const
;
// Returns number of bunchgroups from
L
1
BunchGroupSet
int
nBunchGroups
(
SG
::
ReadHandle
<
TrigConf
::
L1
BunchGroupSet
>&
)
const
;
// Returns number of BCID chains to monitor
int
nBCIDchains
()
const
;
// Init different types of histograms
StatusCode
initHist
(
LockedHandle
<
TH2
>&
,
SG
::
ReadHandle
<
TrigConf
::
HLTMenu
>&
,
bool
=
true
);
StatusCode
initBunchHist
(
LockedHandle
<
TH2
>&
,
SG
::
ReadHandle
<
TrigConf
::
HLTMenu
>&
,
SG
::
ReadHandle
<
TrigConf
::
L1
Menu
>&
);
StatusCode
initBunchHist
(
LockedHandle
<
TH2
>&
,
SG
::
ReadHandle
<
TrigConf
::
HLTMenu
>&
,
SG
::
ReadHandle
<
TrigConf
::
L1
BunchGroupSet
>&
);
StatusCode
initBCIDhist
(
LockedHandle
<
TH2
>&
,
const
std
::
vector
<
std
::
string
>&
);
StatusCode
initSeqHist
(
LockedHandle
<
TH2
>&
,
std
::
set
<
std
::
string
>&
);
...
...
Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1Menu2JSON.py
View file @
867caaa0
...
...
@@ -53,9 +53,6 @@ class L1MenuJSONConverter(object):
# items
confObj
[
"items"
]
=
self
.
menu
.
items
.
json
()
# bunchgroups
confObj
[
"bunchGroups"
]
=
self
.
menu
.
ctp
.
bunchGroupSet
.
json
()
# thresholds
confObj
[
"thresholds"
]
=
odict
()
confObj
[
"thresholds"
][
"internal"
]
=
odict
()
...
...
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