#include <MEtXYcorrectParameters.h>
|
template<class Archive > |
void | serialize (Archive &ar, const unsigned int version) |
| is this a valid set? More...
|
|
Definition at line 14 of file MEtXYcorrectParameters.h.
◆ MEtXYcorrectParameters() [1/3]
MEtXYcorrectParameters::MEtXYcorrectParameters |
( |
| ) |
|
|
inline |
◆ MEtXYcorrectParameters() [2/3]
MEtXYcorrectParameters::MEtXYcorrectParameters |
( |
const std::string & |
fFile, |
|
|
const std::string & |
fSection = "" |
|
) |
| |
Definition at line 105 of file MEtXYcorrectParameters.cc.
References RPCNoise_example::check, definitions(), mps_fire::i, input, mps_splice::line, mDefinitions, mRecords, MEtXYcorrectParameters::Definitions::nBinVar(), MEtXYcorrectParameters::Record::nParameters(), record(), hgcalPlots::section, jetUpdater_cfi::sort, AlCaHLTBitMon_QueryRunRegistry::string, createJobs::tmp, valid_, MEtXYcorrectParameters::Record::xMax(), and MEtXYcorrectParameters::Record::xMin().
106 std::ifstream
input(fFile.c_str());
117 if (currentSection == fSection) {
119 currentDefinitions =
tmp;
136 if (currentDefinitions.empty())
137 handleError(
"MEtXYcorrectParameters",
"No definitions found!!!");
138 if (
mRecords.empty() && currentSection.empty())
140 if (
mRecords.empty() && !currentSection.empty()) {
141 std::stringstream sserr;
142 sserr <<
"the requested section " << fSection <<
" doesn't exist!";
143 handleError(
"MEtXYcorrectParameters", sserr.str());
const Record & record(unsigned fBin) const
std::vector< MEtXYcorrectParameters::Record > mRecords
static std::string const input
float xMin(unsigned fVar) const
float xMax(unsigned fVar) const
const Definitions & definitions() const
MEtXYcorrectParameters::Definitions mDefinitions
unsigned nParameters() const
◆ MEtXYcorrectParameters() [3/3]
Definition at line 83 of file MEtXYcorrectParameters.h.
References valid_.
std::vector< MEtXYcorrectParameters::Record > mRecords
MEtXYcorrectParameters::Definitions mDefinitions
◆ binCenters()
std::vector<float> MEtXYcorrectParameters::binCenters |
( |
unsigned |
fVar | ) |
const |
◆ binIndex()
int MEtXYcorrectParameters::binIndex |
( |
const std::vector< float > & |
fX | ) |
const |
◆ definitions()
const Definitions& MEtXYcorrectParameters::definitions |
( |
| ) |
const |
|
inline |
◆ isValid()
bool MEtXYcorrectParameters::isValid |
( |
void |
| ) |
const |
|
inline |
◆ neighbourBin()
int MEtXYcorrectParameters::neighbourBin |
( |
unsigned |
fIndex, |
|
|
unsigned |
fVar, |
|
|
bool |
fNext |
|
) |
| const |
◆ printFile() [1/2]
void MEtXYcorrectParameters::printFile |
( |
const std::string & |
fFileName | ) |
const |
Definition at line 215 of file MEtXYcorrectParameters.cc.
References MEtXYcorrectParameters::Definitions::binVar(), definitions(), MEtXYcorrectParameters::Definitions::formula(), pfMETCorrectionType0_cfi::formula, mps_fire::i, dqmiolumiharvest::j, MEtXYcorrectParameters::Definitions::nBinVar(), MEtXYcorrectParameters::Record::nParameters(), MEtXYcorrectParameters::Definitions::nParVar(), MEtXYcorrectParameters::Record::parameter(), MEtXYcorrectParameters::Definitions::parVar(), record(), size(), MEtXYcorrectParameters::Record::xMax(), and MEtXYcorrectParameters::Record::xMin().
216 std::ofstream txtFile;
217 txtFile.open(fFileName.c_str());
218 txtFile.setf(std::ios::right);
228 for (
unsigned i = 0;
i <
size();
i++) {
const Record & record(unsigned fBin) const
std::vector< unsigned > parVar() const
float xMin(unsigned fVar) const
float xMax(unsigned fVar) const
const Definitions & definitions() const
unsigned nParameters() const
std::vector< std::string > binVar() const
std::string formula() const
float parameter(unsigned fIndex) const
◆ printFile() [2/2]
void MEtXYcorrectParameters::printFile |
( |
const std::string & |
fFileName, |
|
|
const std::string & |
Section |
|
) |
| const |
Definition at line 238 of file MEtXYcorrectParameters.cc.
References MEtXYcorrectParameters::Definitions::binVar(), definitions(), MEtXYcorrectParameters::Definitions::formula(), mps_fire::i, dqmiolumiharvest::j, MEtXYcorrectParameters::Record::MetAxis(), MEtXYcorrectParameters::Definitions::nBinVar(), MEtXYcorrectParameters::Record::nParameters(), MEtXYcorrectParameters::Definitions::nParVar(), MEtXYcorrectParameters::Record::parameter(), MEtXYcorrectParameters::Definitions::parVar(), MEtXYcorrectParameters::Definitions::PtclType(), record(), size(), MEtXYcorrectParameters::Record::xMax(), and MEtXYcorrectParameters::Record::xMin().
239 std::ofstream txtFile;
240 txtFile.open(fFileName.c_str(), std::ofstream::app);
241 txtFile.setf(std::ios::right);
242 txtFile <<
"[" << Section <<
"]" 254 for (
unsigned i = 0;
i <
size();
i++)
const Record & record(unsigned fBin) const
std::vector< unsigned > parVar() const
float xMin(unsigned fVar) const
float xMax(unsigned fVar) const
const Definitions & definitions() const
std::string MetAxis() const
unsigned nParameters() const
std::vector< std::string > binVar() const
std::string formula() const
float parameter(unsigned fIndex) const
◆ printScreen() [1/2]
void MEtXYcorrectParameters::printScreen |
( |
| ) |
const |
Definition at line 151 of file MEtXYcorrectParameters.cc.
References MEtXYcorrectParameters::Definitions::binVar(), gather_cfg::cout, definitions(), MEtXYcorrectParameters::Definitions::formula(), mps_fire::i, dqmiolumiharvest::j, MEtXYcorrectParameters::Definitions::nBinVar(), MEtXYcorrectParameters::Record::nParameters(), MEtXYcorrectParameters::Definitions::nParVar(), MEtXYcorrectParameters::Record::parameter(), MEtXYcorrectParameters::Definitions::parVar(), record(), size(), MEtXYcorrectParameters::Record::xMax(), and MEtXYcorrectParameters::Record::xMin().
152 std::cout <<
"--------------------------------------------" << std::endl;
153 std::cout <<
"//////// PARAMETERS: //////////////////////" << std::endl;
154 std::cout <<
"--------------------------------------------" << std::endl;
156 std::cout <<
"Names of binning variables: ";
160 std::cout <<
"--------------------------------------------" << std::endl;
162 std::cout <<
"Names of parameter variables: ";
166 std::cout <<
"--------------------------------------------" << std::endl;
168 std::cout <<
"--------------------------------------------" << std::endl;
169 std::cout <<
"------- Bin contents -----------------------" << std::endl;
170 for (
unsigned i = 0;
i <
size();
i++) {
const Record & record(unsigned fBin) const
std::vector< unsigned > parVar() const
float xMin(unsigned fVar) const
float xMax(unsigned fVar) const
const Definitions & definitions() const
unsigned nParameters() const
std::vector< std::string > binVar() const
std::string formula() const
float parameter(unsigned fIndex) const
◆ printScreen() [2/2]
void MEtXYcorrectParameters::printScreen |
( |
const std::string & |
Section | ) |
const |
Definition at line 179 of file MEtXYcorrectParameters.cc.
References MEtXYcorrectParameters::Definitions::binVar(), gather_cfg::cout, definitions(), MEtXYcorrectParameters::Definitions::formula(), mps_fire::i, dqmiolumiharvest::j, MEtXYcorrectParameters::Record::MetAxis(), MEtXYcorrectParameters::Definitions::nBinVar(), MEtXYcorrectParameters::Record::nParameters(), MEtXYcorrectParameters::Definitions::nParVar(), MEtXYcorrectParameters::Record::parameter(), MEtXYcorrectParameters::Definitions::parVar(), record(), size(), MEtXYcorrectParameters::Record::xMax(), and MEtXYcorrectParameters::Record::xMin().
180 std::cout <<
"--------------------------------------------" << std::endl;
181 std::cout <<
"//////// PARAMETERS: //////////////////////" << std::endl;
182 std::cout <<
"--------------------------------------------" << std::endl;
186 std::cout <<
"Names of binning variables: ";
190 std::cout <<
"--------------------------------------------" << std::endl;
192 std::cout <<
"Names of parameter variables: ";
196 std::cout <<
"--------------------------------------------" << std::endl;
198 std::cout <<
"--------------------------------------------" << std::endl;
199 std::cout <<
"------- Bin contents -----------------------" << std::endl;
200 for (
unsigned i = 0;
i <
size();
i++)
const Record & record(unsigned fBin) const
std::vector< unsigned > parVar() const
float xMin(unsigned fVar) const
float xMax(unsigned fVar) const
const Definitions & definitions() const
std::string MetAxis() const
unsigned nParameters() const
std::vector< std::string > binVar() const
std::string formula() const
float parameter(unsigned fIndex) const
◆ record()
const Record& MEtXYcorrectParameters::record |
( |
unsigned |
fBin | ) |
const |
|
inline |
◆ serialize()
template<class Archive >
void MEtXYcorrectParameters::serialize |
( |
Archive & |
ar, |
|
|
const unsigned int |
version |
|
) |
| |
|
private |
◆ size() [1/2]
unsigned MEtXYcorrectParameters::size |
( |
void |
| ) |
const |
|
inline |
◆ size() [2/2]
unsigned MEtXYcorrectParameters::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 MEtXYcorrectParameters::valid_ |
|
private |