CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
 StringSource (const std::string &inputs)
 
 ~StringSource ()
 
- Public Member Functions inherited from lhef::LHEReader::Source
 Source ()
 
virtual ~Source ()
 

Private Attributes

std::auto_ptr< std::istream > fileStream
 

Detailed Description

Definition at line 77 of file LHEReader.cc.

Constructor & Destructor Documentation

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

Definition at line 79 of file LHEReader.cc.

References edm::hlt::Exception, and fileStream.

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

Definition at line 90 of file LHEReader.cc.

90 {}

Member Function Documentation

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

Implements lhef::LHEReader::Source.

Definition at line 92 of file LHEReader.cc.

References fileStream.

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

Member Data Documentation

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

Definition at line 96 of file LHEReader.cc.

Referenced by createReader(), and StringSource().