CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Typedefs | Functions
lhef Namespace Reference

Classes

class  CBInputStream
 
class  CommonBlocks
 
class  H5Handler
 
class  HEPEUP
 
class  HEPRUP
 
class  LH5Reader
 
class  LHEEvent
 
class  LHEProxy
 
class  LHEReader
 
class  LHERunInfo
 
class  STLInputStream
 
class  StorageInputStream
 
class  StorageWrap
 
class  XMLDocument
 
class  XMLInputSourceWrapper
 
class  XMLSimpleStr
 
class  XMLUniStr
 

Typedefs

typedef XMLInputSourceWrapper
< CBInputStream
CBInputSource
 
typedef XMLInputSourceWrapper
< STLInputStream
STLInputSource
 
typedef XMLInputSourceWrapper
< StorageInputStream
StorageInputSource
 

Functions

static void attributesToDom (DOMElement *dom, const Attributes &attributes)
 
static std::vector< std::string > domToLines (const DOMNode *node)
 
static void fillHeader (LHERunInfo::Header &header, const char *data, int len=-1)
 
static void fillLines (std::vector< std::string > &lines, const char *data, int len=-1)
 
static void fixSubTree (HepMC::GenVertex *vertex, HepMC::FourVector &_time, std::set< const HepMC::GenVertex * > &visited)
 
static void logFileAction (char const *msg, std::string const &fileName)
 
static void logFileAction (char const *msg, std::string const &fileName)
 
const bool operator< (const LHERunInfo::Process &lhs, const LHERunInfo::Process &rhs)
 
const bool operator== (const LHERunInfo::Process &lhs, const LHERunInfo::Process &rhs)
 

Typedef Documentation

Definition at line 188 of file XMLUtils.h.

Definition at line 189 of file XMLUtils.h.

Definition at line 190 of file XMLUtils.h.

Function Documentation

static void lhef::attributesToDom ( DOMElement *  dom,
const Attributes &  attributes 
)
static

Definition at line 146 of file LHEReader.cc.

References mps_fire::i, mergeVDriftHistosByStation::name, and relativeConstraints::value.

Referenced by lhef::LHEReader::XMLHandler::startElement().

146  {
147  for (unsigned int i = 0; i < attributes.getLength(); i++) {
148  const XMLCh *name = attributes.getQName(i);
149  const XMLCh *value = attributes.getValue(i);
150 
151  dom->setAttribute(name, value);
152  }
153  }
static std::vector<std::string> lhef::domToLines ( const DOMNode *  node)
static

Definition at line 416 of file LHERunInfo.cc.

References cms::cuda::assert(), edmScanValgrind::buffer, fillLines(), AlCaHLTBitMon_ParallelJobs::p, submitPVResolutionJobs::q, and mps_fire::result.

Referenced by lhef::LHERunInfo::findHeader().

416  {
417  std::vector<std::string> result;
418  DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(XMLUniStr("Core"));
419  std::unique_ptr<DOMLSSerializer> writer(((DOMImplementationLS *)(impl))->createLSSerializer());
420 
421  std::unique_ptr<DOMLSOutput> outputDesc(((DOMImplementationLS *)impl)->createLSOutput());
422  assert(outputDesc.get());
423  outputDesc->setEncoding(XMLUniStr("UTF-8"));
424 
425  XMLSimpleStr buffer(writer->writeToString(node));
426 
427  const char *p = std::strchr((const char *)buffer, '>') + 1;
428  const char *q = std::strrchr(p, '<');
429  fillLines(result, p, q - p);
430 
431  return result;
432  }
assert(be >=bs)
tuple result
Definition: mps_fire.py:311
static void fillLines(std::vector< std::string > &lines, const char *data, int len=-1)
Definition: LHERunInfo.cc:401
static void lhef::fillHeader ( LHERunInfo::Header &  header,
const char *  data,
int  len = -1 
)
static

Definition at line 155 of file LHEReader.cc.

References LHERunInfoProduct::Header::addLine(), data, dataset::end, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by lhef::LHEReader::XMLHandler::comment(), and lhef::LHEReader::XMLHandler::endElement().

