Skip to content

Commit

Permalink
Merge pull request #20778 from davidlange6/clangTidyCleanT2_Calibration
Browse files Browse the repository at this point in the history
Clang-tidy checks for Calibration
  • Loading branch information
cmsbuild committed Oct 7, 2017
2 parents 073022d + d383179 commit 069ac49
Show file tree
Hide file tree
Showing 106 changed files with 454 additions and 454 deletions.
Expand Up @@ -49,11 +49,11 @@ class AlCaECALRecHitReducer : public edm::EDProducer {
public:
//! ctor
explicit AlCaECALRecHitReducer(const edm::ParameterSet&);
~AlCaECALRecHitReducer();
~AlCaECALRecHitReducer() override;


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

private:
// ----------member data ---------------------------
Expand Down
Expand Up @@ -39,9 +39,9 @@ class AlCaElectronTracksReducer : public edm::EDProducer {
public:

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

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

private:
// ----------member data ---------------------------
Expand Down
4 changes: 2 additions & 2 deletions Calibration/EcalAlCaRecoProducers/plugins/PUDumper.h
Expand Up @@ -25,14 +25,14 @@ class PUDumper : public edm::EDAnalyzer
explicit PUDumper(const edm::ParameterSet&);

//! dtor
~PUDumper();
~PUDumper() override;



private:

//! the actual analyze method
virtual void analyze(const edm::Event&, const edm::EventSetup&);
void analyze(const edm::Event&, const edm::EventSetup&) override;



Expand Down
Expand Up @@ -335,7 +335,7 @@ void SelectedElectronFEDListProducer<TEle,TCand>::produce(edm::Event & iEvent, c
// take the calo tower collection
edm::Handle<HBHERecHitCollection> hbheRecHitHandle;
if(!(HBHERecHitTag_ == edm::InputTag(""))) iEvent.getByToken(hbheRecHitToken_,hbheRecHitHandle);
const HBHERecHitCollection* hcalRecHitCollection = NULL;
const HBHERecHitCollection* hcalRecHitCollection = nullptr;
if(!hbheRecHitHandle.failedToGet()) hcalRecHitCollection = hbheRecHitHandle.product();

double radTodeg = 180. / Geom::pi();
Expand Down
Expand Up @@ -80,7 +80,7 @@ template<typename TEle, typename TCand>
public:

explicit SelectedElectronFEDListProducer( const edm::ParameterSet &);
virtual ~SelectedElectronFEDListProducer();
~SelectedElectronFEDListProducer() override;

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

Expand All @@ -89,7 +89,7 @@ template<typename TEle, typename TCand>

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


private:
Expand Down
4 changes: 2 additions & 2 deletions Calibration/EcalAlCaRecoProducers/src/ValueMapTraslator.cc
Expand Up @@ -45,12 +45,12 @@ class ValueMapTraslator : public edm::EDProducer {

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

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

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

// ----------member data ---------------------------
edm::InputTag referenceCollectionTAG,oldreferenceCollectionTAG;
Expand Down
4 changes: 2 additions & 2 deletions Calibration/EcalCalibAlgos/interface/ClusterFillMap.h
Expand Up @@ -18,15 +18,15 @@ class ClusterFillMap : public VFillMap
EcalIntercalibConstantMap *);

//!dtor
~ClusterFillMap ();
~ClusterFillMap () override;

//!Fills the map
void fillMap (const std::vector<std::pair<DetId,float> > &,
const DetId,
const EcalRecHitCollection *,
const EcalRecHitCollection *,
std::map<int,double> & xtlMap,
double & ) ;
double & ) override ;
};
#endif
#endif
12 changes: 6 additions & 6 deletions Calibration/EcalCalibAlgos/interface/EcalEleCalibLooper.h
Expand Up @@ -35,12 +35,12 @@ class EcalEleCalibLooper : public edm::EDLooper {
//! ctor
explicit EcalEleCalibLooper(const edm::ParameterSet&);
//! dtor
~EcalEleCalibLooper();
void beginOfJob() ;
void endOfJob();
void startingNewLoop(unsigned int) ;
Status duringLoop(const edm::Event&, const edm::EventSetup&) ;
Status endOfLoop(const edm::EventSetup&,unsigned int iCounter) ;
~EcalEleCalibLooper() override;
void beginOfJob() override ;
void endOfJob() override;
void startingNewLoop(unsigned int) override ;
Status duringLoop(const edm::Event&, const edm::EventSetup&) override ;
Status endOfLoop(const edm::EventSetup&,unsigned int iCounter) override ;


private:
Expand Down
8 changes: 4 additions & 4 deletions Calibration/EcalCalibAlgos/interface/ElectronCalibration.h
Expand Up @@ -47,11 +47,11 @@
class ElectronCalibration : public edm::EDAnalyzer {
public:
explicit ElectronCalibration(const edm::ParameterSet&);
~ElectronCalibration();
~ElectronCalibration() override;

virtual void analyze(const edm::Event&, const edm::EventSetup&);
virtual void beginJob();
virtual void endJob();
void analyze(const edm::Event&, const edm::EventSetup&) override;
void beginJob() override;
void endJob() override;
private:

EBDetId findMaxHit(edm::Handle<EBRecHitCollection> &);
Expand Down
10 changes: 5 additions & 5 deletions Calibration/EcalCalibAlgos/interface/ElectronCalibrationUniv.h
Expand Up @@ -57,12 +57,12 @@
class ElectronCalibrationUniv : public edm::EDAnalyzer {
public:
explicit ElectronCalibrationUniv(const edm::ParameterSet&);
~ElectronCalibrationUniv();
~ElectronCalibrationUniv() override;

virtual void analyze(const edm::Event&, const edm::EventSetup&);
virtual void beginJob();
virtual void beginRun(edm::Run const &, edm::EventSetup const&);
virtual void endJob();
void analyze(const edm::Event&, const edm::EventSetup&) override;
void beginJob() override;
void beginRun(edm::Run const &, edm::EventSetup const&) override;
void endJob() override;
private:
DetId findMaxHit(const std::vector<DetId> & v1,const EBRecHitCollection *EBhits,const EERecHitCollection *EEhits);
bool TestEEvalidDetId(int crystal_ix, int crystal_iy, int iz);
Expand Down
Expand Up @@ -29,9 +29,9 @@ class ElectronRecalibSuperClusterAssociator : public edm::EDProducer

explicit ElectronRecalibSuperClusterAssociator(const edm::ParameterSet& conf);

virtual ~ElectronRecalibSuperClusterAssociator();
~ElectronRecalibSuperClusterAssociator() override;

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

private:
edm::InputTag electronSrc_;
Expand Down
8 changes: 4 additions & 4 deletions Calibration/EcalCalibAlgos/interface/IMACalibBlock.h
Expand Up @@ -25,19 +25,19 @@ class IMACalibBlock : public VEcalCalibBlock
//! ctor
IMACalibBlock (const int) ;
//! dtor
~IMACalibBlock () ;
~IMACalibBlock () override ;

//! insert an entry
void Fill (std::map<int,double>::const_iterator,
std::map<int,double>::const_iterator,
double pTk,
double pSubtract,
double sigma = 1.) ;
double sigma = 1.) override ;

//! reset the chi2 matrices
void reset () ;
void reset () override ;
//! solve the chi2 linear system
int solve (int usingBlockSolver, double min, double max) ;
int solve (int usingBlockSolver, double min, double max) override ;
private :

//! give the size of a chi2 matrix
Expand Down
12 changes: 6 additions & 6 deletions Calibration/EcalCalibAlgos/interface/InvRingCalib.h
Expand Up @@ -30,12 +30,12 @@ class InvRingCalib : public edm::EDLooper {
//! ctor
explicit InvRingCalib(const edm::ParameterSet&);
//! dtor
~InvRingCalib();
void beginOfJob() ;
void endOfJob();
void startingNewLoop(unsigned int) ;
Status duringLoop(const edm::Event&, const edm::EventSetup&) ;
Status endOfLoop(const edm::EventSetup&,unsigned int iCounter) ;
~InvRingCalib() override;
void beginOfJob() override ;
void endOfJob() override;
void startingNewLoop(unsigned int) override ;
Status duringLoop(const edm::Event&, const edm::EventSetup&) override ;
Status endOfLoop(const edm::EventSetup&,unsigned int iCounter) override ;

//end

Expand Down
8 changes: 4 additions & 4 deletions Calibration/EcalCalibAlgos/interface/L3CalibBlock.h
Expand Up @@ -28,21 +28,21 @@ class L3CalibBlock : public VEcalCalibBlock
L3CalibBlock (const int numberOfElements,
const int keventweight = 1) ;
//! dtor
~L3CalibBlock () ;
~L3CalibBlock () override ;

//! insert an entry
void Fill (std::map<int,double>::const_iterator,
std::map<int,double>::const_iterator,
double pTk,
double pSubtract,
double sigma = 1.) ;
double sigma = 1.) override ;

//! reset the calib objects
void reset () ;
void reset () override ;
//! To retrieve the coefficients
double at ( int);
//! get the coefficients
int solve (int usingBlockSolver, double min, double max) ;
int solve (int usingBlockSolver, double min, double max) override ;

private :

Expand Down
4 changes: 2 additions & 2 deletions Calibration/EcalCalibAlgos/interface/MatrixFillMap.h
Expand Up @@ -17,13 +17,13 @@ class MatrixFillMap : public VFillMap
EcalIntercalibConstantMap *,
EcalIntercalibConstantMap *);
//! dtor
~MatrixFillMap ();
~MatrixFillMap () override;
void fillMap (const std::vector<std::pair<DetId,float> > &,
const DetId,
const EcalRecHitCollection *,
const EcalRecHitCollection *,
std::map<int,double> & xtlMap,
double & ) ;
double & ) override ;
private:
//! takes care of the Barrel
void fillEBMap (EBDetId ,
Expand Down
12 changes: 6 additions & 6 deletions Calibration/EcalCalibAlgos/interface/PhiSymmetryCalibration.h
Expand Up @@ -41,19 +41,19 @@ class PhiSymmetryCalibration : public edm::EDAnalyzer
PhiSymmetryCalibration( const edm::ParameterSet& iConfig );

/// Destructor
~PhiSymmetryCalibration();
~PhiSymmetryCalibration() override;

/// Called at beginning of job
virtual void beginJob();
virtual void endRun(edm::Run const&, const edm::EventSetup&);
void endLuminosityBlock(edm::LuminosityBlock const& ,edm::EventSetup const&);
void beginJob() override;
void endRun(edm::Run const&, const edm::EventSetup&) override;
void endLuminosityBlock(edm::LuminosityBlock const& ,edm::EventSetup const&) override;


/// Called at end of job
virtual void endJob();
void endJob() override;

/// Called at each event
virtual void analyze( const edm::Event&, const edm::EventSetup& );
void analyze( const edm::Event&, const edm::EventSetup& ) override;

///
void setUp(const edm::EventSetup& setup);
Expand Down
Expand Up @@ -64,25 +64,25 @@ class Pi0FixedMassWindowCalibration : public edm::ESProducerLooper
Pi0FixedMassWindowCalibration( const edm::ParameterSet& iConfig );

/// Destructor
~Pi0FixedMassWindowCalibration();
~Pi0FixedMassWindowCalibration() override;

/// Dummy implementation (job done in duringLoop)
virtual void produce(edm::Event&, const edm::EventSetup&) {};

/// Called at beginning of job
virtual void beginOfJob();
void beginOfJob() override;

/// Called at end of job
virtual void endOfJob();
void endOfJob() override;

/// Called at beginning of loop
virtual void startingNewLoop( unsigned int iLoop );
void startingNewLoop( unsigned int iLoop ) override;

/// Called at end of loop
virtual Status endOfLoop( const edm::EventSetup&, unsigned int iLoop );
Status endOfLoop( const edm::EventSetup&, unsigned int iLoop ) override;

/// Called at each event
virtual Status duringLoop( const edm::Event&, const edm::EventSetup& );
Status duringLoop( const edm::Event&, const edm::EventSetup& ) override;

private:

Expand Down
12 changes: 6 additions & 6 deletions Calibration/EcalCalibAlgos/interface/ZeeCalibration.h
Expand Up @@ -77,25 +77,25 @@ class ZeeCalibration : public edm::ESProducerLooper {
ZeeCalibration( const edm::ParameterSet& iConfig );

/// Destructor
~ZeeCalibration();
~ZeeCalibration() override;

/// Dummy implementation (job done in duringLoop)
virtual void produce(edm::Event&, const edm::EventSetup&) {};

/// Called at beginning of job
virtual void beginOfJob();
void beginOfJob() override;

/// Called at end of job
virtual void endOfJob();
void endOfJob() override;

/// Called at beginning of loop
virtual void startingNewLoop( unsigned int iLoop );
void startingNewLoop( unsigned int iLoop ) override;

/// Called at end of loop
virtual Status endOfLoop( const edm::EventSetup&, unsigned int iLoop );
Status endOfLoop( const edm::EventSetup&, unsigned int iLoop ) override;

/// Called at each event
virtual Status duringLoop( const edm::Event&, const edm::EventSetup& );
Status duringLoop( const edm::Event&, const edm::EventSetup& ) override;

/// Produce Ecal interCalibrations
virtual std::shared_ptr<EcalIntercalibConstants> produceEcalIntercalibConstants( const EcalIntercalibConstantsRcd& iRecord );
Expand Down
8 changes: 4 additions & 4 deletions Calibration/EcalCalibAlgos/interface/miscalibExample.h
Expand Up @@ -36,11 +36,11 @@
class miscalibExample : public edm::EDAnalyzer {
public:
explicit miscalibExample(const edm::ParameterSet&);
~miscalibExample();
~miscalibExample() override;

virtual void analyze(const edm::Event&, const edm::EventSetup&);
virtual void beginJob();
virtual void endJob();
void analyze(const edm::Event&, const edm::EventSetup&) override;
void beginJob() override;
void endJob() override;
private:


Expand Down
4 changes: 2 additions & 2 deletions Calibration/EcalCalibAlgos/src/EcalEleCalibLooper.cc
Expand Up @@ -221,7 +221,7 @@ EcalEleCalibLooper::duringLoop (const edm::Event& iEvent,


//take the collection of recHits in the barrel
const EBRecHitCollection* barrelHitsCollection = 0;
const EBRecHitCollection* barrelHitsCollection = nullptr;
edm::Handle<EBRecHitCollection> barrelRecHitsHandle ;
iEvent.getByLabel (m_barrelAlCa, barrelRecHitsHandle) ;
barrelHitsCollection = barrelRecHitsHandle.product () ;
Expand All @@ -231,7 +231,7 @@ EcalEleCalibLooper::duringLoop (const edm::Event& iEvent,
}

//take the collection of rechis in the endcap
const EERecHitCollection * endcapHitsCollection = 0 ;
const EERecHitCollection * endcapHitsCollection = nullptr ;
edm::Handle<EERecHitCollection> endcapRecHitsHandle ;
iEvent.getByLabel (m_endcapAlCa, endcapRecHitsHandle) ;
endcapHitsCollection = endcapRecHitsHandle.product () ;
Expand Down
4 changes: 2 additions & 2 deletions Calibration/EcalCalibAlgos/src/ElectronCalibration.cc
Expand Up @@ -431,9 +431,9 @@ void ElectronCalibration::analyze(const edm::Event& iEvent, const edm::EventSetu
if(read_events%1000 ==0)std::cout << "read_events = " << read_events << std::endl;

if(!hits)return;
if(hits->size() == 0)return;
if(hits->empty())return;
if(!electronCollection)return;
if(electronCollection->size() == 0)return;
if(electronCollection->empty())return;


////////////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 069ac49

Please sign in to comment.