Skip to content

Commit

Permalink
cleaned up by clang-tidy 4.0.0 modernize checks
Browse files Browse the repository at this point in the history
Enabled checks:
    boost-use-to-string
    cppcoreguidelines-no-malloc
    google-build-explicit-make-pair
    misc-inefficient-algorithm
    misc-string-compare
    modernize-avoid-bind
    modernize-deprecated-headers
    modernize-loop-convert
    modernize-make-shared
    modernize-make-unique
    modernize-pass-by-value
    modernize-redundant-void-arg
    modernize-replace-auto-ptr
    modernize-shrink-to-fit
    modernize-use-auto
    modernize-use-bool-literals
    modernize-use-emplace
    modernize-use-equals-default
    modernize-use-equals-delete
    modernize-use-nullptr
    modernize-use-override
    modernize-use-transparent-functors
    modernize-use-using
    performance-faster-string-find
    performance-for-range-copy
    performance-implicit-cast-in-loop
    performance-inefficient-string-concatenation
    performance-type-promotion-in-math-fn
    performance-unnecessary-copy-initialization
    performance-unnecessary-value-paramnnSee http://releases.llvm.org/4.0.0/tools/clang/tools/extra/docs/clang-tidy/index.html for details.
  • Loading branch information
fwyzard committed Jul 27, 2017
1 parent 2eb497d commit 6fb1e35
Show file tree
Hide file tree
Showing 126 changed files with 1,600 additions and 1,648 deletions.
75 changes: 36 additions & 39 deletions DQMOffline/Trigger/interface/BTVHLTOfflineSource.h
Expand Up @@ -10,49 +10,44 @@


// system include files
#include <fstream>
#include <iostream>
#include <memory>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include <unistd.h>

// user include files
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"

#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

#include "DataFormats/BTauReco/interface/JetTag.h"
#include "DataFormats/BTauReco/interface/SecondaryVertexTagInfo.h"
#include "DataFormats/Common/interface/TriggerResults.h"
#include "DataFormats/HLTReco/interface/TriggerEvent.h"
#include "DataFormats/HLTReco/interface/TriggerObject.h"
#include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"
#include "FWCore/Common/interface/TriggerNames.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "DataFormats/Common/interface/TriggerResults.h"
#include "DataFormats/HLTReco/interface/TriggerEvent.h"
#include "DataFormats/HLTReco/interface/TriggerObject.h"
#include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"

#include "FWCore/ServiceRegistry/interface/Service.h"
#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"

#include "DataFormats/BTauReco/interface/JetTag.h"
#include "DataFormats/BTauReco/interface/SecondaryVertexTagInfo.h"

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <sstream>

class BTVHLTOfflineSource : public DQMEDAnalyzer {
public:
explicit BTVHLTOfflineSource(const edm::ParameterSet&);
~BTVHLTOfflineSource();
~BTVHLTOfflineSource() override;

private:
virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const & run, edm::EventSetup const & c) override;
virtual void dqmBeginRun(edm::Run const& run, edm::EventSetup const& c) override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
void bookHistograms(DQMStore::IBooker &, edm::Run const & run, edm::EventSetup const & c) override;
void dqmBeginRun(edm::Run const& run, edm::EventSetup const& c) override;

bool verbose_;
std::string dirname_;
Expand Down Expand Up @@ -109,19 +104,21 @@ class BTVHLTOfflineSource : public DQMEDAnalyzer {
};


~PathInfo() {};
~PathInfo() = default;;
PathInfo(int prescaleUsed,
std::string pathName,
std::string filterName,
std::string processName,
size_t type,
std::string triggerType):
prescaleUsed_(prescaleUsed),
pathName_(pathName),
filterName_(filterName),
processName_(processName),
pathName_(std::move(pathName)),
filterName_(std::move(filterName)),
processName_(std::move(processName)),
objectType_(type),
triggerType_(triggerType){};
triggerType_(std::move(triggerType))
{
}

