Skip to content
Snippets Groups Projects
Commit 23754a7e authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'traittweaks' into 'master'

Class trait optimization

See merge request atlas/athena!35675
parents 235023e6 e7ddd307
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!35675Class trait optimization
......@@ -16,14 +16,9 @@ class CaloBadChannel {
CaloBadChannel( BitWord rawStatus) : m_word(rawStatus) {}
CaloBadChannel() : m_word(0) {}
CaloBadChannel(const CaloBadChannel& rBad) {m_word=rBad.m_word;}
CaloBadChannel(const CaloBadChannel& rBad) = default;
CaloBadChannel(const CaloBadChannel* pBad) {m_word=pBad->m_word;}
CaloBadChannel& operator= (const CaloBadChannel& rBad) {
if (this != &rBad) {
m_word = rBad.m_word;
}
return *this;
}
CaloBadChannel& operator= (const CaloBadChannel& rBad) = default;
bool statusOK( ProblemType pb) const {
BitWord mask = 1 << (PosType) pb;
......
......@@ -82,9 +82,13 @@ class CaloLocalHadCoeff {
/**
* @brief Copy constructor
*/
LocalHadDimension(const LocalHadDimension &other);
LocalHadDimension& operator= (const LocalHadDimension &other);
LocalHadDimension(const LocalHadDimension &other) = default;
LocalHadDimension& operator= (const LocalHadDimension &other) = default;
/**
* @brief Move constructor
*/
LocalHadDimension( LocalHadDimension &&) noexcept = default;
LocalHadDimension& operator= ( LocalHadDimension &&) noexcept = default;
// access methods
/// return dimension type
......@@ -157,8 +161,10 @@ class CaloLocalHadCoeff {
/**
* @brief Copy constructor
*/
LocalHadArea(const LocalHadArea &other);
LocalHadArea& operator= (const LocalHadArea &other);
LocalHadArea(const LocalHadArea &other) = default;
LocalHadArea& operator= (const LocalHadArea &other) = default;
LocalHadArea( LocalHadArea &&other) noexcept = default;
LocalHadArea& operator= ( LocalHadArea &&other) noexcept = default;
/// return area type
inline unsigned int getType() const { return m_type; }
......@@ -220,8 +226,11 @@ class CaloLocalHadCoeff {
/**
* @brief Copy constructor.
*/
CaloLocalHadCoeff(const CaloLocalHadCoeff &other);
CaloLocalHadCoeff& operator= (const CaloLocalHadCoeff &other);
CaloLocalHadCoeff(const CaloLocalHadCoeff &other) = default;
CaloLocalHadCoeff& operator= (const CaloLocalHadCoeff &other) = default;
//Move operators
CaloLocalHadCoeff(CaloLocalHadCoeff &&) noexcept = default;
CaloLocalHadCoeff& operator= (CaloLocalHadCoeff &&) noexcept = default;
//
// general access methods
......
......@@ -21,32 +21,6 @@
LocalHadDimension ->
*************************************************************************** */
// copy constructor
CaloLocalHadCoeff::LocalHadDimension::LocalHadDimension(const CaloLocalHadCoeff::LocalHadDimension &other)
: m_title (other.m_title),
m_type (other.m_type),
m_nbins (other.m_nbins),
m_xmin (other.m_xmin),
m_xmax (other.m_xmax),
m_dx (other.m_dx),
m_xbins (other.m_xbins)
{
}
CaloLocalHadCoeff::LocalHadDimension&
CaloLocalHadCoeff::LocalHadDimension::operator= (const CaloLocalHadCoeff::LocalHadDimension &other)
{
if (this != &other) {
m_title = other.m_title;
m_type = other.m_type;
m_nbins = other.m_nbins;
m_xmin = other.m_xmin;
m_xmax = other.m_xmax;
m_dx = other.m_dx;
m_xbins = other.m_xbins;
}
return *this;
}
// return bin number for cluster variable
int CaloLocalHadCoeff::LocalHadDimension::getBin(float &x) const
......@@ -157,32 +131,6 @@ bool CaloLocalHadCoeff::isFilled(const int bin) const
/* ***************************************************************************
LocalHadArea ->
*************************************************************************** */
// copy constructor
CaloLocalHadCoeff::LocalHadArea::LocalHadArea(const CaloLocalHadCoeff::LocalHadArea &other)
: m_title (other.m_title),
m_type (other.m_type),
m_npars (other.m_npars),
m_offset (other.m_offset),
m_length (other.m_length),
m_dims (other.m_dims),
m_dims_loc (other.m_dims_loc)
{
}
CaloLocalHadCoeff::LocalHadArea&
CaloLocalHadCoeff::LocalHadArea::operator=(const CaloLocalHadCoeff::LocalHadArea &other)
{
if (this != &other) {
m_title = other.m_title;
m_type = other.m_type;
m_npars = other.m_npars;
m_offset = other.m_offset;
m_length = other.m_length;
m_dims = other.m_dims;
m_dims_loc = other.m_dims_loc;
}
return *this;
}
// add new dimension to the area
void CaloLocalHadCoeff::LocalHadArea::addDimension(CaloLocalHadCoeff::LocalHadDimension &dim)
......@@ -214,27 +162,9 @@ CaloLocalHadCoeff
// default constructor
CaloLocalHadCoeff::CaloLocalHadCoeff()
{
}
// copy constructor
CaloLocalHadCoeff::CaloLocalHadCoeff(const CaloLocalHadCoeff &other)
: m_title (other.m_title),
m_CoeffSet (other.m_CoeffSet),
m_AreaSet (other.m_AreaSet)
{
}
CaloLocalHadCoeff& CaloLocalHadCoeff::operator=(const CaloLocalHadCoeff &other)
{
if (this != &other) {
m_AreaSet = other.m_AreaSet;
m_CoeffSet = other.m_CoeffSet;
m_title = other.m_title;
}
return *this;
static_assert(std::is_nothrow_move_constructible<CaloLocalHadCoeff>::value);
static_assert(std::is_nothrow_move_constructible<LocalHadArea>::value);
static_assert(std::is_nothrow_move_constructible<LocalHadDimension>::value);
}
......
......@@ -9,14 +9,14 @@
#include<string>
class DetStatus {
class DetStatus final {
public:
DetStatus();
// constructor with parameters
DetStatus(const int fullcode,
const float deadfrac, const float deadthrust);
virtual ~DetStatus();
~DetStatus() = default;
// access functions
int code() const;
......@@ -31,8 +31,6 @@ class DetStatus {
float m_deadthrust;
};
inline DetStatus::~DetStatus() {}
inline int DetStatus::code() const { return m_code<0 ? m_code : m_code & 3; }
inline int DetStatus::fullCode() const { return m_code; }
inline float DetStatus::deadFrac() const { return m_deadfrac;}
......
......@@ -39,7 +39,7 @@ public:
double phiMin, double phiMax,
double etaMin, double etaMax);
~RegSelRoI() { }
~RegSelRoI() = default;
double getzMin() const { return m_zMin; }
double getzMax() const { return m_zMax; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment