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::FileSource Class Reference
Inheritance diagram for lhef::LHEReader::FileSource:
lhef::LHEReader::Source

Public Member Functions

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

Private Attributes

std::auto_ptr< StorageWrapfileStream
 

Detailed Description

Definition at line 50 of file LHEReader.cc.

Constructor & Destructor Documentation

lhef::LHEReader::FileSource::FileSource ( const std::string &  fileURL)
inline

Definition at line 52 of file LHEReader.cc.

References edm::hlt::Exception, fileStream, StorageFactory::get(), StorageFactory::open(), and IOFlags::OpenRead.

53  {
54  Storage *storage =
55  StorageFactory::get()->open(fileURL,
57 
58  if (!storage)
59  throw cms::Exception("FileOpenError")
60  << "Could not open LHE file \""
61  << fileURL << "\" for reading"
62  << std::endl;
63 
64  fileStream.reset(new StorageWrap(storage));
65  }
Storage * open(const std::string &url, int mode=IOFlags::OpenRead)
static StorageFactory * get(void)
std::auto_ptr< StorageWrap > fileStream
Definition: LHEReader.cc:73
lhef::LHEReader::FileSource::~FileSource ( )
inline

Definition at line 67 of file LHEReader.cc.

67 {}

Member Function Documentation

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

Implements lhef::LHEReader::Source.

Definition at line 69 of file LHEReader.cc.

References fileStream.

70  { return new XMLDocument(fileStream, handler); }
std::auto_ptr< XMLHandler > handler
Definition: LHEReader.h:45
std::auto_ptr< StorageWrap > fileStream
Definition: LHEReader.cc:73

Member Data Documentation

std::auto_ptr<StorageWrap> lhef::LHEReader::FileSource::fileStream
private

Definition at line 73 of file LHEReader.cc.

Referenced by createReader(), and FileSource().