Skip to content

Commit

Permalink
code-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetruc committed Sep 13, 2017
1 parent 5db31d6 commit 852157f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions DataFormats/PatCandidates/src/PackedCandidate.cc
Expand Up @@ -299,11 +299,11 @@ bool pat::PackedCandidate::overlap( const reco::Candidate & o ) const {
}

const reco::Candidate * pat::PackedCandidate::daughter( size_type ) const {
return 0;
return nullptr;
}

const reco::Candidate * pat::PackedCandidate::mother( size_type ) const {
return 0;
return nullptr;
}

const reco::Candidate * pat::PackedCandidate::daughter(const std::string&) const {
Expand All @@ -321,7 +321,7 @@ reco::Candidate * pat::PackedCandidate::daughter(const std::string&) {


reco::Candidate * pat::PackedCandidate::daughter( size_type ) {
return 0;
return nullptr;
}

double pat::PackedCandidate::vertexChi2() const {
Expand Down
Expand Up @@ -42,13 +42,13 @@ class PhotonIDValueMapProducer : public edm::stream::EDProducer<> {
public:

explicit PhotonIDValueMapProducer(const edm::ParameterSet&);
~PhotonIDValueMapProducer();
~PhotonIDValueMapProducer() override;

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:

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

void writeValueMap(edm::Event &iEvent,
const edm::Handle<edm::View<reco::Photon> > & handle,
Expand Down Expand Up @@ -269,7 +269,7 @@ void PhotonIDValueMapProducer::produce(edm::Event& iEvent, const edm::EventSetup
if( !pfCandidatesHandle.isValid() )
iEvent.getByToken(pfCandidatesTokenMiniAOD_, pfCandidatesHandle);

if( !isAOD && src->size() ) {
if( !isAOD && !src->empty() ) {
edm::Ptr<pat::Photon> test(src->ptrAt(0));
if( test.isNull() || !test.isAvailable() ) {
throw cms::Exception("InvalidConfiguration")
Expand Down Expand Up @@ -519,7 +519,7 @@ ::computeWorstPFChargedIsolation(const T& photon, const U& pfCandidates,
allIsolations.push_back(sum);
}

if( allIsolations.size()>0 )
if( !allIsolations.empty() )
worstIsolation = * std::max_element( allIsolations.begin(), allIsolations.end() );

return worstIsolation;
Expand Down

0 comments on commit 852157f

Please sign in to comment.