155  {
156  const char *end = len >= 0 ? (data + len) : nullptr;
157  while (*data && (!end || data < end)) {
158  std::size_t len = std::strcspn(data, "\r\n");
159  if (end && data + len > end)
160  len = end - data;
161  if (data[len] == '\r' && data[len + 1] == '\n')
162  len += 2;
163  else if (data[len])
164  len++;
165  header.addLine(std::string(data, len));
166  data += len;
167  }
168  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
string end
Definition: dataset.py:937
static void lhef::fillLines ( std::vector< std::string > &  lines,
const char *  data,
int  len = -1 
)
static

Definition at line 401 of file LHERunInfo.cc.

References data, dataset::end, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by domToLines().

401  {
402  const char *end = len >= 0 ? (data + len) : nullptr;
403  while (*data && (!end || data < end)) {
404  std::size_t len = std::strcspn(data, "\r\n");
405  if (end && data + len > end)
406  len = end - data;
407  if (data[len] == '\r' && data[len + 1] == '\n')
408  len += 2;
409  else if (data[len])
410  len++;
411  lines.push_back(std::string(data, len));
412  data += len;
413  }
414  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
string end
Definition: dataset.py:937
static void lhef::fixSubTree ( HepMC::GenVertex *  vertex,
HepMC::FourVector &  _time,
std::set< const HepMC::GenVertex * > &  visited 
)
static

Definition at line 429 of file LHEEvent.cc.

Referenced by lhef::LHEEvent::fixHepMCEventTimeOrdering().

431  {
432  HepMC::FourVector time = _time;
433  HepMC::FourVector curTime = vertex->position();
434  bool needsFixup = curTime.t() < time.t();
435 
436  if (!visited.insert(vertex).second && !needsFixup)
437  return;
438 
439  if (needsFixup)
440  vertex->set_position(time);
441  else
442  time = curTime;
443 
444  for (HepMC::GenVertex::particles_out_const_iterator iter = vertex->particles_out_const_begin();
445  iter != vertex->particles_out_const_end();
446  ++iter) {
447  HepMC::GenVertex *endVertex = (*iter)->end_vertex();
448  if (endVertex)
449  fixSubTree(endVertex, time, visited);
450  }
451  }
static void fixSubTree(HepMC::GenVertex *vertex, HepMC::FourVector &_time, std::set< const HepMC::GenVertex * > &visited)
Definition: LHEEvent.cc:429
static void lhef::logFileAction ( char const *  msg,
std::string const &  fileName 
)
static

Definition at line 31 of file LH5Reader.cc.

References MillePedeFileConverter_cfg::fileName, and edm::FlushMessageLog().

Referenced by lhef::LHEReader::next(), and lhef::LH5Reader::next().

31  {
32  edm::LogAbsolute("fileAction") << std::setprecision(0) << edm::TimeOfDay() << msg << fileName;
34  }
void FlushMessageLog()
tuple msg
Definition: mps_check.py:285
Log< level::System, true > LogAbsolute
static void lhef::logFileAction ( char const *  msg,
std::string const &  fileName 
)
static

Definition at line 35 of file LHEReader.cc.

References MillePedeFileConverter_cfg::fileName, and edm::FlushMessageLog().

35  {
36  edm::LogAbsolute("fileAction") << std::setprecision(0) << edm::TimeOfDay() << msg << fileName;
38  }
void FlushMessageLog()
tuple msg
Definition: mps_check.py:285
Log< level::System, true > LogAbsolute
const bool lhef::operator< ( const LHERunInfo::Process &  lhs,
const LHERunInfo::Process &  rhs 
)

Definition at line 545 of file LHERunInfo.cc.

References lhef::LHERunInfo::Process::process().

545  {
546  return (lhs.process() < rhs.process());
547  }
const bool lhef::operator== ( const LHERunInfo::Process &  lhs,
const LHERunInfo::Process &  rhs 
)

Definition at line 541 of file LHERunInfo.cc.

References lhef::LHERunInfo::Process::process().

541  {
542  return (lhs.process() == rhs.process());
543  }