diff --git a/CondCore/AlignmentPlugins/interface/AlignmentPayloadInspectorHelper.h b/CondCore/AlignmentPlugins/interface/AlignmentPayloadInspectorHelper.h index 3814fa6dcde52..80a44790c3c64 100644 --- a/CondCore/AlignmentPlugins/interface/AlignmentPayloadInspectorHelper.h +++ b/CondCore/AlignmentPlugins/interface/AlignmentPayloadInspectorHelper.h @@ -71,7 +71,9 @@ namespace AlignmentPI { PARTITION::TECp, PARTITION::TECm}; - std::ostream& operator<<(std::ostream& o, PARTITION x) { return o << std::underlying_type::type(x); } + inline std::ostream& operator<<(std::ostream& o, PARTITION x) { + return o << std::underlying_type::type(x); + } enum regions { BPixL1o, //0 Barrel Pixel Layer 1 outer @@ -149,7 +151,7 @@ namespace AlignmentPI { }; /*--------------------------------------------------------------------*/ - std::string getStringFromRegionEnum(AlignmentPI::regions e) + inline std::string getStringFromRegionEnum(AlignmentPI::regions e) /*--------------------------------------------------------------------*/ { switch (e) { @@ -300,7 +302,7 @@ namespace AlignmentPI { } /*--------------------------------------------------------------------*/ - bool isBPixOuterLadder(const DetId& detid, const TrackerTopology& tTopo, bool isPhase0) + inline bool isBPixOuterLadder(const DetId& detid, const TrackerTopology& tTopo, bool isPhase0) /*--------------------------------------------------------------------*/ { bool isOuter = false; @@ -344,7 +346,7 @@ namespace AlignmentPI { }; /*--------------------------------------------------------------------*/ - void topolInfo::printAll() + inline void topolInfo::printAll() /*--------------------------------------------------------------------*/ { std::cout << " detId:" << m_rawid << " subdetid: " << m_subdetid << " layer: " << m_layer << " side: " << m_side @@ -353,7 +355,7 @@ namespace AlignmentPI { } /*--------------------------------------------------------------------*/ - void topolInfo::init() + inline void topolInfo::init() /*--------------------------------------------------------------------*/ { m_rawid = 0; @@ -367,7 +369,7 @@ namespace AlignmentPI { }; /*--------------------------------------------------------------------*/ - bool topolInfo::sanityCheck() + inline bool topolInfo::sanityCheck() /*--------------------------------------------------------------------*/ { if (m_layer == 0 || (m_subdetid == 1 && m_layer > 4) || (m_subdetid == 2 && m_layer > 3)) { @@ -377,7 +379,7 @@ namespace AlignmentPI { } } /*--------------------------------------------------------------------*/ - void topolInfo::fillGeometryInfo(const DetId& detId, const TrackerTopology& tTopo, bool isPhase0) + inline void topolInfo::fillGeometryInfo(const DetId& detId, const TrackerTopology& tTopo, bool isPhase0) /*--------------------------------------------------------------------*/ { unsigned int subdetId = static_cast(detId.subdetId()); @@ -424,7 +426,7 @@ namespace AlignmentPI { // ------------ method to assign a partition based on the topology struct info --------------- /*--------------------------------------------------------------------*/ - AlignmentPI::regions topolInfo::filterThePartition() + inline AlignmentPI::regions topolInfo::filterThePartition() /*--------------------------------------------------------------------*/ { AlignmentPI::regions ret = AlignmentPI::NUM_OF_REGIONS; @@ -594,7 +596,7 @@ namespace AlignmentPI { } /*--------------------------------------------------------------------*/ - std::string getStringFromCoordinate(AlignmentPI::coordinate coord) + inline std::string getStringFromCoordinate(AlignmentPI::coordinate coord) /*--------------------------------------------------------------------*/ { switch (coord) { @@ -616,7 +618,7 @@ namespace AlignmentPI { } /*--------------------------------------------------------------------*/ - std::string getStringFromIndex(AlignmentPI::index i) + inline std::string getStringFromIndex(AlignmentPI::index i) /*--------------------------------------------------------------------*/ { switch (i) { @@ -638,7 +640,7 @@ namespace AlignmentPI { } /*--------------------------------------------------------------------*/ - std::string getStringFromPart(AlignmentPI::partitions i) + inline std::string getStringFromPart(AlignmentPI::partitions i) /*--------------------------------------------------------------------*/ { switch (i) { @@ -660,7 +662,7 @@ namespace AlignmentPI { } /*--------------------------------------------------------------------*/ - std::pair getIndices(AlignmentPI::index i) + inline std::pair getIndices(AlignmentPI::index i) /*--------------------------------------------------------------------*/ { switch (i) { @@ -682,7 +684,7 @@ namespace AlignmentPI { } /*--------------------------------------------------------------------*/ - void makeNicePlotStyle(TH1* hist, int color) + inline void makeNicePlotStyle(TH1* hist, int color) /*--------------------------------------------------------------------*/ { hist->SetStats(kFALSE); @@ -707,7 +709,7 @@ namespace AlignmentPI { } /*--------------------------------------------------------------------*/ - void makeNiceStats(TH1F* hist, AlignmentPI::partitions part, int color) + inline void makeNiceStats(TH1F* hist, AlignmentPI::partitions part, int color) /*--------------------------------------------------------------------*/ { char buffer[255]; @@ -740,7 +742,7 @@ namespace AlignmentPI { } /*--------------------------------------------------------------------*/ - std::pair getTheRange(std::map values, const float nsigma) + inline std::pair getTheRange(std::map values, const float nsigma) /*--------------------------------------------------------------------*/ { float sum = std::accumulate( @@ -765,7 +767,7 @@ namespace AlignmentPI { } /*--------------------------------------------------------------------*/ - std::pair calculatePosition(TVirtualPad* myPad, int boundary) + inline std::pair calculatePosition(TVirtualPad* myPad, int boundary) /*--------------------------------------------------------------------*/ { int ix1; @@ -850,16 +852,16 @@ namespace AlignmentPI { }; /*--------------------------------------------------------------------*/ - GlobalPoint TkAlBarycenters::getPartitionAvg(AlignmentPI::PARTITION p) + inline GlobalPoint TkAlBarycenters::getPartitionAvg(AlignmentPI::PARTITION p) /*--------------------------------------------------------------------*/ { return GlobalPoint(Xbarycenters[p], Ybarycenters[p], Zbarycenters[p]); } /*--------------------------------------------------------------------*/ - void TkAlBarycenters::computeBarycenters(const std::vector& input, - const TrackerTopology& tTopo, - const std::map& GPR) + inline void TkAlBarycenters::computeBarycenters(const std::vector& input, + const TrackerTopology& tTopo, + const std::map& GPR) /*--------------------------------------------------------------------*/ { for (const auto& ali : input) { diff --git a/CondCore/BeamSpotPlugins/interface/BeamSpotPayloadInspectorHelper.h b/CondCore/BeamSpotPlugins/interface/BeamSpotPayloadInspectorHelper.h index 37cb68ed40ef7..a0d992f6ee90e 100644 --- a/CondCore/BeamSpotPlugins/interface/BeamSpotPayloadInspectorHelper.h +++ b/CondCore/BeamSpotPlugins/interface/BeamSpotPayloadInspectorHelper.h @@ -20,7 +20,7 @@ namespace BeamSpotPI { - std::pair unpack(cond::Time_t since) { + inline std::pair unpack(cond::Time_t since) { auto kLowMask = 0XFFFFFFFF; auto run = (since >> 32); auto lumi = (since & kLowMask); @@ -46,7 +46,7 @@ namespace BeamSpotPI { }; /************************************************/ - std::string getStringFromParamEnum(const parameters& parameter) { + inline std::string getStringFromParamEnum(const parameters& parameter) { switch (parameter) { case X: return "X"; diff --git a/CondCore/EcalPlugins/plugins/ESDrawUtils.h b/CondCore/EcalPlugins/plugins/ESDrawUtils.h index 0531c44975194..8e74c5a7c2b57 100644 --- a/CondCore/EcalPlugins/plugins/ESDrawUtils.h +++ b/CondCore/EcalPlugins/plugins/ESDrawUtils.h @@ -1,7 +1,7 @@ #include "TH2F.h" #include "TLine.h" -void DrawES(int plane, int side) { +inline void DrawES(int plane, int side) { int ixF[172] = { 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 10, 10, 11, 11, 14, 14, // external upper crown (44) 16, 16, 26, 26, 28, 28, 31, 31, 32, 32, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, // external upper crown diff --git a/CondCore/EcalPlugins/plugins/EcalDrawUtils.h b/CondCore/EcalPlugins/plugins/EcalDrawUtils.h index 855cd7e09c7bc..8c2dcc9190441 100644 --- a/CondCore/EcalPlugins/plugins/EcalDrawUtils.h +++ b/CondCore/EcalPlugins/plugins/EcalDrawUtils.h @@ -1,7 +1,7 @@ #include "TH2F.h" #include "TLine.h" -void DrawEB(TH2F* ebmap, float min, float max) { +inline void DrawEB(TH2F* ebmap, float min, float max) { ebmap->SetXTitle("i#phi"); ebmap->SetYTitle("i#eta"); ebmap->GetXaxis()->SetNdivisions(-418, kFALSE); @@ -26,7 +26,7 @@ void DrawEB(TH2F* ebmap, float min, float max) { l->Draw(); } // DrawEB method -void DrawEE(TH2F* endc, float min, float max) { +inline void DrawEE(TH2F* endc, float min, float max) { int ixSectorsEE[202] = { 62, 62, 61, 61, 60, 60, 59, 59, 58, 58, 56, 56, 46, 46, 44, 44, 43, 43, 42, 42, 41, 41, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 46, 46, 56, 56, 58, 58, 59, 59, 60, 60, 61, 61, 62, 62, 0, 101, 101, 98, 98, 96, @@ -62,7 +62,7 @@ void DrawEE(TH2F* endc, float min, float max) { } } // DrawEE method -void DrawEE_Tower(TH2F* endc, TLine* l, double minScale, double maxScale) { +inline void DrawEE_Tower(TH2F* endc, TLine* l, double minScale, double maxScale) { endc->SetStats(false); endc->SetMinimum(minScale); endc->SetMaximum(maxScale); @@ -88,7 +88,7 @@ void DrawEE_Tower(TH2F* endc, TLine* l, double minScale, double maxScale) { } //draw EE in case of a tower -void drawTable(int nbRows, int nbColumns) { +inline void drawTable(int nbRows, int nbColumns) { TLine* l = new TLine; l->SetLineWidth(1); for (int i = 1; i < nbRows; i++) { diff --git a/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainerUtils.h b/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainerUtils.h index a1068a5a7bfe8..2b1f07a87c7a5 100644 --- a/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainerUtils.h +++ b/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainerUtils.h @@ -166,14 +166,14 @@ void fillEEMap_TwoIOVs(std::shared_ptr payload, } // validDetId } -void fillTableWithSummary(TH2F*& align, - std::string title, - const float& mean_x_EB, - const float& rms_EB, - const int& num_x_EB, - const float& mean_x_EE, - const float& rms_EE, - const int& num_x_EE) { +inline void fillTableWithSummary(TH2F*& align, + std::string title, + const float& mean_x_EB, + const float& rms_EB, + const int& num_x_EB, + const float& mean_x_EE, + const float& rms_EE, + const int& num_x_EE) { int NbRows = 2; align = new TH2F(title.c_str(), "EB/EE mean_x rms num_x", 4, 0, 4, NbRows, 0, NbRows); diff --git a/CondCore/EcalPlugins/plugins/EcalFunctionParametersUtils.h b/CondCore/EcalPlugins/plugins/EcalFunctionParametersUtils.h index 35624944bbad5..36933eb47dffd 100644 --- a/CondCore/EcalPlugins/plugins/EcalFunctionParametersUtils.h +++ b/CondCore/EcalPlugins/plugins/EcalFunctionParametersUtils.h @@ -2,7 +2,7 @@ #include #include -int countEmptyRows(std::vector& vec) { +inline int countEmptyRows(std::vector& vec) { int cnt = 0; for (std::vector::const_iterator it = vec.begin(); it != vec.end(); it++) if ((*it) == 0.0f) @@ -11,7 +11,7 @@ int countEmptyRows(std::vector& vec) { return cnt; } -void fillFunctionParamsValues( +inline void fillFunctionParamsValues( TH2F*& align, std::vector& m_params, std::string title, int& gridRows, int& NbColumns) { const int maxInCol = 25; int NbRows = 0; diff --git a/CondCore/HcalPlugins/interface/HcalObjRepresent.h b/CondCore/HcalPlugins/interface/HcalObjRepresent.h index 489aab34c5b52..6f70e6f7a43ad 100644 --- a/CondCore/HcalPlugins/interface/HcalObjRepresent.h +++ b/CondCore/HcalPlugins/interface/HcalObjRepresent.h @@ -481,7 +481,7 @@ namespace HcalObjRepresent { } }; - void drawTable(int nbRows, int nbColumns) { + inline void drawTable(int nbRows, int nbColumns) { TLine* l = new TLine; l->SetLineWidth(1); for (int i = 1; i < nbRows; i++) { @@ -498,7 +498,7 @@ namespace HcalObjRepresent { } } - std::string SciNotatStr(float num) { + inline std::string SciNotatStr(float num) { // Create an output string stream std::ostringstream streamObj2; @@ -528,12 +528,12 @@ namespace HcalObjRepresent { return ss.str(); } - const bool isBitSet(unsigned int bitnumber, unsigned int status) { + inline const bool isBitSet(unsigned int bitnumber, unsigned int status) { unsigned int statadd = 0x1 << (bitnumber); return (status & statadd) ? (true) : (false); } - std::string getBitsSummary(uint32_t bits, std::string statusBitArray[], short unsigned int bitMap[]) { + inline std::string getBitsSummary(uint32_t bits, std::string statusBitArray[], short unsigned int bitMap[]) { std::stringstream ss; for (unsigned int i = 0; i < 9; ++i) { if (isBitSet(bitMap[i], bits)) { @@ -545,7 +545,7 @@ namespace HcalObjRepresent { } //functions for making plot: - void setBinLabels(std::vector& depth) { + inline void setBinLabels(std::vector& depth) { // Set labels for all depth histograms for (unsigned int i = 0; i < depth.size(); ++i) { depth[i].SetXTitle("i#eta"); @@ -1050,7 +1050,7 @@ namespace HcalObjRepresent { } // FillUnphysicalHEHFBins(std::vector &hh) // special fill call based on detid -- eventually will need special treatment - void Fill(HcalDetId& id, double val /*=1*/, std::vector& depth) { + inline void Fill(HcalDetId& id, double val /*=1*/, std::vector& depth) { // If in HF, need to shift by 1 bin (-1 bin lower in -HF, +1 bin higher in +HF) if (id.subdet() == HcalForward) depth[id.depth() - 1].Fill(id.ieta() < 0 ? id.ieta() - 1 : id.ieta() + 1, id.iphi(), val); @@ -1058,14 +1058,14 @@ namespace HcalObjRepresent { depth[id.depth() - 1].Fill(id.ieta(), id.iphi(), val); } - void Reset(std::vector& depth) { + inline void Reset(std::vector& depth) { for (unsigned int d = 0; d < depth.size(); d++) //BUG CAN BE HERE: //if(depth[d]) depth[d].Reset(); } // void Reset(void) - void setup(std::vector& depth, std::string name, std::string units = "") { + inline void setup(std::vector& depth, std::string name, std::string units = "") { std::string unittitle, unitname; if (units.empty()) { unitname = units; @@ -1132,11 +1132,11 @@ namespace HcalObjRepresent { setBinLabels(depth); // set axis titles, special bins } - void fillOneGain(std::vector& graphData, - HcalGains::tAllContWithNames& allContainers, - std::string name, - int id, - std::string units = "") { + inline void fillOneGain(std::vector& graphData, + HcalGains::tAllContWithNames& allContainers, + std::string name, + int id, + std::string units = "") { setup(graphData, name); std::stringstream x; diff --git a/CondCore/RunInfoPlugins/interface/RunInfoPayloadInspectoHelper.h b/CondCore/RunInfoPlugins/interface/RunInfoPayloadInspectoHelper.h index 04503b61c9c72..3ee96a6773ae2 100644 --- a/CondCore/RunInfoPlugins/interface/RunInfoPayloadInspectoHelper.h +++ b/CondCore/RunInfoPlugins/interface/RunInfoPayloadInspectoHelper.h @@ -36,7 +36,7 @@ namespace RunInfoPI { }; /************************************************/ - float theBField(const float current) { + inline float theBField(const float current) { // logic is taken from https://github.com/cms-sw/cmssw/blob/master/MagneticField/GeomBuilder/plugins/VolumeBasedMagneticFieldESProducerFromDB.cc#L156 int i = 0; @@ -49,7 +49,7 @@ namespace RunInfoPI { } /************************************************/ - float runDuration(const std::shared_ptr& payload) { + inline float runDuration(const std::shared_ptr& payload) { // calculation of the run duration in seconds time_t start_time = payload->m_start_time_ll; ctime(&start_time); @@ -59,19 +59,19 @@ namespace RunInfoPI { } /************************************************/ - std::string runStartTime(const std::shared_ptr& payload) { + inline std::string runStartTime(const std::shared_ptr& payload) { const time_t start_time = payload->m_start_time_ll / 1.0e+6; return std::asctime(std::gmtime(&start_time)); } /************************************************/ - std::string runEndTime(const std::shared_ptr& payload) { + inline std::string runEndTime(const std::shared_ptr& payload) { const time_t end_time = payload->m_stop_time_ll / 1.0e+6; return std::asctime(std::gmtime(&end_time)); } /************************************************/ - std::string getStringFromTypeEnum(const parameters& parameter) { + inline std::string getStringFromTypeEnum(const parameters& parameter) { switch (parameter) { case m_run: return "run number"; @@ -101,7 +101,7 @@ namespace RunInfoPI { } /************************************************/ - void reportSummaryMapPalette(TH2* obj) { + inline void reportSummaryMapPalette(TH2* obj) { static int pcol[20]; float rgb[20][3]; diff --git a/CondCore/SiPixelPlugins/interface/PixelRegionContainers.h b/CondCore/SiPixelPlugins/interface/PixelRegionContainers.h index 51f01e1502551..9965eb7c3d51a 100644 --- a/CondCore/SiPixelPlugins/interface/PixelRegionContainers.h +++ b/CondCore/SiPixelPlugins/interface/PixelRegionContainers.h @@ -15,7 +15,7 @@ namespace PixelRegions { - std::string itoa(int i) { + inline std::string itoa(int i) { char temp[20]; sprintf(temp, "%d", i); return ((std::string)temp); diff --git a/CondCore/SiPixelPlugins/interface/SiPixelPayloadInspectorHelper.h b/CondCore/SiPixelPlugins/interface/SiPixelPayloadInspectorHelper.h index e37d5a04c96b2..69b6c6535d620 100644 --- a/CondCore/SiPixelPlugins/interface/SiPixelPayloadInspectorHelper.h +++ b/CondCore/SiPixelPlugins/interface/SiPixelPayloadInspectorHelper.h @@ -111,7 +111,7 @@ namespace SiPixelPI { }; //============================================================================ - std::pair unpack(cond::Time_t since) { + inline std::pair unpack(cond::Time_t since) { auto kLowMask = 0XFFFFFFFF; auto run = (since >> 32); auto lumi = (since & kLowMask); @@ -121,7 +121,7 @@ namespace SiPixelPI { //============================================================================ // Taken from pixel naming classes // BmO (-z-x) = 1, BmI (-z+x) = 2 , BpO (+z-x) = 3 , BpI (+z+x) = 4 - int quadrant(const DetId& detid, const TrackerTopology* tTopo_, bool phase_) { + inline int quadrant(const DetId& detid, const TrackerTopology* tTopo_, bool phase_) { if (detid.subdetId() == PixelSubdetector::PixelBarrel) { return PixelBarrelName(detid, tTopo_, phase_).shell(); } else { @@ -132,7 +132,7 @@ namespace SiPixelPI { //============================================================================ // Online ladder convention taken from pixel naming class for barrel // Apply sign convention (- sign for BmO and BpO) - int signed_ladder(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { + inline int signed_ladder(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelBarrel) return -9999; int signed_ladder = PixelBarrelName(detid, &tTopo_, phase_).ladderName(); @@ -144,7 +144,7 @@ namespace SiPixelPI { //============================================================================ // Online mdoule convention taken from pixel naming class for barrel // Apply sign convention (- sign for BmO and BmI) - int signed_module(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { + inline int signed_module(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelBarrel) return -9999; int signed_module = PixelBarrelName(detid, &tTopo_, phase_).moduleName(); @@ -160,7 +160,7 @@ namespace SiPixelPI { // Panel 1 plq 1-2, Panel 2, plq 1 = Ring 1 // Panel 1 plq 3-4, Panel 2, plq 2-3 = Ring 2 // Phase 1: Using pixel naming class for endcap - int ring(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { + inline int ring(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelEndcap) return -9999; int ring = -9999; @@ -175,7 +175,7 @@ namespace SiPixelPI { //============================================================================ // Online blade convention taken from pixel naming class for endcap // Apply sign convention (- sign for BmO and BpO) - int signed_blade(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { + inline int signed_blade(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelEndcap) return -9999; int signed_blade = PixelEndcapName(detid, &tTopo_, phase_).bladeName(); @@ -185,7 +185,7 @@ namespace SiPixelPI { } //============================================================================ - int signed_blade_panel(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { + inline int signed_blade_panel(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelEndcap) return -9999; int signed_blade_panel = signed_blade(detid, tTopo_, phase_) + (tTopo_.pxfPanel(detid) - 1); @@ -195,7 +195,7 @@ namespace SiPixelPI { //============================================================================ // Online disk convention // Apply sign convention (- sign for BmO and BmI) - int signed_disk(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { + inline int signed_disk(const DetId& detid, const TrackerTopology& tTopo_, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelEndcap) return -9999; int signed_disk = tTopo_.pxfDisk(DetId(detid)); @@ -205,7 +205,7 @@ namespace SiPixelPI { } //============================================================================ - void draw_line(double x1, double x2, double y1, double y2, int width = 2, int style = 1, int color = 1) { + inline void draw_line(double x1, double x2, double y1, double y2, int width = 2, int style = 1, int color = 1) { TLine* l = new TLine(x1, y1, x2, y2); l->SetBit(kCanDelete); l->SetLineWidth(width); @@ -215,14 +215,14 @@ namespace SiPixelPI { } //============================================================================ - void dress_occup_plot(TCanvas& canv, - TH2* h, - int lay, - int ring = 0, - int phase = 0, - bool half_shift = true, - bool mark_zero = true, - bool standard_palette = true) { + inline void dress_occup_plot(TCanvas& canv, + TH2* h, + int lay, + int ring = 0, + int phase = 0, + bool half_shift = true, + bool mark_zero = true, + bool standard_palette = true) { std::string s_title; if (lay > 0) { @@ -505,7 +505,7 @@ namespace SiPixelPI { } /*--------------------------------------------------------------------*/ - void adjustCanvasMargins(TVirtualPad* pad, float top, float bottom, float left, float right) + inline void adjustCanvasMargins(TVirtualPad* pad, float top, float bottom, float left, float right) /*--------------------------------------------------------------------*/ { if (top > 0) @@ -519,7 +519,7 @@ namespace SiPixelPI { } /*--------------------------------------------------------------------*/ - void adjustStats(TPaveStats* stats, float X1, float Y1, float X2, float Y2) + inline void adjustStats(TPaveStats* stats, float X1, float Y1, float X2, float Y2) /*--------------------------------------------------------------------*/ { stats->SetX1NDC(X1); //new x start position @@ -529,7 +529,7 @@ namespace SiPixelPI { } /*--------------------------------------------------------------------*/ - std::pair getExtrema(TH1* h1, TH1* h2) + inline std::pair getExtrema(TH1* h1, TH1* h2) /*--------------------------------------------------------------------*/ { float theMax(-9999.); @@ -545,7 +545,7 @@ namespace SiPixelPI { } /*--------------------------------------------------------------------*/ - void makeNicePlotStyle(TH1* hist) + inline void makeNicePlotStyle(TH1* hist) /*--------------------------------------------------------------------*/ { hist->SetStats(kFALSE); @@ -593,7 +593,7 @@ namespace SiPixelPI { }; /*--------------------------------------------------------------------*/ - std::string getStringFromRegionEnum(SiPixelPI::regions e) + inline std::string getStringFromRegionEnum(SiPixelPI::regions e) /*--------------------------------------------------------------------*/ { switch (e) { @@ -632,7 +632,7 @@ namespace SiPixelPI { } /*--------------------------------------------------------------------*/ - bool isBPixOuterLadder(const DetId& detid, const TrackerTopology& tTopo, bool isPhase0) + inline bool isBPixOuterLadder(const DetId& detid, const TrackerTopology& tTopo, bool isPhase0) /*--------------------------------------------------------------------*/ { bool isOuter = false; @@ -675,7 +675,7 @@ namespace SiPixelPI { }; /*--------------------------------------------------------------------*/ - void topolInfo::printAll() + inline void topolInfo::printAll() /*--------------------------------------------------------------------*/ { std::cout << " detId:" << m_rawid << " subdetid: " << m_subdetid << " layer: " << m_layer << " side: " << m_side @@ -683,7 +683,7 @@ namespace SiPixelPI { } /*--------------------------------------------------------------------*/ - void topolInfo::init() + inline void topolInfo::init() /*--------------------------------------------------------------------*/ { m_rawid = 0; @@ -695,7 +695,7 @@ namespace SiPixelPI { }; /*--------------------------------------------------------------------*/ - bool topolInfo::sanityCheck() + inline bool topolInfo::sanityCheck() /*--------------------------------------------------------------------*/ { if (m_layer == 0 || (m_subdetid == 1 && m_layer > 4) || (m_subdetid == 2 && m_layer > 3)) { @@ -705,7 +705,7 @@ namespace SiPixelPI { } } /*--------------------------------------------------------------------*/ - void topolInfo::fillGeometryInfo(const DetId& detId, const TrackerTopology& tTopo, const SiPixelPI::phase& ph) + inline void topolInfo::fillGeometryInfo(const DetId& detId, const TrackerTopology& tTopo, const SiPixelPI::phase& ph) /*--------------------------------------------------------------------*/ { // set the phase @@ -727,7 +727,7 @@ namespace SiPixelPI { // ------------ method to assign a partition based on the topology struct info --------------- /*--------------------------------------------------------------------*/ - SiPixelPI::regions topolInfo::filterThePartition() + inline SiPixelPI::regions topolInfo::filterThePartition() /*--------------------------------------------------------------------*/ { SiPixelPI::regions ret = SiPixelPI::NUM_OF_REGIONS; @@ -779,7 +779,7 @@ namespace SiPixelPI { } /*--------------------------------------------------------------------*/ - void displayNotSupported(TCanvas& canv, const unsigned int size) + inline void displayNotSupported(TCanvas& canv, const unsigned int size) /*--------------------------------------------------------------------*/ { std::string phase = (size < SiPixelPI::phase1size) ? "Phase-0" : "Phase-2"; @@ -806,7 +806,7 @@ namespace SiPixelPI { } /*--------------------------------------------------------------------*/ - bool checkAnswerOK(std::string& answer, bool& result) + inline bool checkAnswerOK(std::string& answer, bool& result) /*--------------------------------------------------------------------*/ { std::transform(answer.begin(), answer.end(), answer.begin(), [](unsigned char x) { return ::tolower(x); }); diff --git a/CondCore/SiStripPlugins/interface/SiStripPayloadInspectorHelper.h b/CondCore/SiStripPlugins/interface/SiStripPayloadInspectorHelper.h index a227de7772127..9c7c0165d99ef 100644 --- a/CondCore/SiStripPlugins/interface/SiStripPayloadInspectorHelper.h +++ b/CondCore/SiStripPlugins/interface/SiStripPayloadInspectorHelper.h @@ -169,7 +169,7 @@ namespace SiStripPI { enum estimator { min, max, mean, rms }; /*--------------------------------------------------------------------*/ - std::string estimatorType(SiStripPI::estimator e) + inline std::string estimatorType(SiStripPI::estimator e) /*--------------------------------------------------------------------*/ { switch (e) { @@ -187,7 +187,7 @@ namespace SiStripPI { } /*--------------------------------------------------------------------*/ - std::string getStringFromSubdet(StripSubdetector::SubDetector sub) + inline std::string getStringFromSubdet(StripSubdetector::SubDetector sub) /*-------------------------------------------------------------------*/ { switch (sub) { @@ -247,7 +247,7 @@ namespace SiStripPI { }; /*--------------------------------------------------------------------*/ - std::pair regionType(int index) + inline std::pair regionType(int index) /*--------------------------------------------------------------------*/ { auto region = static_cast>(index); @@ -337,7 +337,7 @@ namespace SiStripPI { } /*--------------------------------------------------------------------*/ - std::pair getTheRange(std::map values, const float nsigma) + inline std::pair getTheRange(std::map values, const float nsigma) /*--------------------------------------------------------------------*/ { float sum = std::accumulate( @@ -362,13 +362,13 @@ namespace SiStripPI { } /*--------------------------------------------------------------------*/ - void drawStatBox(std::map> histos, - std::map colormap, - std::vector legend, - double X = 0.15, - double Y = 0.93, - double W = 0.15, - double H = 0.10) + inline void drawStatBox(std::map> histos, + std::map colormap, + std::vector legend, + double X = 0.15, + double Y = 0.93, + double W = 0.15, + double H = 0.10) /*--------------------------------------------------------------------*/ { char buffer[255]; @@ -399,7 +399,7 @@ namespace SiStripPI { } /*--------------------------------------------------------------------*/ - std::pair getExtrema(TH1* h1, TH1* h2) + inline std::pair getExtrema(TH1* h1, TH1* h2) /*--------------------------------------------------------------------*/ { float theMax(-9999.); @@ -415,7 +415,7 @@ namespace SiStripPI { } /*--------------------------------------------------------------------*/ - void makeNicePlotStyle(TH1* hist) + inline void makeNicePlotStyle(TH1* hist) /*--------------------------------------------------------------------*/ { hist->SetStats(kFALSE); @@ -435,7 +435,7 @@ namespace SiStripPI { } /*--------------------------------------------------------------------*/ - void printSummary(const std::map& map) + inline void printSummary(const std::map& map) /*--------------------------------------------------------------------*/ { for (const auto& element : map) { @@ -476,7 +476,7 @@ namespace SiStripPI { // code is mutuated from CalibTracker/SiStripQuality/plugins/SiStripQualityStatistics /*--------------------------------------------------------------------*/ - void setBadComponents(int i, int component, const SiStripQuality::BadComponent& BC, int NBadComponent[4][19][4]) + inline void setBadComponents(int i, int component, const SiStripQuality::BadComponent& BC, int NBadComponent[4][19][4]) /*--------------------------------------------------------------------*/ { if (BC.BadApvs) { @@ -497,9 +497,9 @@ namespace SiStripPI { // generic code to fill a SiStripDetSummary with Noise payload info /*--------------------------------------------------------------------*/ - void fillNoiseDetSummary(SiStripDetSummary& summaryNoise, - std::shared_ptr payload, - SiStripPI::estimator est) + inline void fillNoiseDetSummary(SiStripDetSummary& summaryNoise, + std::shared_ptr payload, + SiStripPI::estimator est) /*--------------------------------------------------------------------*/ { SiStripNoises::RegistryIterator rit = payload->getRegistryVectorBegin(), erit = payload->getRegistryVectorEnd(); @@ -557,7 +557,7 @@ namespace SiStripPI { } /*--------------------------------------------------------------------*/ - void fillTotalComponents(int NTkComponents[4], int NComponents[4][19][4], const TrackerTopology m_trackerTopo) + inline void fillTotalComponents(int NTkComponents[4], int NComponents[4][19][4], const TrackerTopology m_trackerTopo) /*--------------------------------------------------------------------*/ { edm::FileInPath fp_ = edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); @@ -609,10 +609,10 @@ namespace SiStripPI { // generic code to fill the vectors of bad components /*--------------------------------------------------------------------*/ - void fillBCArrays(const SiStripQuality* siStripQuality_, - int NTkBadComponent[4], - int NBadComponent[4][19][4], - const TrackerTopology m_trackerTopo) + inline void fillBCArrays(const SiStripQuality* siStripQuality_, + int NTkBadComponent[4], + int NBadComponent[4][19][4], + const TrackerTopology m_trackerTopo) /*--------------------------------------------------------------------*/ { std::vector BC = siStripQuality_->getBadComponentList(); @@ -731,7 +731,7 @@ namespace SiStripPI { } /*--------------------------------------------------------------------*/ - void printBCDebug(int NTkBadComponent[4], int NBadComponent[4][19][4]) + inline void printBCDebug(int NTkBadComponent[4], int NBadComponent[4][19][4]) /*--------------------------------------------------------------------*/ { //&&&&&&&&&&&&&&&&&& @@ -786,7 +786,7 @@ namespace SiStripPI { enum palette { HALFGRAY, GRAY, BLUES, REDS, ANTIGRAY, FIRE, ANTIFIRE, LOGREDBLUE, BLUERED, LOGBLUERED, DEFAULT }; /*--------------------------------------------------------------------*/ - void setPaletteStyle(SiStripPI::palette palette) + inline void setPaletteStyle(SiStripPI::palette palette) /*--------------------------------------------------------------------*/ { TStyle* palettestyle = new TStyle("palettestyle", "Style for P-TDR"); diff --git a/CondFormats/JetMETObjects/interface/Utilities.h b/CondFormats/JetMETObjects/interface/Utilities.h index 4396935368be0..3f64051bdadfa 100644 --- a/CondFormats/JetMETObjects/interface/Utilities.h +++ b/CondFormats/JetMETObjects/interface/Utilities.h @@ -107,7 +107,7 @@ namespace std { } // namespace std namespace { - void handleError(const std::string& fClass, const std::string& fMessage) { + inline void handleError(const std::string& fClass, const std::string& fMessage) { #ifdef STANDALONE std::stringstream sserr; sserr << fClass << " ERROR: " << fMessage; diff --git a/CondTools/Hcal/interface/HcalDbXml.h b/CondTools/Hcal/interface/HcalDbXml.h index 7e031501e10e0..be3b23cddd00c 100644 --- a/CondTools/Hcal/interface/HcalDbXml.h +++ b/CondTools/Hcal/interface/HcalDbXml.h @@ -29,12 +29,12 @@ namespace HcalDbXml { unsigned long fGMTIOVEnd, const std::string& fTag, const HcalPedestals& fObject); - bool dumpObject(std::ostream& fOutput, - unsigned fRun, - unsigned long fGMTIOVBegin, - unsigned long fGMTIOVEnd, - const std::string& fTag, - const HcalPedestalWidths& fObject) { + inline bool dumpObject(std::ostream& fOutput, + unsigned fRun, + unsigned long fGMTIOVBegin, + unsigned long fGMTIOVEnd, + const std::string& fTag, + const HcalPedestalWidths& fObject) { return false; } bool dumpObject(std::ostream& fOutput,