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

Clang-tidy checks for RecoBTau #20824

Merged
merged 1 commit into from Oct 9, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions RecoBTau/JetCrystalsAssociator/src/JetCrystalsAssociator.cc
Expand Up @@ -68,10 +68,10 @@ class JetCrystalsAssociator : public edm::EDProducer {

public:
explicit JetCrystalsAssociator(const edm::ParameterSet&);
~JetCrystalsAssociator();
~JetCrystalsAssociator() override;


virtual void produce(edm::Event&, const edm::EventSetup&) override;
void produce(edm::Event&, const edm::EventSetup&) override;
private:
std::unique_ptr<JetCrystalsAssociationCollection> associate(
const edm::Handle<CaloJetCollection> & jets,
Expand Down Expand Up @@ -164,7 +164,7 @@ JetCrystalsAssociator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup
DetId id = theRecHit->detid();
const CaloCellGeometry* this_cell = EB->getGeometry(id);
if (this_cell) {
GlobalPoint posi = this_cell->getPosition();
const GlobalPoint& posi = this_cell->getPosition();
double energy = theRecHit->energy();
double eta = posi.eta();
double phi = posi.phi();
Expand All @@ -183,7 +183,7 @@ JetCrystalsAssociator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup
DetId id = theRecHit->detid();
const CaloCellGeometry* this_cell = EE->getGeometry(id);
if (this_cell) {
GlobalPoint posi = this_cell->getPosition();
const GlobalPoint& posi = this_cell->getPosition();
double energy = theRecHit->energy();
double eta = posi.eta();
double phi = posi.phi();
Expand Down
6 changes: 3 additions & 3 deletions RecoBTau/JetTagComputer/interface/GenericMVAJetTagComputer.h
Expand Up @@ -16,11 +16,11 @@ class JetTagComputerRecord;
class GenericMVAJetTagComputer : public JetTagComputer {
public:
GenericMVAJetTagComputer(const edm::ParameterSet &parameters);
virtual ~GenericMVAJetTagComputer();
~GenericMVAJetTagComputer() override;

virtual void initialize(const JetTagComputerRecord &);
void initialize(const JetTagComputerRecord &) override;

virtual float discriminator(const TagInfoHelper &info) const;
float discriminator(const TagInfoHelper &info) const override;

virtual reco::TaggingVariableList
taggingVariables(const reco::BaseTagInfo &tagInfo) const;
Expand Down
Expand Up @@ -24,7 +24,7 @@ class JetTagComputerESProducer: public edm::ESProducer {
m_jetTagComputer = std::make_shared<ConcreteJetTagComputer>(m_pset);
}

virtual ~JetTagComputerESProducer() {
~JetTagComputerESProducer() override {
}

std::shared_ptr<JetTagComputer> produce(const JetTagComputerRecord & record) {
Expand Down
2 changes: 1 addition & 1 deletion RecoBTau/JetTagComputer/plugins/JetTagProducer.cc
Expand Up @@ -132,7 +132,7 @@ JetTagProducer::produce(Event& iEvent, const EventSetup& iSetup)
// take first tagInfo
Handle< View<BaseTagInfo> > &tagInfoHandle = tagInfoHandles[0];
std::unique_ptr<JetTagCollection> jetTagCollection;
if (tagInfoHandle.product()->size() > 0) {
if (!tagInfoHandle.product()->empty()) {
RefToBase<Jet> jj = tagInfoHandle->begin()->jet();
jetTagCollection = std::make_unique<JetTagCollection>(edm::makeRefToBaseProdFrom(jj, iEvent));
} else
Expand Down
4 changes: 2 additions & 2 deletions RecoBTau/JetTagComputer/plugins/JetTagProducer.h
Expand Up @@ -22,11 +22,11 @@
class JetTagProducer : public edm::stream::EDProducer<> {
public:
explicit JetTagProducer(const edm::ParameterSet&);
~JetTagProducer();
~JetTagProducer() override;
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:
virtual void produce(edm::Event&, const edm::EventSetup&);
void produce(edm::Event&, const edm::EventSetup&) override;

std::string m_jetTagComputer;
std::vector<edm::EDGetTokenT<edm::View<reco::BaseTagInfo> > > token_tagInfos;
Expand Down
2 changes: 1 addition & 1 deletion RecoBTau/JetTagComputer/src/GenericMVAComputerCache.cc
Expand Up @@ -52,7 +52,7 @@ GenericMVAComputer const* GenericMVAComputerCache::getComputer(int index) const
<< "Calibration record " << errorUpdatingLabel
<< " not found in MVAComputerContainer." << std::endl;
}
return index >= 0 ? computers[index].computer.get() : 0;
return index >= 0 ? computers[index].computer.get() : nullptr;
}

bool GenericMVAComputerCache::isEmpty() const {
Expand Down