Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodozov committed Jul 17, 2020
1 parent 1c330cc commit f0b288d
Show file tree
Hide file tree
Showing 82 changed files with 365 additions and 441 deletions.
4 changes: 1 addition & 3 deletions DataFormats/TauReco/src/PFTau.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include <memory>



#include "DataFormats/Common/interface/RefToPtr.h"
#include "DataFormats/TauReco/interface/PFTau.h"
#include "DataFormats/TauReco/interface/PFTau.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

//using namespace std;
Expand Down
6 changes: 3 additions & 3 deletions EventFilter/HcalRawToDigi/plugins/HcalDigiToRawuHTR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <iostream>
#include <memory>

#include <sstream>
#include <sstream>
#include <string>

/* QUESTION: what about dual FED readout? */
Expand Down Expand Up @@ -251,8 +251,8 @@ void HcalDigiToRawuHTR::produce(edm::StreamID id, edm::Event& iEvent, const edm:
int fedId = FEDNumbering::MINHCALuTCAFEDID + crateId;
if (fedMap.find(fedId) == fedMap.end()) {
/* QUESTION: where should the orbit number come from? */
fedMap[fedId] = std::make_unique<HCalFED>(
fedId, iEvent.id().event(), iEvent.orbitNumber(), iEvent.bunchCrossing());
fedMap[fedId] =
std::make_unique<HCalFED>(fedId, iEvent.id().event(), iEvent.orbitNumber(), iEvent.bunchCrossing());
}
fedMap[fedId]->addUHTR(uhtr->second, crateId, slotId);
} // end loop over uhtr containers
Expand Down
4 changes: 1 addition & 3 deletions EventFilter/SiPixelRawToDigi/plugins/SiPixelRawToDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@

#include "SiPixelRawToDigi.h"

#include <memory>

#include <memory>


#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/ESTransientHandle.h"
Expand Down
2 changes: 1 addition & 1 deletion RecoBTag/CTagging/src/CharmTagger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>
#include <vector>

