Skip to content

Commit 99c1844

Browse files
authored
Merge pull request cms-sw#34048 from smuzaffar/12_0-code-checks-L1
[L1] Apply code-checks/format with misc-definitions-in-headers
2 parents 4cb4fea + 5a36cdf commit 99c1844

File tree

5 files changed

+23
-13
lines changed

5 files changed

+23
-13
lines changed

L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class L1MuGMTLUT {
179179
// decode std::string of style "phi(2) eta(4)"
180180
L1MuGMTLUTHelpers::Tokenizer tok(" ", input);
181181
for (unsigned int i = 0; i < tok.size(); i++) {
182-
size_type obrace = tok[i].find("("), cbrace = tok[i].find(")");
182+
size_type obrace = tok[i].find('('), cbrace = tok[i].find(')');
183183
if (obrace != std::string::npos && cbrace != std::string::npos)
184184
push_back(
185185
port(tok[i].substr(0, obrace), (unsigned)atoi(tok[i].substr(obrace + 1, cbrace - obrace - 1).c_str())));

L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUPhiPro1LUT.cc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,25 @@ unsigned L1MuGMTMIAUPhiPro1LUT::TheLookupFunction(
115115
if (charge == 0 && calophi < 0.) { // plus charge
116116
edm::LogWarning("LUTMismatch")
117117
<< "warning: calo offset goes into wrong direction. charge is plus and calophi < 0deg" << endl
118-
<< "SYS=" << (isys == 0 ? "DT" : isys == 1 ? "CSC" : isys == 2 ? "BRPC" : "FRPC") << " ISO = " << isISO
119-
<< " etabin = " << eta << " pval = "
118+
<< "SYS="
119+
<< (isys == 0 ? "DT"
120+
: isys == 1 ? "CSC"
121+
: isys == 2 ? "BRPC"
122+
: "FRPC")
123+
<< " ISO = " << isISO << " etabin = " << eta << " pval = "
120124
<< theTriggerPtScale->getPtScale()->getLowEdge(pt)
121125
// << " pval = " << theTriggerScales->getPtScale()->getLowEdge(pt)
122126
<< " charge = " << (charge == 0 ? "pos" : "neg") << " phi_fine = " << phi_fine
123127
<< " calophi(deg) = " << calophi * 180. / M_PI << endl;
124128
} else if (charge == 1 && calophi > 20. / 180. * M_PI) { // neg charge
125129
edm::LogWarning("LUTMismatch")
126130
<< "warning: calo offset goes into wrong direction. charge is minus and calophi > 20deg" << endl
127-
<< "SYS=" << (isys == 0 ? "DT" : isys == 1 ? "CSC" : isys == 2 ? "BRPC" : "FRPC") << " ISO = " << isISO
128-
<< " etabin = " << eta << " pval = "
131+
<< "SYS="
132+
<< (isys == 0 ? "DT"
133+
: isys == 1 ? "CSC"
134+
: isys == 2 ? "BRPC"
135+
: "FRPC")
136+
<< " ISO = " << isISO << " etabin = " << eta << " pval = "
129137
<< theTriggerPtScale->getPtScale()->getLowEdge(pt)
130138
// << " pval = " << theTriggerScales->getPtScale()->getLowEdge(pt)
131139
<< " charge = " << (charge == 0 ? "pos" : "neg") << " phi_fine = " << phi_fine

L1Trigger/GlobalTriggerAnalyzer/interface/L1GtUtils.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ L1GtUtils::L1GtUtils(edm::ParameterSet const& pset,
508508
T& module,
509509
UseEventSetupIn useEventSetupIn)
510510
: L1GtUtils(iC, useEventSetupIn) {
511-
m_l1GtUtilsHelper.reset(new L1GtUtilsHelper(pset, iC, useL1GtTriggerMenuLite, module));
511+
m_l1GtUtilsHelper = std::make_unique<L1GtUtilsHelper>(pset, iC, useL1GtTriggerMenuLite, module);
512512
}
513513

514514
template <typename T>
@@ -539,13 +539,13 @@ L1GtUtils::L1GtUtils(edm::ParameterSet const& pset,
539539
edm::InputTag const& l1GtTriggerMenuLiteInputTag,
540540
UseEventSetupIn useEventSetupIn)
541541
: L1GtUtils(iC, useEventSetupIn) {
542-
m_l1GtUtilsHelper.reset(new L1GtUtilsHelper(pset,
543-
iC,
544-
useL1GtTriggerMenuLite,
545-
module,
546-
l1GtRecordInputTag,
547-
l1GtReadoutRecordInputTag,
548-
l1GtTriggerMenuLiteInputTag));
542+
m_l1GtUtilsHelper = std::make_unique<L1GtUtilsHelper>(pset,
543+
iC,
544+
useL1GtTriggerMenuLite,
545+
module,
546+
l1GtRecordInputTag,
547+
l1GtReadoutRecordInputTag,
548+
l1GtTriggerMenuLiteInputTag);
549549
}
550550

551551
#endif /*GlobalTriggerAnalyzer_L1GtUtils_h*/

L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ namespace l1t {
494494
std::vector<int> minimumBiasThresholds() const {
495495
if (pnode_[hiCentrality].version_ == 1 && pnode_[hiCentrality].iparams_.size() == 5) {
496496
std::vector<int> newVec;
497+
newVec.reserve(4);
497498
for (int i = 0; i < 4; i++) {
498499
newVec.push_back(pnode_[hiCentrality].iparams_.at(i + 1));
499500
}

L1TriggerConfig/L1TConfigProducers/src/CaloParamsHelperO2O.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ namespace l1t {
516516
std::vector<int> minimumBiasThresholds() const {
517517
if (pnode_[hiCentrality].version_ == 1 && pnode_[hiCentrality].iparams_.size() == 5) {
518518
std::vector<int> newVec;
519+
newVec.reserve(4);
519520
for (int i = 0; i < 4; i++) {
520521
newVec.push_back(pnode_[hiCentrality].iparams_.at(i + 1));
521522
}

0 commit comments

Comments
 (0)