Skip to content

Commit 3cfb1f9

Browse files
authored
Merge pull request #45738 from mmusich/mm_dev_fixL1TMuonGlobalParamsPayloadInspector
Fix for `L1TMuonGlobalParams_PayloadInspector`
2 parents 9c40603 + bd92c25 commit 3cfb1f9

File tree

5 files changed

+34
-9
lines changed

5 files changed

+34
-9
lines changed

CondCore/L1TPlugins/plugins/BuildFile.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@
33
<use name="CondCore/CondDB"/>
44
<use name="CondFormats/L1TObjects"/>
55
</library>
6+
7+
<library file="L1TMuonGlobalParams_PayloadInspector.cc" name="L1TMuonGlobalParams_PayloadInspector">
8+
<use name="CondCore/Utilities"/>
9+
<use name="CondCore/CondDB"/>
10+
<use name="CondFormats/L1TObjects"/>
11+
<use name="L1Trigger/L1TMuon"/>
12+
<use name="FWCore/MessageLogger"/>
13+
</library>

CondCore/L1TPlugins/plugins/L1TMuonGlobalParams_PayloadInspector.cc

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "L1Trigger/L1TMuon/interface/L1TMuonGlobalParamsHelper.h"
1919
#include "L1Trigger/L1TMuon/interface/L1TMuonGlobalParams_PUBLIC.h"
2020

21-
#include <bitset>
21+
#include <fmt/format.h>
2222

2323
// include ROOT
2424
#include "TH1F.h"
@@ -93,13 +93,11 @@ namespace {
9393
leg.Draw();
9494
lzero.Draw();
9595

96-
tl.DrawLatexNDC(
97-
0.12,
98-
0.85,
99-
(fmt::v8::format(
100-
"fwVersion: {}, bx Min, Max: {}, {}", l1tmgph.fwVersion(), payload->bxMin(), payload->bxMax()))
101-
.c_str());
102-
tl.DrawLatexNDC(0.1, 0.92, (fmt::v8::format("{}, iov: {}", tag.name, IOVsince)).c_str());
96+
auto const label_fw =
97+
fmt::format("fwVersion: {}, bx Min, Max: {}, {}", l1tmgph.fwVersion(), payload->bxMin(), payload->bxMax());
98+
auto const label_tag = fmt::format("{}, iov: {}", tag.name, IOVsince);
99+
tl.DrawLatexNDC(0.12, 0.85, label_fw.c_str());
100+
tl.DrawLatexNDC(0.10, 0.92, label_tag.c_str());
103101
tl.DrawLatexNDC(0.07, 0.59, "1");
104102
tl.DrawLatexNDC(0.07, 0.27, "1");
105103

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<use name="CondCore/Utilities"/>
22
<use name="FWCore/PluginManager"/>
3+
<use name="L1Trigger/L1TMuon"/>
34
<bin file="testL1TObjectsPayloadInspector.cpp" name="testL1TObjectsPayloadInspector">
45
</bin>

CondCore/L1TPlugins/test/testL1TObjectsPayloadInspector.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <sstream>
33
#include "CondCore/Utilities/interface/PayloadInspector.h"
44
#include "CondCore/L1TPlugins/plugins/L1TUtmTriggerMenu_PayloadInspector.cc"
5+
#include "CondCore/L1TPlugins/plugins/L1TMuonGlobalParams_PayloadInspector.cc"
56
#include "FWCore/MessageLogger/interface/MessageLogger.h"
67
#include "FWCore/PluginManager/interface/PluginManager.h"
78
#include "FWCore/PluginManager/interface/standard.h"
@@ -59,7 +60,12 @@ int main(int argc, char** argv) {
5960
test5.process(connectionString, PI::mk_input(tag, start, end, tag2, start, end));
6061
edm::LogPrint("testL1TObjectsPayloadInspector") << test5.data() << std::endl;
6162

62-
edm::LogPrint("testL1TObjectsPayloadInspector") << "## Exercising L1TGlobalPrescalesVetos tests" << std::endl;
63+
edm::LogPrint("testL1TObjectsPayloadInspector") << "## Exercising L1TMuonGlobalParams_ tests" << std::endl;
64+
65+
L1TMuonGlobalParamsInputBits test6;
66+
tag = "L1TMuonGlobalParams_Stage2v0_2024_mc_v1";
67+
test6.process(connectionString, PI::mk_input(tag, start, end));
68+
edm::LogPrint("testL1TObjectsPayloadInspector") << test6.data() << std::endl;
6369

6470
Py_Finalize();
6571
}

CondCore/L1TPlugins/test/testL1TPI.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,15 @@ getPayloadData.py \
8686

8787
mv *.png $W_DIR/results/L1TUtmTriggerMenu_CompareConditionsTwoTags.png
8888

89+
####################
90+
# Test L1TMuonGlobalParams input bits
91+
####################
92+
getPayloadData.py \
93+
--plugin pluginL1TMuonGlobalParams_PayloadInspector \
94+
--plot plot_L1TMuonGlobalParamsInputBits \
95+
--tag L1TMuonGlobalParams_Stage2v0_2024_mc_v1 \
96+
--time_type Run --iovs '{"start_iov": "1", "end_iov" : "1"}' \
97+
--db Prod \
98+
--test;
99+
100+
mv *.png $W_DIR/results/L1TMuonGlobalParams_InputBits.png

0 commit comments

Comments
 (0)