#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::MEtXYcorrectParameters |
( |
| ) |
|
|
inline |
MEtXYcorrectParameters::MEtXYcorrectParameters |
( |
const std::string & |
fFile, |
|
|
const std::string & |
fSection = "" |
|
) |
| |
Definition at line 105 of file MEtXYcorrectParameters.cc.
References trackerTree::check(), definitions(), MEtXYcorrectParameters::Definitions::formula(), mps_fire::i, input, geometryCSVtoXML::line, mDefinitions, mRecords, MEtXYcorrectParameters::Definitions::nBinVar(), MEtXYcorrectParameters::Record::nParameters(), record(), vertexPlots::section, AlCaHLTBitMon_QueryRunRegistry::string, createJobs::tmp, valid_, MEtXYcorrectParameters::Record::xMax(), and MEtXYcorrectParameters::Record::xMin().
106 std::ifstream
input(fFile.c_str());
110 while (std::getline(
input, line)) {
113 if (!section.empty() && tmp.empty()) {
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());
std::vector< MEtXYcorrectParameters::Record > mRecords
const Definitions & definitions() const
float xMax(unsigned fVar) const
unsigned nParameters() const
static std::string const input
const Record & record(unsigned fBin) const
MEtXYcorrectParameters::Definitions mDefinitions
float xMin(unsigned fVar) const
std::string formula() const
Definition at line 83 of file MEtXYcorrectParameters.h.
References valid_.
std::vector< MEtXYcorrectParameters::Record > mRecords
MEtXYcorrectParameters::Definitions mDefinitions
std::vector<float> MEtXYcorrectParameters::binCenters |
( |
unsigned |
fVar | ) |
const |
int MEtXYcorrectParameters::binIndex |
( |
const std::vector< float > & |
fX | ) |
const |
const Definitions& MEtXYcorrectParameters::definitions |
( |
| ) |
const |
|
inline |
bool MEtXYcorrectParameters::isValid |
( |
void |
| ) |
const |
|
inline |
int MEtXYcorrectParameters::neighbourBin |
( |
unsigned |
fIndex, |
|
|
unsigned |
fVar, |
|
|
bool |
fNext |
|
) |
| const |
void MEtXYcorrectParameters::printFile |
( |
const std::string & |
fFileName | ) |
const |
Definition at line 215 of file MEtXYcorrectParameters.cc.
References MEtXYcorrectParameters::Definitions::binVar(), definitions(), EcalElecEmulTccOnlyExample_cfg::formula, 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().
216 std::ofstream txtFile;
217 txtFile.open(fFileName.c_str());
218 txtFile.setf(std::ios::right);
228 for (
unsigned i = 0;
i <
size();
i++) {
float parameter(unsigned fIndex) const
const Definitions & definitions() const
float xMax(unsigned fVar) const
unsigned nParameters() const
const Record & record(unsigned fBin) const
std::vector< std::string > binVar() const
float xMin(unsigned fVar) const
std::string formula() const
std::vector< unsigned > parVar() const
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++)
float parameter(unsigned fIndex) const
const Definitions & definitions() const
float xMax(unsigned fVar) const
unsigned nParameters() const
std::string MetAxis() const
const Record & record(unsigned fBin) const
std::vector< std::string > binVar() const
float xMin(unsigned fVar) const
std::string formula() const
std::vector< unsigned > parVar() const
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++) {
float parameter(unsigned fIndex) const
const Definitions & definitions() const
float xMax(unsigned fVar) const
unsigned nParameters() const
const Record & record(unsigned fBin) const
std::vector< std::string > binVar() const
float xMin(unsigned fVar) const
std::string formula() const
std::vector< unsigned > parVar() const
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++)
float parameter(unsigned fIndex) const
const Definitions & definitions() const
float xMax(unsigned fVar) const
unsigned nParameters() const
std::string MetAxis() const
const Record & record(unsigned fBin) const
std::vector< std::string > binVar() const
float xMin(unsigned fVar) const
std::string formula() const
std::vector< unsigned > parVar() const
const Record& MEtXYcorrectParameters::record |
( |
unsigned |
fBin | ) |
const |
|
inline |
template<class Archive >
void MEtXYcorrectParameters::serialize |
( |
Archive & |
ar, |
|
|
const unsigned int |
version |
|
) |
| |
|
private |
unsigned MEtXYcorrectParameters::size |
( |
void |
| ) |
const |
|
inline |
unsigned MEtXYcorrectParameters::size |
( |
unsigned |
fVar | ) |
const |
friend class boost::serialization::access |
|
friend |
template<typename CondSerializationT , typename Enabled >
bool MEtXYcorrectParameters::valid_ |
|
private |