1 #ifndef CondCore_L1TPlugins_L1TUtmTriggerMenuPayloadInspectorHelper_H 2 #define CondCore_L1TPlugins_L1TUtmTriggerMenuPayloadInspectorHelper_H 32 std::vector<std::string>
output;
35 std::back_inserter(
output),
36 [](
const std::pair<std::string, L1TUtmAlgorithm>& pair) {
44 std::vector<std::string>
output;
47 std::back_inserter(
output),
48 [](
const std::pair<std::string, L1TUtmCondition>& pair) {
57 const auto& otherMap = getOtherMap<T>(
other);
58 const auto& thisMap = getThisMap<T>();
60 std::vector<std::string> commonKeys;
63 std::for_each(thisMap.begin(), thisMap.end(), [&commonKeys, &otherMap](
const std::pair<std::string, T>& pair) {
67 if (otherMap.find(
key) != otherMap.end()) {
68 commonKeys.push_back(
key);
77 const auto& otherMap = getOtherMap<T>(
other);
78 const auto& thisMap = getThisMap<T>();
80 std::vector<std::string> stringsOnlyInFirstMap;
84 thisMap.begin(), thisMap.end(), [&stringsOnlyInFirstMap, &otherMap](
const std::pair<std::string, T>& pair) {
87 if (otherMap.find(
key) == otherMap.end()) {
88 stringsOnlyInFirstMap.push_back(
key);
92 return stringsOnlyInFirstMap;
98 const auto& otherMap = getOtherMap<T>(
other);
99 const auto& thisMap = getThisMap<T>();
101 std::vector<std::string> stringsOnlyInSecondMap;
105 otherMap.begin(), otherMap.end(), [thisMap, &stringsOnlyInSecondMap](
const std::pair<std::string, T>& pair) {
109 if (thisMap.find(
key) == thisMap.end()) {
110 stringsOnlyInSecondMap.push_back(
key);
114 return stringsOnlyInSecondMap;
122 template <
typename T>
125 return other->getConditionMap();
127 return other->getAlgorithmMap();
132 template <
typename T>
142 template <
typename T>
159 const auto& vec_only_in_this =
m_info.template onlyInThis<T>(
other);
160 const auto& vec_only_in_other =
m_info.template onlyInOther<T>(
other);
165 unsigned int mapsize = vec_only_in_this.size() + vec_only_in_other.size();
166 float pitch = 1. / (mapsize * 1.1);
168 std::vector<float> y_x1, y_x2, y_line;
169 std::vector<std::string> s_x1, s_x2, s_x3;
185 s_x2.push_back(
"#scale[1.1]{Refer tag / IOV: #color[4]{" + theRefTag +
"} / " + theRefIOV +
"}");
191 for (
const auto& ref : vec_only_in_other) {
194 s_x1.push_back(
"#scale[0.7]{" + ref +
"}");
196 s_x2.push_back(
"#color[4]{#bf{Only in reference, not in target.}}");
197 y_line.push_back(y - (pitch / 2.));
201 for (
const auto& tar : vec_only_in_this) {
204 s_x1.push_back(
"#scale[0.7]{" + tar +
"}");
206 s_x2.push_back(
"#color[2]{#bf{Only in target, not in reference.}}");
207 y_line.push_back(y - (pitch / 2.));
211 TCanvas
canvas(
"L1TUtmMenuData",
"L1TUtmMenuData", 2000,
std::max(y_x1.size(), y_x2.size()) * 40);
216 float newpitch = 1 / (
std::max(y_x1.size(), y_x2.size()) * 1.1);
217 float factor = newpitch / pitch;
218 l.SetTextSize(newpitch - 0.002);
220 for (
unsigned int i = 0;
i < y_x1.size();
i++) {
221 l.DrawLatexNDC(x1, 1 - (1 - y_x1[
i]) *
factor, s_x1[
i].c_str());
224 for (
unsigned int i = 0;
i < y_x2.size();
i++) {
225 l.DrawLatexNDC(x2, 1 - (1 - y_x2[
i]) *
factor, s_x2[
i].c_str());
232 TLine
lines[y_line.size()];
234 for (
const auto&
line : y_line) {
236 lines[iL].SetLineWidth(1);
237 lines[iL].SetLineStyle(9);
238 lines[iL].SetLineColor(2);
239 lines[iL].Draw(
"same");
259 return "#scale[1.1]{Condition Name}";
264 return "#scale[1.1]{Algo Name}";
key
prepare the HTCondor submission files and eventually submit them