Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ namespace AlignmentPI {
PARTITION::TECp,
PARTITION::TECm};

std::ostream& operator<<(std::ostream& o, PARTITION x) { return o << std::underlying_type<PARTITION>::type(x); }
inline std::ostream& operator<<(std::ostream& o, PARTITION x) {
return o << std::underlying_type<PARTITION>::type(x);
}

enum regions {
BPixL1o, //0 Barrel Pixel Layer 1 outer
Expand Down Expand Up @@ -149,7 +151,7 @@ namespace AlignmentPI {
};

/*--------------------------------------------------------------------*/
std::string getStringFromRegionEnum(AlignmentPI::regions e)
inline std::string getStringFromRegionEnum(AlignmentPI::regions e)
/*--------------------------------------------------------------------*/
{
switch (e) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -353,7 +355,7 @@ namespace AlignmentPI {
}

/*--------------------------------------------------------------------*/
void topolInfo::init()
inline void topolInfo::init()
/*--------------------------------------------------------------------*/
{
m_rawid = 0;
Expand All @@ -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)) {
Expand All @@ -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<unsigned int>(detId.subdetId());
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -594,7 +596,7 @@ namespace AlignmentPI {
}

/*--------------------------------------------------------------------*/
std::string getStringFromCoordinate(AlignmentPI::coordinate coord)
inline std::string getStringFromCoordinate(AlignmentPI::coordinate coord)
/*--------------------------------------------------------------------*/
{
switch (coord) {
Expand All @@ -616,7 +618,7 @@ namespace AlignmentPI {
}

/*--------------------------------------------------------------------*/
std::string getStringFromIndex(AlignmentPI::index i)
inline std::string getStringFromIndex(AlignmentPI::index i)
/*--------------------------------------------------------------------*/
{
switch (i) {
Expand All @@ -638,7 +640,7 @@ namespace AlignmentPI {
}

/*--------------------------------------------------------------------*/
std::string getStringFromPart(AlignmentPI::partitions i)
inline std::string getStringFromPart(AlignmentPI::partitions i)
/*--------------------------------------------------------------------*/
{
switch (i) {
Expand All @@ -660,7 +662,7 @@ namespace AlignmentPI {
}

/*--------------------------------------------------------------------*/
std::pair<int, int> getIndices(AlignmentPI::index i)
inline std::pair<int, int> getIndices(AlignmentPI::index i)
/*--------------------------------------------------------------------*/
{
switch (i) {
Expand All @@ -682,7 +684,7 @@ namespace AlignmentPI {
}

/*--------------------------------------------------------------------*/
void makeNicePlotStyle(TH1* hist, int color)
inline void makeNicePlotStyle(TH1* hist, int color)
/*--------------------------------------------------------------------*/
{
hist->SetStats(kFALSE);
Expand All @@ -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];
Expand Down Expand Up @@ -740,7 +742,7 @@ namespace AlignmentPI {
}

/*--------------------------------------------------------------------*/
std::pair<float, float> getTheRange(std::map<uint32_t, float> values, const float nsigma)
inline std::pair<float, float> getTheRange(std::map<uint32_t, float> values, const float nsigma)
/*--------------------------------------------------------------------*/
{
float sum = std::accumulate(
Expand All @@ -765,7 +767,7 @@ namespace AlignmentPI {
}

/*--------------------------------------------------------------------*/
std::pair<double, double> calculatePosition(TVirtualPad* myPad, int boundary)
inline std::pair<double, double> calculatePosition(TVirtualPad* myPad, int boundary)
/*--------------------------------------------------------------------*/
{
int ix1;
Expand Down Expand Up @@ -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<AlignTransform>& input,
const TrackerTopology& tTopo,
const std::map<AlignmentPI::coordinate, float>& GPR)
inline void TkAlBarycenters::computeBarycenters(const std::vector<AlignTransform>& input,
const TrackerTopology& tTopo,
const std::map<AlignmentPI::coordinate, float>& GPR)
/*--------------------------------------------------------------------*/
{
for (const auto& ali : input) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

namespace BeamSpotPI {

std::pair<unsigned int, unsigned int> unpack(cond::Time_t since) {
inline std::pair<unsigned int, unsigned int> unpack(cond::Time_t since) {
auto kLowMask = 0XFFFFFFFF;
auto run = (since >> 32);
auto lumi = (since & kLowMask);
Expand All @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion CondCore/EcalPlugins/plugins/ESDrawUtils.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions CondCore/EcalPlugins/plugins/EcalDrawUtils.h
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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,
Expand Down Expand Up @@ -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);
Expand All @@ -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++) {
Expand Down
16 changes: 8 additions & 8 deletions CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainerUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ void fillEEMap_TwoIOVs(std::shared_ptr<floatCondObj> 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);

Expand Down
4 changes: 2 additions & 2 deletions CondCore/EcalPlugins/plugins/EcalFunctionParametersUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <string>
#include <cmath>

int countEmptyRows(std::vector<float>& vec) {
inline int countEmptyRows(std::vector<float>& vec) {
int cnt = 0;
for (std::vector<float>::const_iterator it = vec.begin(); it != vec.end(); it++)
if ((*it) == 0.0f)
Expand All @@ -11,7 +11,7 @@ int countEmptyRows(std::vector<float>& vec) {
return cnt;
}

void fillFunctionParamsValues(
inline void fillFunctionParamsValues(
TH2F*& align, std::vector<float>& m_params, std::string title, int& gridRows, int& NbColumns) {
const int maxInCol = 25;
int NbRows = 0;
Expand Down
26 changes: 13 additions & 13 deletions CondCore/HcalPlugins/interface/HcalObjRepresent.h
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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;

Expand Down Expand Up @@ -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)) {
Expand All @@ -545,7 +545,7 @@ namespace HcalObjRepresent {
}

//functions for making plot:
void setBinLabels(std::vector<TH2F>& depth) {
inline void setBinLabels(std::vector<TH2F>& depth) {
// Set labels for all depth histograms
for (unsigned int i = 0; i < depth.size(); ++i) {
depth[i].SetXTitle("i#eta");
Expand Down Expand Up @@ -1050,22 +1050,22 @@ namespace HcalObjRepresent {
} // FillUnphysicalHEHFBins(std::vector<MonitorElement*> &hh)

// special fill call based on detid -- eventually will need special treatment
void Fill(HcalDetId& id, double val /*=1*/, std::vector<TH2F>& depth) {
inline void Fill(HcalDetId& id, double val /*=1*/, std::vector<TH2F>& 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);
else
depth[id.depth() - 1].Fill(id.ieta(), id.iphi(), val);
}

void Reset(std::vector<TH2F>& depth) {
inline void Reset(std::vector<TH2F>& 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<TH2F>& depth, std::string name, std::string units = "") {
inline void setup(std::vector<TH2F>& depth, std::string name, std::string units = "") {
std::string unittitle, unitname;
if (units.empty()) {
unitname = units;
Expand Down Expand Up @@ -1132,11 +1132,11 @@ namespace HcalObjRepresent {
setBinLabels(depth); // set axis titles, special bins
}

void fillOneGain(std::vector<TH2F>& graphData,
HcalGains::tAllContWithNames& allContainers,
std::string name,
int id,
std::string units = "") {
inline void fillOneGain(std::vector<TH2F>& graphData,
HcalGains::tAllContWithNames& allContainers,
std::string name,
int id,
std::string units = "") {
setup(graphData, name);

std::stringstream x;
Expand Down
Loading