CharmTagger::Tokens::Tokens(const edm::ParameterSet &configuration, edm::ESConsumesCollector &&cc) {
if (configuration.getParameter<bool>("useCondDB")) {
Expand Down
6 changes: 3 additions & 3 deletions RecoBTag/Combined/plugins/BTagProbabilityToDiscriminator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,20 @@ class BTagProbabilityToDiscriminator : public edm::stream::EDProducer<> {
};

BTagProbabilityToDiscriminator::BTagProbabilityToDiscriminator(const edm::ParameterSet &iConfig) {
for (const auto& discriminator : iConfig.getParameter<vPSet>("discriminators")) {
for (const auto &discriminator : iConfig.getParameter<vPSet>("discriminators")) {
Discriminator current;
current.name = discriminator.getParameter<std::string>("name");
produces<JetTagCollection>(current.name);

for (const auto& intag : discriminator.getParameter<vInputTag>("numerator")) {
for (const auto &intag : discriminator.getParameter<vInputTag>("numerator")) {
if (jet_tags_.find(intag.encode()) == jet_tags_.end()) { // new
// probability
jet_tags_[intag.encode()] = consumes<JetTagCollection>(intag);
}
current.numerator.push_back(intag.encode());
}

for (const auto& intag : discriminator.getParameter<vInputTag>("denominator")) {
for (const auto &intag : discriminator.getParameter<vInputTag>("denominator")) {
if (jet_tags_.find(intag.encode()) == jet_tags_.end()) { // new
// probability
jet_tags_[intag.encode()] = consumes<JetTagCollection>(intag);
Expand Down
4 changes: 1 addition & 3 deletions RecoBTag/Combined/src/CandidateChargeBTagComputer.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include <memory>



#include "RecoBTag/Combined/interface/CandidateChargeBTagComputer.h"
#include "RecoBTag/Combined/interface/CandidateChargeBTagComputer.h"

CandidateChargeBTagComputer::Tokens::Tokens(const edm::ParameterSet& parameters, edm::ESConsumesCollector&& cc) {
if (parameters.getParameter<bool>("useCondDB")) {
Expand Down
5 changes: 3 additions & 2 deletions RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class HistogramProbabilityEstimator;
#include "FWCore/Framework/interface/EventSetupRecord.h"
#include "FWCore/Framework/interface/EventSetupRecordImplementation.h"
#include "FWCore/Framework/interface/EventSetupRecordKey.h"
#include <typeinfo>
#include <typeinfo>

class DeepFlavourTagInfoProducer : public edm::stream::EDProducer<> {
public:
Expand Down Expand Up @@ -465,7 +465,8 @@ void DeepFlavourTagInfoProducer::checkEventSetup(const edm::EventSetup& iSetup)
iSetup.get<BTagTrackProbability2DRcd>().get(calib2DHandle);
ESHandle<TrackProbabilityCalibration> calib3DHandle;
iSetup.get<BTagTrackProbability3DRcd>().get(calib3DHandle);
probabilityEstimator_ = std::make_unique<HistogramProbabilityEstimator>(calib3DHandle.product(), calib2DHandle.product());
probabilityEstimator_ =
std::make_unique<HistogramProbabilityEstimator>(calib3DHandle.product(), calib2DHandle.product());
}

calibrationCacheId3D_ = cacheId3D;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,10 +690,10 @@ void TemplatedSecondaryVertexProducer<IPTI, VTX>::produce(edm::Event &event, con
if (useGhostTrack)
vertexRecoGT = std::make_unique<GhostTrackVertexFinder>(
vtxRecoPSet.getParameter<double>("maxFitChi2"),
vtxRecoPSet.getParameter<double>("mergeThreshold"),
vtxRecoPSet.getParameter<double>("primcut"),
vtxRecoPSet.getParameter<double>("seccut"),
getGhostTrackFitType(vtxRecoPSet.getParameter<std::string>("fitType")));
vtxRecoPSet.getParameter<double>("mergeThreshold"),
vtxRecoPSet.getParameter<double>("primcut"),
vtxRecoPSet.getParameter<double>("seccut"),
getGhostTrackFitType(vtxRecoPSet.getParameter<std::string>("fitType")));
else
vertexReco = std::make_unique<ConfigurableVertexReconstructor>(vtxRecoPSet);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include <memory>



#include "RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h"
#include "RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h"

#include "FWCore/MessageLogger/interface/MessageLogger.h"

Expand Down
2 changes: 1 addition & 1 deletion RecoBTag/SoftLepton/src/ElectronTagger.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <limits>
#include <memory>

#include <random>
#include <random>

#include "CondFormats/DataRecord/interface/BTauGenericMVAJetTagComputerRcd.h"
#include "CondFormats/DataRecord/interface/GBRWrapperRcd.h"
Expand Down
2 changes: 1 addition & 1 deletion RecoBTag/SoftLepton/src/MuonTagger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <limits>
#include <memory>

#include <random>
#include <random>

#include "RecoBTau/JetTagComputer/interface/JetTagComputerRecord.h"
#include "DataFormats/BTauReco/interface/SoftLeptonTagInfo.h"
Expand Down
2 changes: 1 addition & 1 deletion RecoBTau/JetTagComputer/src/GenericMVAComputerCache.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <memory>

#include <memory>
#include <string>
#include <string>
#include <vector>

#include "CondFormats/PhysicsToolsObjects/interface/MVAComputer.h"
Expand Down
2 changes: 1 addition & 1 deletion RecoBTau/JetTagComputer/src/GenericMVAJetTagComputer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <memory>

#include <memory>
#include <string>
#include <string>

#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/Framework/interface/EventSetup.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ vector<float> EndcapPiZeroDiscriminatorAlgo::findPreshVector(ESDetId strip,
// to avoid problem in case number of strips is less than 11
vector<float> vout_ElevenStrips_Energy;
vout_ElevenStrips_Energy.reserve(11);
for (int i = 0; i < 11; i++) {
for (int i = 0; i < 11; i++) {
vout_ElevenStrips_Energy.push_back(0.);
}

Expand Down
2 changes: 1 addition & 1 deletion RecoEcal/EgammaClusterAlgos/src/HybridClusterAlgo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ void HybridClusterAlgo::mainSearch(const EcalRecHitCollection* hits, const CaloS
std::vector<int> OwnerShip;
std::vector<double> LumpEnergy;
OwnerShip.reserve(int(dominoEnergy.size()));
for (int i = 0; i < int(dominoEnergy.size()); ++i)
for (int i = 0; i < int(dominoEnergy.size()); ++i)
OwnerShip.push_back(-1);

//Loop over peaks.
Expand Down
2 changes: 1 addition & 1 deletion RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <cmath>
#include <functional>
#include <sstream>
#include <stdexcept>
#include <stdexcept>
#include <string>

using namespace std;
Expand Down
2 changes: 1 addition & 1 deletion RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <memory>

#include <algorithm>
#include <sstream>
#include <sstream>

using namespace edm;
using namespace reco;
Expand Down
4 changes: 2 additions & 2 deletions RecoEgamma/EgammaTools/plugins/CalibratedElectronProducers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#include <memory>

#include <vector>
#include <vector>

template <typename T>
class CalibratedElectronProducerT : public edm::stream::EDProducer<> {
Expand Down Expand Up @@ -119,7 +119,7 @@ void CalibratedElectronProducerT<T>::fillDescriptions(edm::ConfigurationDescript
desc.add<bool>("semiDeterministic", true);
std::vector<std::string> valMapsProduced;
valMapsProduced.reserve(valMapsToStore_.size());
for (auto varToStore : valMapsToStore_)
for (auto varToStore : valMapsToStore_)
valMapsProduced.push_back(EGEnergySysIndex::name(varToStore));
desc.add<std::vector<std::string>>("valueMapsStored", valMapsProduced)
->setComment(
Expand Down
4 changes: 2 additions & 2 deletions RecoEgamma/EgammaTools/plugins/CalibratedPhotonProducers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <memory>

#include <random>
#include <vector>
#include <vector>

template <typename T>
class CalibratedPhotonProducerT : public edm::stream::EDProducer<> {
Expand Down Expand Up @@ -109,7 +109,7 @@ void CalibratedPhotonProducerT<T>::fillDescriptions(edm::ConfigurationDescriptio
desc.add<bool>("semiDeterministic", true);
std::vector<std::string> valMapsProduced;
valMapsProduced.reserve(valMapsToStore_.size());
for (auto varToStore : valMapsToStore_)
for (auto varToStore : valMapsToStore_)
valMapsProduced.push_back(EGEnergySysIndex::name(varToStore));
desc.add<std::vector<std::string>>("valueMapsStored", valMapsProduced)
->setComment(
Expand Down
1 change: 0 additions & 1 deletion RecoEgamma/EgammaTools/src/EgammaPCAHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <iostream>
#include <memory>


using namespace hgcal;

EGammaPCAHelper::EGammaPCAHelper()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ float ElectronMVAEstimatorRun2::mvaValue(const reco::Candidate* candidate,
std::vector<float> vars;

vars.reserve(nVariables_[iCategory]);
for (int i = 0; i < nVariables_[iCategory]; ++i) {
for (int i = 0; i < nVariables_[iCategory]; ++i) {
vars.push_back(mvaVarMngr_.getValue(variables_[iCategory][i], *electron, auxVariables));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ float PhotonMVAEstimator::mvaValue(const reco::Candidate* candPtr,
std::vector<float> vars;

vars.reserve(nVariables_[iCategory]);
for (int i = 0; i < nVariables_[iCategory]; ++i) {
for (int i = 0; i < nVariables_[iCategory]; ++i) {
vars.push_back(mvaVarMngr_.getValue(variables_[iCategory][i], *phoPtr, auxVars));
}

Expand Down
2 changes: 1 addition & 1 deletion RecoHI/HiJetAlgos/src/HiGenCleaner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void HiGenCleaner<T2>::produce(edm::StreamID, edm::Event& iEvent, const edm::Eve

vector<int> selection;
selection.reserve(jetsize);
for (int ijet = 0; ijet < jetsize; ++ijet) {
for (int ijet = 0; ijet < jetsize; ++ijet) {
selection.push_back(-1);
}

Expand Down
5 changes: 1 addition & 4 deletions RecoJets/FFTJetAlgorithms/src/LinInterpolatedTable1D.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include <memory>



#include "RecoJets/FFTJetAlgorithms/interface/LinInterpolatedTable1D.h"

namespace fftjetcms {
Expand Down Expand Up @@ -58,8 +56,7 @@ namespace fftjetcms {
points.push_back(std::pair<double, double>(data_[0], xmin_));
}

return std::make_unique<LinInterpolatedTable1D>(
points, npoints, leftExtrapolationLinear, rightExtrapolationLinear);
return std::make_unique<LinInterpolatedTable1D>(points, npoints, leftExtrapolationLinear, rightExtrapolationLinear);
}

double LinInterpolatedTable1D::operator()(const double& x) const {
Expand Down
1 change: 0 additions & 1 deletion RecoJets/FFTJetProducers/plugins/FFTJetEFlowSmoother.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <cmath>
#include <memory>


// FFTJet headers
#include "fftjet/FrequencyKernelConvolver.hh"
#include "fftjet/DiscreteGauss2d.hh"
Expand Down
1 change: 0 additions & 1 deletion RecoJets/FFTJetProducers/plugins/FFTJetPatRecoProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <fstream>
#include <memory>


// FFTJet headers
#include "fftjet/ProximityClusteringTree.hh"
#include "fftjet/ClusteringSequencer.hh"
Expand Down
4 changes: 1 addition & 3 deletions RecoJets/FFTJetProducers/plugins/FFTJetPileupProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <fstream>
#include <memory>


// FFTJet headers
#include "fftjet/FrequencyKernelConvolver.hh"
#include "fftjet/DiscreteGauss2d.hh"
Expand Down Expand Up @@ -163,8 +162,7 @@ FFTJetPileupProcessor::FFTJetPileupProcessor(const edm::ParameterSet& ps)
if (minScale <= 0.0 || maxScale < minScale || nScales == 0U)
throw cms::Exception("FFTJetBadConfig") << "invalid filter scales" << std::endl;

filterScales =
std::make_unique<fftjet::EquidistantInLogSpace>(minScale, maxScale, nScales);
filterScales = std::make_unique<fftjet::EquidistantInLogSpace>(minScale, maxScale, nScales);

percentileData.resize(nScales * nPercentiles);

Expand Down
1 change: 0 additions & 1 deletion RecoJets/FFTJetProducers/plugins/FFTJetProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <iostream>
#include <memory>


#include "fftjet/peakEtLifetime.hh"

// Header for this class
Expand Down
2 changes: 1 addition & 1 deletion RecoJets/FFTJetProducers/plugins/FFTJetTreeDump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <fstream>
#include <functional>
#include <sstream>
#include <sstream>

// FFTJet headers
#include "fftjet/ProximityClusteringTree.hh"
Expand Down
Loading

0 comments on commit f0b288d

Please sign in to comment.