#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 114 of file MEtXYcorrectParameters.cc.
References trackerTree::check(), definitions(), MEtXYcorrectParameters::Definitions::formula(), insertMaterial::getSection(), i, input, geometryCSVtoXML::line, mDefinitions, mRecords, MEtXYcorrectParameters::Definitions::nBinVar(), MEtXYcorrectParameters::Record::nParameters(), record(), vertexPlots::section, AlCaHLTBitMon_QueryRunRegistry::string, tmp, valid_, MEtXYcorrectParameters::Record::xMax(), and MEtXYcorrectParameters::Record::xMin().
116 std::ifstream
input(fFile.c_str());
120 while (std::getline(
input,line))
124 if (!section.empty() && tmp.empty())
129 if (currentSection == fSection)
133 currentDefinitions =
tmp;
150 if (currentDefinitions==
"")
151 handleError(
"MEtXYcorrectParameters",
"No definitions found!!!");
153 if (
mRecords.empty() && currentSection !=
"")
155 std::stringstream sserr;
156 sserr<<
"the requested section "<<fSection<<
" doesn't exist!";
157 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
std::vector< std::vector< double > > tmp
float xMin(unsigned fVar) const
std::string formula() const
Definition at line 78 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 231 of file MEtXYcorrectParameters.cc.
References MEtXYcorrectParameters::Definitions::binVar(), definitions(), EcalElecEmulTccOnlyExample_cfg::formula, MEtXYcorrectParameters::Definitions::formula(), i, 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().
233 std::ofstream txtFile;
234 txtFile.open(fFileName.c_str());
235 txtFile.setf(std::ios::right);
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 255 of file MEtXYcorrectParameters.cc.
References MEtXYcorrectParameters::Definitions::binVar(), definitions(), MEtXYcorrectParameters::Definitions::formula(), i, 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().
257 std::ofstream txtFile;
258 txtFile.open(fFileName.c_str(),std::ofstream::app);
259 txtFile.setf(std::ios::right);
260 txtFile<<
"["<<Section<<
"]"<<
"\n";
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 165 of file MEtXYcorrectParameters.cc.
References MEtXYcorrectParameters::Definitions::binVar(), gather_cfg::cout, definitions(), MEtXYcorrectParameters::Definitions::formula(), i, 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().
167 std::cout<<
"--------------------------------------------"<<std::endl;
168 std::cout<<
"//////// PARAMETERS: //////////////////////"<<std::endl;
169 std::cout<<
"--------------------------------------------"<<std::endl;
171 std::cout<<
"Names of binning variables: ";
175 std::cout<<
"--------------------------------------------"<<std::endl;
177 std::cout<<
"Names of parameter variables: ";
181 std::cout<<
"--------------------------------------------"<<std::endl;
183 std::cout<<
"--------------------------------------------"<<std::endl;
184 std::cout<<
"------- Bin contents -----------------------"<<std::endl;
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 195 of file MEtXYcorrectParameters.cc.
References MEtXYcorrectParameters::Definitions::binVar(), gather_cfg::cout, definitions(), MEtXYcorrectParameters::Definitions::formula(), i, 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().
197 std::cout<<
"--------------------------------------------"<<std::endl;
198 std::cout<<
"//////// PARAMETERS: //////////////////////"<<std::endl;
199 std::cout<<
"--------------------------------------------"<<std::endl;
202 std::cout<<
"Names of binning variables: ";
206 std::cout<<
"--------------------------------------------"<<std::endl;
208 std::cout<<
"Names of parameter variables: ";
212 std::cout<<
"--------------------------------------------"<<std::endl;
214 std::cout<<
"--------------------------------------------"<<std::endl;
215 std::cout<<
"------- Bin contents -----------------------"<<std::endl;
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 |