#include <METCorrectorParameters.h>
|
template<class Archive > |
void | serialize (Archive &ar, const unsigned int version) |
| is this a valid set? More...
|
|
Definition at line 14 of file METCorrectorParameters.h.
◆ METCorrectorParameters() [1/3]
METCorrectorParameters::METCorrectorParameters |
( |
| ) |
|
|
inline |
◆ METCorrectorParameters() [2/3]
METCorrectorParameters::METCorrectorParameters |
( |
const std::string & |
fFile, |
|
|
const std::string & |
fSection = "" |
|
) |
| |
Definition at line 103 of file METCorrectorParameters.cc.
References RPCNoise_example::check, definitions(), mps_fire::i, input, mps_splice::line, mDefinitions, mRecords, METCorrectorParameters::Definitions::nBinVar(), METCorrectorParameters::Record::nParameters(), record(), hgcalPlots::section, jetsAK4_CHS_cff::sort, AlCaHLTBitMon_QueryRunRegistry::string, createJobs::tmp, valid_, METCorrectorParameters::Record::xMax(), and METCorrectorParameters::Record::xMin().
104 std::ifstream
input(fFile.c_str());
116 if (currentSection == fSection) {
118 currentDefinitions =
tmp;
135 if (currentDefinitions.empty())
136 handleError(
"METCorrectorParameters",
"No definitions found!!!");
137 if (
mRecords.empty() && currentSection.empty())
139 if (
mRecords.empty() && !currentSection.empty()) {
140 std::stringstream sserr;
141 sserr <<
"the requested section " << fSection <<
" doesn't exist!";
142 handleError(
"METCorrectorParameters", sserr.str());
float xMin(unsigned fVar) const
const Record & record(unsigned fBin) const
std::vector< METCorrectorParameters::Record > mRecords
static std::string const input
const Definitions & definitions() const
float xMax(unsigned fVar) const
METCorrectorParameters::Definitions mDefinitions
unsigned nParameters() const
◆ METCorrectorParameters() [3/3]
Definition at line 80 of file METCorrectorParameters.h.
References valid_.
std::vector< METCorrectorParameters::Record > mRecords
METCorrectorParameters::Definitions mDefinitions
◆ binCenters()
std::vector<float> METCorrectorParameters::binCenters |
( |
unsigned |
fVar | ) |
const |
◆ binIndex()
int METCorrectorParameters::binIndex |
( |
const std::vector< float > & |
fX | ) |
const |
◆ definitions()
const Definitions& METCorrectorParameters::definitions |
( |
| ) |
const |
|
inline |
◆ isValid()
bool METCorrectorParameters::isValid |
( |
void |
| ) |
const |
|
inline |
◆ neighbourBin()
int METCorrectorParameters::neighbourBin |
( |
unsigned |
fIndex, |
|
|
unsigned |
fVar, |
|
|
bool |
fNext |
|
) |
| const |
◆ printFile()
void METCorrectorParameters::printFile |
( |
const std::string & |
fFileName | ) |
const |
Definition at line 291 of file METCorrectorParameters.cc.
References METCorrectorParameters::Definitions::binVar(), definitions(), METCorrectorParameters::Definitions::formula(), pfMETCorrectionType0_cfi::formula, mps_fire::i, dqmiolumiharvest::j, METCorrectorParameters::Definitions::nBinVar(), METCorrectorParameters::Record::nParameters(), METCorrectorParameters::Definitions::nParVar(), METCorrectorParameters::Record::parameter(), METCorrectorParameters::Definitions::parVar(), record(), size(), METCorrectorParameters::Record::xMax(), and METCorrectorParameters::Record::xMin().
292 std::ofstream txtFile;
293 txtFile.open(fFileName.c_str());
294 txtFile.setf(std::ios::right);
304 for (
unsigned i = 0;
i <
size();
i++) {
float xMin(unsigned fVar) const
std::vector< std::string > parVar() const
const Record & record(unsigned fBin) const
std::string formula() const
const Definitions & definitions() const
float xMax(unsigned fVar) const
float parameter(unsigned fIndex) const
std::vector< std::string > binVar() const
unsigned nParameters() const
◆ printScreen()
void METCorrectorParameters::printScreen |
( |
| ) |
const |
Definition at line 260 of file METCorrectorParameters.cc.
References METCorrectorParameters::Definitions::binVar(), gather_cfg::cout, definitions(), METCorrectorParameters::Definitions::formula(), mps_fire::i, dqmiolumiharvest::j, METCorrectorParameters::Definitions::nBinVar(), METCorrectorParameters::Record::nParameters(), METCorrectorParameters::Definitions::nParVar(), METCorrectorParameters::Record::parameter(), METCorrectorParameters::Definitions::parVar(), record(), size(), METCorrectorParameters::Record::xMax(), and METCorrectorParameters::Record::xMin().
261 std::cout <<
"--------------------------------------------" << std::endl;
262 std::cout <<
"//////// PARAMETERS: //////////////////////" << std::endl;
263 std::cout <<
"--------------------------------------------" << std::endl;
265 std::cout <<
"Names of binning variables: ";
269 std::cout <<
"--------------------------------------------" << std::endl;
271 std::cout <<
"Names of parameter variables: ";
275 std::cout <<
"--------------------------------------------" << std::endl;
277 std::cout <<
"--------------------------------------------" << std::endl;
278 std::cout <<
"------- Bin contents -----------------------" << std::endl;
279 for (
unsigned i = 0;
i <
size();
i++) {
float xMin(unsigned fVar) const
std::vector< std::string > parVar() const
const Record & record(unsigned fBin) const
std::string formula() const
const Definitions & definitions() const
float xMax(unsigned fVar) const
float parameter(unsigned fIndex) const
std::vector< std::string > binVar() const
unsigned nParameters() const
◆ record()
const Record& METCorrectorParameters::record |
( |
unsigned |
fBin | ) |
const |
|
inline |
◆ serialize()
template<class Archive >
void METCorrectorParameters::serialize |
( |
Archive & |
ar, |
|
|
const unsigned int |
version |
|
) |
| |
|
private |
◆ size() [1/2]
unsigned METCorrectorParameters::size |
( |
void |
| ) |
const |
|
inline |
◆ size() [2/2]
unsigned METCorrectorParameters::size |
( |
unsigned |
fVar | ) |
const |
◆ boost::serialization::access
friend class boost::serialization::access |
|
friend |
◆ cond::serialization::access
template<typename CondSerializationT , typename Enabled >
◆ mDefinitions
◆ mRecords
◆ valid_
bool METCorrectorParameters::valid_ |
|
private |