CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
lhef::LHEReader::StringSource Class Reference
Inheritance diagram for lhef::LHEReader::StringSource:
lhef::LHEReader::Source

Public Member Functions

XMLDocumentcreateReader (XMLDocument::Handler &handler) override
 
 StringSource (const std::string &inputs)
 
 ~StringSource () override
 
- Public Member Functions inherited from lhef::LHEReader::Source
 Source ()
 
virtual ~Source ()
 

Private Attributes

std::unique_ptr< std::istream > fileStream
 

Detailed Description

Definition at line 69 of file LHEReader.cc.

Constructor & Destructor Documentation

◆ StringSource()

lhef::LHEReader::StringSource::StringSource ( const std::string &  inputs)
inline

Definition at line 71 of file LHEReader.cc.

71  {
72  if (inputs.empty())
73  throw cms::Exception("StreamOpenError") << "Empty LHE file string name \"" << std::endl;
74 
75  std::stringstream *tmpis = new std::stringstream(inputs);
76  fileStream.reset(tmpis);
77  }

References fileStream, and PixelMapPlotter::inputs.

◆ ~StringSource()

lhef::LHEReader::StringSource::~StringSource ( )
inlineoverride

Definition at line 79 of file LHEReader.cc.

79 {}

Member Function Documentation

◆ createReader()

XMLDocument* lhef::LHEReader::StringSource::createReader ( XMLDocument::Handler handler)
inlineoverridevirtual

Implements lhef::LHEReader::Source.

Definition at line 81 of file LHEReader.cc.

81 { return new XMLDocument(fileStream, handler); }

References fileStream, and lhef::LHEReader::handler.

Member Data Documentation

◆ fileStream

std::unique_ptr<std::istream> lhef::LHEReader::StringSource::fileStream
private

Definition at line 84 of file LHEReader.cc.

Referenced by createReader(), and StringSource().

XMLDocument
Definition: HcalDbXml.cc:60
PixelMapPlotter.inputs
inputs
Definition: PixelMapPlotter.py:490
lhef::LHEReader::StringSource::fileStream
std::unique_ptr< std::istream > fileStream
Definition: LHEReader.cc:84
cms::Exception
Definition: Exception.h:70
lhef::LHEReader::handler
std::unique_ptr< XMLHandler > handler
Definition: LHEReader.h:41