MonitorElement * getMEhisto_CSV() { return CSV_;}
MonitorElement * getMEhisto_Pt() { return Pt_; }
Expand All @@ -132,33 +129,33 @@ class BTVHLTOfflineSource : public DQMEDAnalyzer {
MonitorElement * getMEhisto_PVz_HLTMinusRECO() { return PVz_HLTMinusRECO_;}
MonitorElement * getMEhisto_fastPVz_HLTMinusRECO() { return fastPVz_HLTMinusRECO_;}

const std::string getLabel(void ) const {
const std::string getLabel( ) const {
return filterName_;
}
void setLabel(std::string labelName){
filterName_ = labelName;
filterName_ = std::move(labelName);
return;
}
const std::string getPath(void ) const {
const std::string getPath( ) const {
return pathName_;
}
const int getprescaleUsed(void) const {
const int getprescaleUsed() const {
return prescaleUsed_;
}
const std::string getProcess(void ) const {
const std::string getProcess( ) const {
return processName_;
}
const int getObjectType(void ) const {
const int getObjectType( ) const {
return objectType_;
}
const std::string getTriggerType(void ) const {
const std::string getTriggerType( ) const {
return triggerType_;
}
const edm::InputTag getTag(void) const{
const edm::InputTag getTag() const{
edm::InputTag tagName(filterName_,"",processName_);
return tagName;
}
bool operator==(const std::string v)
bool operator==(const std::string& v)
{
return v==pathName_;
}
Expand Down Expand Up @@ -187,7 +184,7 @@ class BTVHLTOfflineSource : public DQMEDAnalyzer {
public:
PathInfoCollection(): std::vector<PathInfo>()
{};
std::vector<PathInfo>::iterator find(std::string pathName) {
std::vector<PathInfo>::iterator find(const std::string& pathName) {
return std::find(begin(), end(), pathName);
}
};
Expand Down
16 changes: 8 additions & 8 deletions DQMOffline/Trigger/interface/DQMOfflineHLTEventInfoClient.h
Expand Up @@ -26,31 +26,31 @@ class DQMOfflineHLTEventInfoClient: public edm::EDAnalyzer {
DQMOfflineHLTEventInfoClient(const edm::ParameterSet& ps);

/// Destructor
virtual ~DQMOfflineHLTEventInfoClient();
~DQMOfflineHLTEventInfoClient() override;

protected:

/// BeginJob
void beginJob();
void beginJob() override;

/// BeginRun
void beginRun(const edm::Run& r, const edm::EventSetup& c);
void beginRun(const edm::Run& r, const edm::EventSetup& c) override;

/// Fake Analyze
void analyze(const edm::Event& e, const edm::EventSetup& c) ;
void analyze(const edm::Event& e, const edm::EventSetup& c) override ;

void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
const edm::EventSetup& context) ;
const edm::EventSetup& context) override ;

/// DQM Client Diagnostic
void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
const edm::EventSetup& c);
const edm::EventSetup& c) override;

/// EndRun
void endRun(const edm::Run& r, const edm::EventSetup& c);
void endRun(const edm::Run& r, const edm::EventSetup& c) override;

/// Endjob
void endJob();
void endJob() override;

private:

Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Trigger/interface/EgHLTBinData.h
Expand Up @@ -28,7 +28,7 @@ namespace egHLT {
};


BinData(){}
BinData()= default;
explicit BinData(const edm::ParameterSet& conf){setup(conf);}
void setup(const edm::ParameterSet& conf);

Expand Down
6 changes: 3 additions & 3 deletions DQMOffline/Trigger/interface/EgHLTComCodes.h
Expand Up @@ -15,9 +15,9 @@ namespace egHLT {
std::vector<std::pair<std::string,int> > _codeDefs;

public:
ComCodes(){}
ComCodes(const ComCodes& rhs):_codeDefs(rhs._codeDefs){}
~ComCodes(){}
ComCodes()= default;
ComCodes(const ComCodes& rhs)= default;
~ComCodes()= default;

//accessors
int getCode(const char *descript)const;
Expand Down

0 comments on commit 6fb1e35

Please sign in to comment.