Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DQM] Apply code-checks/format #34131

Merged
merged 2 commits into from
Jun 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DQM/TrackerRemapper/interface/Phase1PixelSummaryMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace Ph1PMapSummaryHelper {
//============================================================================
// utility to tokenize std::string
//============================================================================
std::vector<std::string> tokenize(std::string line, char delimiter) {
inline std::vector<std::string> tokenize(std::string line, char delimiter) {
// Vector of string to save tokens
std::vector<std::string> tokens;
std::stringstream check1(line);
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/CalibCalo/src/DQMSourcePi0.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h"

// Less than operator for sorting EcalRecHits according to energy.
bool ecalRecHitGreater(EcalRecHit x, EcalRecHit y) { return (x.energy() > y.energy()); }
inline bool ecalRecHitGreater(EcalRecHit x, EcalRecHit y) { return (x.energy() > y.energy()); }

class DQMSourcePi0 : public DQMEDAnalyzer {
public:
Expand Down
28 changes: 14 additions & 14 deletions DQMOffline/Trigger/interface/UtilFuncs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
#include "DataFormats/Math/interface/deltaR.h"

namespace hltdqm {
bool passTrig(const float objEta,
float objPhi,
const trigger::TriggerEvent& trigEvt,
const std::string& filterName,
const std::string& processName) {
inline bool passTrig(const float objEta,
float objPhi,
const trigger::TriggerEvent& trigEvt,
const std::string& filterName,
const std::string& processName) {
constexpr float kMaxDR2 = 0.1 * 0.1;

edm::InputTag filterTag(filterName, "", processName);
Expand All @@ -33,12 +33,12 @@ namespace hltdqm {
}

//empty filters is auto pass
bool passTrig(const float objEta,
float objPhi,
const trigger::TriggerEvent& trigEvt,
const std::vector<std::string>& filterNames,
bool orFilters,
const std::string& processName) {
inline bool passTrig(const float objEta,
float objPhi,
const trigger::TriggerEvent& trigEvt,
const std::vector<std::string>& filterNames,
bool orFilters,
const std::string& processName) {
if (orFilters) {
if (filterNames.empty())
return true; //auto pass if empty filters
Expand All @@ -59,9 +59,9 @@ namespace hltdqm {
//inspired by https://github.com/cms-sw/cmssw/blob/fc4f8bbe1258790e46e2d554aacea15c3e5d9afa/HLTrigger/HLTfilters/src/HLTHighLevel.cc#L124-L165
//triggers are ORed together
//empty pattern is auto pass
bool passTrig(const std::string& trigPattern,
const edm::TriggerNames& trigNames,
const edm::TriggerResults& trigResults) {
inline bool passTrig(const std::string& trigPattern,
const edm::TriggerNames& trigNames,
const edm::TriggerResults& trigResults) {
if (trigPattern.empty())
return true;

Expand Down
4 changes: 2 additions & 2 deletions HLTriggerOffline/B2G/interface/B2GDoubleLeptonHLTValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ inline void B2GDoubleLeptonHLTValidation::triggerBinLabels(const std::vector<std
//
// constructors and destructor
//
B2GDoubleLeptonHLTValidation::B2GDoubleLeptonHLTValidation(const edm::ParameterSet &iConfig)
inline B2GDoubleLeptonHLTValidation::B2GDoubleLeptonHLTValidation(const edm::ParameterSet &iConfig)
: sDir_(iConfig.getUntrackedParameter<std::string>("sDir", "HLTValidation/B2G/Efficiencies/")),
sElectrons_(iConfig.getUntrackedParameter<std::string>("sElectrons", "gsfElectrons")),
ptElectrons_(iConfig.getUntrackedParameter<double>("ptElectrons", 0.)),
Expand All @@ -143,7 +143,7 @@ B2GDoubleLeptonHLTValidation::B2GDoubleLeptonHLTValidation(const edm::ParameterS
tokTrigger_ = consumes<edm::TriggerResults>(edm::InputTag(sTrigger_, "", "HLT"));
}

B2GDoubleLeptonHLTValidation::~B2GDoubleLeptonHLTValidation() {
inline B2GDoubleLeptonHLTValidation::~B2GDoubleLeptonHLTValidation() {
// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
}
Expand Down
4 changes: 2 additions & 2 deletions HLTriggerOffline/B2G/interface/B2GHadronicHLTValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ inline void B2GHadronicHLTValidation::triggerBinLabels(const std::vector<std::st
//
// constructors and destructor
//
B2GHadronicHLTValidation::B2GHadronicHLTValidation(const edm::ParameterSet &iConfig)
inline B2GHadronicHLTValidation::B2GHadronicHLTValidation(const edm::ParameterSet &iConfig)
: sDir_(iConfig.getUntrackedParameter<std::string>("sDir", "HLTValidation/B2G/Efficiencies/")),
sJets_(iConfig.getUntrackedParameter<std::string>("sJets", "ak5PFJets")),
ptJets_(iConfig.getUntrackedParameter<double>("ptJets", 0.)),
Expand All @@ -127,7 +127,7 @@ B2GHadronicHLTValidation::B2GHadronicHLTValidation(const edm::ParameterSet &iCon
tokTrigger_ = consumes<edm::TriggerResults>(edm::InputTag(sTrigger_, "", "HLT"));
}

B2GHadronicHLTValidation::~B2GHadronicHLTValidation() {
inline B2GHadronicHLTValidation::~B2GHadronicHLTValidation() {
// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
}
Expand Down
4 changes: 2 additions & 2 deletions HLTriggerOffline/B2G/interface/B2GSingleLeptonHLTValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ inline void B2GSingleLeptonHLTValidation::triggerBinLabels(const std::vector<std
//
// constructors and destructor
//
B2GSingleLeptonHLTValidation::B2GSingleLeptonHLTValidation(const edm::ParameterSet &iConfig)
inline B2GSingleLeptonHLTValidation::B2GSingleLeptonHLTValidation(const edm::ParameterSet &iConfig)
: sDir_(iConfig.getUntrackedParameter<std::string>("sDir", "HLTValidation/B2G/Efficiencies/")),
sElectrons_(iConfig.getUntrackedParameter<std::string>("sElectrons", "gsfElectrons")),
ptElectrons_(iConfig.getUntrackedParameter<double>("ptElectrons", 0.)),
Expand Down Expand Up @@ -159,7 +159,7 @@ B2GSingleLeptonHLTValidation::B2GSingleLeptonHLTValidation(const edm::ParameterS
tokTrigger_ = consumes<edm::TriggerResults>(edm::InputTag(sTrigger_, "", "HLT"));
}

B2GSingleLeptonHLTValidation::~B2GSingleLeptonHLTValidation() {
inline B2GSingleLeptonHLTValidation::~B2GSingleLeptonHLTValidation() {
// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
}
Expand Down
6 changes: 3 additions & 3 deletions Validation/RecoParticleFlow/bin/include/Plot1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <string>

template <>
bool PlotCompareUtility::compare<Plot1D>(HistoData *HD) {
inline bool PlotCompareUtility::compare<Plot1D>(HistoData *HD) {
// get the reference and comparison histograms
TH1F *href = (TH1F *)HD->getRefHisto();
TH1F *hnew = (TH1F *)HD->getNewHisto();
Expand Down Expand Up @@ -64,7 +64,7 @@ bool PlotCompareUtility::compare<Plot1D>(HistoData *HD) {
}

template <>
void PlotCompareUtility::makePlots<Plot1D>(HistoData *HD) {
inline void PlotCompareUtility::makePlots<Plot1D>(HistoData *HD) {
std::cerr << HD->getName() << "makePlots<Plot1D>\n";

// do not make any new plot if empty
Expand Down Expand Up @@ -146,7 +146,7 @@ void PlotCompareUtility::makePlots<Plot1D>(HistoData *HD) {
}

template <>
void PlotCompareUtility::makeHTML<Plot1D>(HistoData *HD) {
inline void PlotCompareUtility::makeHTML<Plot1D>(HistoData *HD) {
/* HTML is not presently required for 1D histograms -- do nothing

// create HTML support code for this HistoData
Expand Down
6 changes: 3 additions & 3 deletions Validation/RecoParticleFlow/bin/include/Plot2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <string>

template <>
bool PlotCompareUtility::compare<Plot2D>(HistoData *HD) {
inline bool PlotCompareUtility::compare<Plot2D>(HistoData *HD) {
// get the reference and comparison histograms
TH2F *href2d = (TH2F *)HD->getRefHisto();
TH2F *hnew2d = (TH2F *)HD->getNewHisto();
Expand Down Expand Up @@ -143,7 +143,7 @@ bool PlotCompareUtility::compare<Plot2D>(HistoData *HD) {
}

template <>
void PlotCompareUtility::makePlots<Plot2D>(HistoData *HD) {
inline void PlotCompareUtility::makePlots<Plot2D>(HistoData *HD) {
// do not make any new plot if empty
if (HD->getIsEmpty()) {
HD->setResultImage("NoData_Results.gif");
Expand Down Expand Up @@ -337,7 +337,7 @@ void PlotCompareUtility::makePlots<Plot2D>(HistoData *HD) {
}

template <>
void PlotCompareUtility::makeHTML<Plot2D>(HistoData *HD) {
inline void PlotCompareUtility::makeHTML<Plot2D>(HistoData *HD) {
/* at present, makeHTML<Plot1D> does nothing, so don't waste the CPU cycles
// loop over projections and produce HTML
std::vector<HistoData>::iterator hd;
Expand Down
2 changes: 1 addition & 1 deletion Validation/RecoParticleFlow/bin/include/Style.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "TStyle.h"

// tdrGrid: Turns the grid lines on (true) or off (false)
TStyle genStyle() {
inline TStyle genStyle() {
TStyle myStyle("myStyle", "Style similar to P-TDR");

// For the canvas:
Expand Down