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 68 of file LHEReader.cc.

Constructor & Destructor Documentation

◆ StringSource()

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

Definition at line 70 of file LHEReader.cc.

References lhef::LHEReader::FileSource::fileStream, and PixelMapPlotter::inputs.

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

◆ ~StringSource()

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

Definition at line 78 of file LHEReader.cc.

78 {}

Member Function Documentation

◆ createReader()

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

Implements lhef::LHEReader::Source.

Definition at line 80 of file LHEReader.cc.

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

80 { return new XMLDocument(fileStream, handler); }
std::unique_ptr< std::istream > fileStream
Definition: LHEReader.cc:83
std::unique_ptr< XMLHandler > handler
Definition: LHEReader.h:41

Member Data Documentation

◆ fileStream

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

Definition at line 83 of file LHEReader.cc.