![]() |
![]() |
#include <LHERunInfoProduct.h>
Public Types | |
typedef std::ptrdiff_t | difference_type |
typedef std::forward_iterator_tag | iterator_category |
typedef std::string * | pointer |
typedef std::string & | reference |
typedef std::string | value_type |
Public Member Functions | |
const_iterator () | |
bool | operator!= (const const_iterator &other) const |
const std::string & | operator* () const |
const_iterator & | operator++ () |
const_iterator | operator++ (int dummy) |
const std::string * | operator-> () const |
bool | operator== (const const_iterator &other) const |
~const_iterator () | |
Private Types | |
enum | Mode { kHeader, kBody, kInit, kDone, kFooter } |
Private Member Functions | |
void | next () |
Private Attributes | |
headers_const_iterator | header |
Header::const_iterator | iter |
unsigned int | line |
Mode | mode |
const LHERunInfoProduct * | runInfo |
std::string | tmp |
Friends | |
class | LHERunInfoProduct |
Definition at line 64 of file LHERunInfoProduct.h.
typedef std::ptrdiff_t LHERunInfoProduct::const_iterator::difference_type |
Definition at line 68 of file LHERunInfoProduct.h.
typedef std::forward_iterator_tag LHERunInfoProduct::const_iterator::iterator_category |
Definition at line 66 of file LHERunInfoProduct.h.
typedef std::string* LHERunInfoProduct::const_iterator::pointer |
Definition at line 69 of file LHERunInfoProduct.h.
typedef std::string& LHERunInfoProduct::const_iterator::reference |
Definition at line 70 of file LHERunInfoProduct.h.
typedef std::string LHERunInfoProduct::const_iterator::value_type |
Definition at line 67 of file LHERunInfoProduct.h.
enum LHERunInfoProduct::const_iterator::Mode [private] |
LHERunInfoProduct::const_iterator::const_iterator | ( | ) | [inline] |
Definition at line 72 of file LHERunInfoProduct.h.
LHERunInfoProduct::const_iterator::~const_iterator | ( | ) | [inline] |
Definition at line 73 of file LHERunInfoProduct.h.
{}
void LHERunInfoProduct::const_iterator::next | ( | void | ) | [private] |
Definition at line 40 of file LHERunInfoProduct.cc.
References LHERunInfoProduct::comments_begin(), LHERunInfoProduct::comments_size(), lhef::HEPRUP::EBMUP, header, LHERunInfoProduct::headers_end(), LHERunInfoProduct::heprup(), lhef::HEPRUP::IDBMUP, lhef::HEPRUP::IDWTUP, iter, kBody, kDone, kFooter, kHeader, kInit, line, lhef::HEPRUP::LPRUP, mode, lhef::HEPRUP::NPRUP, lhef::HEPRUP::PDFGUP, lhef::HEPRUP::PDFSUP, runInfo, GlobalPosition_Frontier_DevDB_cff::tag, tmp, lhef::HEPRUP::XERRUP, lhef::HEPRUP::XMAXUP, and lhef::HEPRUP::XSECUP.
Referenced by operator++().
{ tmp.clear(); do { switch(mode) { case kHeader: if (header == runInfo->headers_end()) { if (line++ == 1) tmp = "</header>\n"; else { mode = kInit; tmp = "<init>\n"; line = 0; } break; } else if (!line) { line++; tmp = "<header>\n"; break; } else { mode = kBody; const std::string &tag = header->tag(); tmp = tag.empty() ? "<!--" : (tag == "<>") ? "" : ("<" + tag + ">"); iter = header->begin(); continue; } case kBody: if (iter == header->end()) { mode = kHeader; const std::string &tag = header->tag(); tmp += tag.empty() ? "-->" : (tag == "<>") ? "" : ("</" + tag + ">"); tmp += "\n"; header++; } else { tmp += *iter++; if (iter == header->end() && (tmp.empty() || (tmp[tmp.length() - 1] != '\r' && tmp[tmp.length() - 1] != '\n'))) continue; } break; case kInit: { const lhef::HEPRUP &heprup = runInfo->heprup(); if (!line++) { std::ostringstream ss; ss << std::setprecision(7) << std::scientific << std::uppercase << " " << heprup.IDBMUP.first << " " << heprup.IDBMUP.second << " " << heprup.EBMUP.first << " " << heprup.EBMUP.second << " " << heprup.PDFGUP.first << " " << heprup.PDFGUP.second << " " << heprup.PDFSUP.first << " " << heprup.PDFSUP.second << " " << heprup.IDWTUP << " " << heprup.NPRUP << std::endl; tmp = ss.str(); break; } if (line >= (unsigned int)heprup.NPRUP + runInfo->comments_size() + 2) { tmp = "</init>\n"; mode = kFooter; break; } else if (line >= (unsigned int)heprup.NPRUP + 2) { tmp = *(runInfo->comments_begin() + (line - (unsigned int)heprup.NPRUP - 2)); break; } std::ostringstream ss; ss << std::setprecision(7) << std::scientific << std::uppercase << "\t" << heprup.XSECUP[line - 2] << "\t" << heprup.XERRUP[line - 2] << "\t" << heprup.XMAXUP[line - 2] << "\t" << heprup.LPRUP[line - 2] << std::endl; tmp = ss.str(); } break; case kFooter: mode = kDone; default: /* ... */; } } while(false); }
bool LHERunInfoProduct::const_iterator::operator!= | ( | const const_iterator & | other | ) | const [inline] |
Definition at line 76 of file LHERunInfoProduct.h.
References operator==().
{ return !operator == (other); }
const std::string& LHERunInfoProduct::const_iterator::operator* | ( | void | ) | const [inline] |
const_iterator LHERunInfoProduct::const_iterator::operator++ | ( | int | dummy | ) | [inline] |
Definition at line 81 of file LHERunInfoProduct.h.
References next().
{ const_iterator orig = *this; next(); return orig; }
const_iterator& LHERunInfoProduct::const_iterator::operator++ | ( | void | ) | [inline] |
const std::string* LHERunInfoProduct::const_iterator::operator-> | ( | ) | const [inline] |
bool LHERunInfoProduct::const_iterator::operator== | ( | const const_iterator & | other | ) | const |
Definition at line 17 of file LHERunInfoProduct.cc.
References geometryCSVtoXML::line, and mode.
Referenced by operator!=().
friend class LHERunInfoProduct [friend] |
Definition at line 88 of file LHERunInfoProduct.h.
Definition at line 101 of file LHERunInfoProduct.h.
Referenced by LHERunInfoProduct::begin(), and next().
Definition at line 102 of file LHERunInfoProduct.h.
Referenced by next().
unsigned int LHERunInfoProduct::const_iterator::line [private] |
Definition at line 104 of file LHERunInfoProduct.h.
Referenced by LHERunInfoProduct::begin(), LHERunInfoProduct::init(), and next().
Mode LHERunInfoProduct::const_iterator::mode [private] |
Definition at line 103 of file LHERunInfoProduct.h.
Referenced by LHERunInfoProduct::begin(), LHERunInfoProduct::init(), and next().
const LHERunInfoProduct* LHERunInfoProduct::const_iterator::runInfo [private] |
Definition at line 100 of file LHERunInfoProduct.h.
Referenced by LHERunInfoProduct::begin(), LHERunInfoProduct::init(), and next().
std::string LHERunInfoProduct::const_iterator::tmp [private] |
Definition at line 105 of file LHERunInfoProduct.h.
Referenced by LHERunInfoProduct::begin(), LHERunInfoProduct::init(), next(), operator*(), and operator->().