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::auto_ptr< std::istream > fileStream
 

Detailed Description

Definition at line 76 of file LHEReader.cc.

Constructor & Destructor Documentation

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

Definition at line 78 of file LHEReader.cc.

References Exception.

79  {
80  if (inputs == "")
81  throw cms::Exception("StreamOpenError")
82  << "Empty LHE file string name \""
83  << std::endl;
84 
85  std::stringstream * tmpis = new std::stringstream(inputs);
86  fileStream.reset(tmpis);
87  }
std::auto_ptr< std::istream > fileStream
Definition: LHEReader.cc:95
lhef::LHEReader::StringSource::~StringSource ( )
inlineoverride

Definition at line 89 of file LHEReader.cc.

89 {}

Member Function Documentation

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

Implements lhef::LHEReader::Source.

Definition at line 91 of file LHEReader.cc.

92  { return new XMLDocument(fileStream, handler); }
std::unique_ptr< XMLHandler > handler
Definition: LHEReader.h:45
std::auto_ptr< std::istream > fileStream
Definition: LHEReader.cc:95

Member Data Documentation

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

Definition at line 95 of file LHEReader.cc.